diff options
author | indrajith | 2022-10-01 14:07:36 +0000 |
---|---|---|
committer | indrajith | 2022-10-01 14:07:36 +0000 |
commit | 9665f6dcf69b2c4ad15503db638bb2b82e78893a (patch) | |
tree | b8e926cc11720710d62ddc0d2ff2e0a8860171ee /src/tags.njk | |
parent | 98e0a1608cee0ae07da475aee3436846b2b109d9 (diff) | |
parent | bb50c7e11835154576c6f7a2a40cf2aaee6f4c60 (diff) | |
download | indrajith-dev-9665f6dcf69b2c4ad15503db638bb2b82e78893a.tar.gz indrajith-dev-9665f6dcf69b2c4ad15503db638bb2b82e78893a.tar.bz2 indrajith-dev-9665f6dcf69b2c4ad15503db638bb2b82e78893a.zip |
Merge pull request 'Theming & Page Changes' (#1) from feature/theming into master
Reviewed-on: https://git.indrajith.dev/indrajith/indrajith.dev/pulls/1
Diffstat (limited to 'src/tags.njk')
-rw-r--r-- | src/tags.njk | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/tags.njk b/src/tags.njk new file mode 100644 index 0000000..6eff101 --- /dev/null +++ b/src/tags.njk @@ -0,0 +1,36 @@ +--- +layout: base.njk +eleventyComputed: + title: Tagged “{{ tag }}” +pagination: + data: collections + size: 1 + alias: tag + filter: + - all + - post + - posts + - tagList +permalink: /tags/{{tag}}/ +--- + +<h1>Tagged “{{ tag }}”</h1> + +<ol> +{% set postslist = collections[ tag ] %} + + + + +<ol reversed class="postlist" style="counter-reset: start-from {{ (postslistCounter or postslist.length) + 1 }}"> +{% for post in postslist | reverse %} + <li class="postlist-item{% if post.url == url %} postlist-item-active{% endif %}"> + <a href="{{ post.url | url }}" class="postlist-link">{% if post.data.title %}{{ post.data.title }}{% else %}<code>{{ post.url }}</code>{% endif %}</a> + + {% for tag in post.data.tags | filterTagList %} + {% set tagUrl %}/tags/{{ tag | slugify }}/{% endset %} + <a href="{{ tagUrl | url }}" class="post-tag">{{ tag }}</a> + {% endfor %} + </li> +{% endfor %} +</ol>
\ No newline at end of file |