{% for post in sitenav.children["blog"].children.values()|sort(attribute='modifiedTs', reverse=True) -%} * {{post.modifiedTs|ts_date}} - link:{{baseRel}}/{{post.href|urlencode}}[{{post.title}}] {% endfor %}
Blog
Autogenerated list of all posts, sorted by most recently modified.
-
2022-12-14 - 2022-02-22 Jupiter
-
2022-12-14 - 2021-12-23 Mars
-
1970-01-01 - Test: md
Note that this is unlike the navigation bar, which is reverse-sorted by filename. Moreover, some dates have been overridden manually.
We do this from the j2 sitenav
variable, just like what the left-side
navigation bar uses. Code:
is what produces the above. Note that j2 template expansion happens before
the block source is passed to the markup jinja2 filter (adoc2main
, md2main
,
rst2main
, etc).
Heading level 2
Test mixing docutils and asciidoc CSS on the same page.
2022-12-14 - 2022-02-22 Jupiter
2022-12-14 - 2021-12-23 Mars
1970-01-01 - Test: md
Same list, with docutils styling.