diff --git a/pages/tags/hello.md b/pages/tags/hello.md new file mode 100644 index 0000000..946197b --- /dev/null +++ b/pages/tags/hello.md @@ -0,0 +1,6 @@ +--- +name: "hello" +short_summary: "Hello is an example tag" +--- + +This is the page about the "hello" tag, this is a placeholder for a longer description \ No newline at end of file diff --git a/plugins.py b/plugins.py index 5dd223e..2e418ae 100644 --- a/plugins.py +++ b/plugins.py @@ -36,7 +36,22 @@ class Service(Templated, Content): template: str="service/service_detail.html" summary: str +class TagSummary(Templated, Content): + """This is a summary for a tag""" + name: str + template: str="tag_summary.html" + short_summary: str + @Site.register_context_provider def global_context(ctx): ctx['safe'] = SafeStr + return ctx + +def get_tag_url(tag: str): + """Get the URL for `tag` if it exists""" + return "" + +@Site.register_context_provider +def global_context(ctx): + ctx['get_tag_url'] = get_tag_url return ctx \ No newline at end of file diff --git a/templates/blog/post_detail.html b/templates/blog/post_detail.html index b1f4731..9660b01 100644 --- a/templates/blog/post_detail.html +++ b/templates/blog/post_detail.html @@ -22,5 +22,5 @@
{{ this.content }}
+{% endblock %} \ No newline at end of file