diff options
| author | Isabella Bastaja <isabella@sorre.xyz> | 2026-02-21 17:33:38 +0100 |
|---|---|---|
| committer | Isabella Bastaja <isabella@sorre.xyz> | 2026-02-21 18:16:53 +0100 |
| commit | d4cc95fe9d1810f273900de3ed1d7cc40b4b2e94 (patch) | |
| tree | 8dff57e3fd9e73cc05ee935b7f828bf7cc4b4737 /soupault.toml | |
| parent | fa75b66a80b699c8e104c22b58734a3d6e273468 (diff) | |
style post index and dates
Diffstat (limited to 'soupault.toml')
| -rw-r--r-- | soupault.toml | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/soupault.toml b/soupault.toml index 7cc8b99..ac5cc49 100644 --- a/soupault.toml +++ b/soupault.toml @@ -72,6 +72,11 @@ selector = '*[class^="language-"]' command = 'highlight -O html -f --syntax=$(echo $ATTR_CLASS | sed "s/language-//")' +[widgets.wrap-upload-date] + widget = 'preprocess_element' + selector = '.post-dates' + # parse = false + command = 'sed -E "s/.+post-([a-z]+)-date.+/<p><strong>\1 date: <\/strong>&<\/p>/"' [index] sort_descending = true @@ -88,16 +93,20 @@ extract_attribute = 'datetime' fallback_to_content = true -[index.fields.updatedate] - selector = ['time#post-update-date'] +[index.fields.mtime] + selector = ['time#post-modification-date'] extract_attribute = 'datetime' fallback_to_content = true [index.views.blog] index_selector = "#blog-index" index_item_template = """ - <h2><a href="{{url}}">{{title}}</a></h2> - <p><strong>Uploaded:</strong> {{uploaddate}}</p> - <p><strong>Last update:</strong> {{updatedate}}.</p> + <article class="post"> + <h2><a href="{{url}}">{{title}}</a></h2> + <div class="post-dates"> + <p><strong>upload date:</strong> {{uploaddate}}</p> + <p><strong>modification date:</strong> {{mtime}}</p> + </div> + </article> """ |
