From 819fb3814f981047d5f16dc90938d303659ded67 Mon Sep 17 00:00:00 2001 From: John-Mark Gurney Date: Thu, 15 Apr 2021 16:30:54 -0700 Subject: [PATCH] fix up post tags so that they work... --- .gitignore | 3 +++ layout/blog.j2 | 4 +++- layout/tagged_posts.j2 | 28 ++++++++++++++++++++++++++++ site.yaml | 7 +++++-- 4 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 layout/tagged_posts.j2 diff --git a/.gitignore b/.gitignore index 5724ef1..d3fbcf2 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,6 @@ deploy # virtualenv p + +# automatically generated (not a fan that they're here) +content/search diff --git a/layout/blog.j2 b/layout/blog.j2 index 9dda4cb..4c7cc83 100644 --- a/layout/blog.j2 +++ b/layout/blog.j2 @@ -14,7 +14,7 @@ {% endif %}
+
{% filter markdown|typogrify -%} {% block post -%}{%- endblock %} {%- endfilter %} +
{%- endmark %} diff --git a/layout/tagged_posts.j2 b/layout/tagged_posts.j2 new file mode 100644 index 0000000..326b5c2 --- /dev/null +++ b/layout/tagged_posts.j2 @@ -0,0 +1,28 @@ +{% extends "base.j2" %} + +{% block main %} +
+

{{ tag.name }}

+
    +{% for resource in walker() -%} +
  • + + {{ resource.meta.title }} + {% if resource.meta.tags %} +
      + {% for tag in resource.meta.tags %} +
    • + + {{ tag }} + +
    • + {% endfor %} +
    + {% endif %} +
  • +{%- endfor %} +
+
+{% endblock %} diff --git a/site.yaml b/site.yaml index 4cdc988..1b51fec 100644 --- a/site.yaml +++ b/site.yaml @@ -38,5 +38,8 @@ tagger: sorter: time archives: blog: - source: blog - target: blog/tags + source: . + target: search/label + template: tagged_posts.j2 + meta: + listable: false