From ee71be14a05d0d7da38352f8ff5c19798f96d4eb Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sat, 8 Apr 2023 13:22:48 -0300 Subject: v2: Generate collections index.html pages and their "by-category" equivalents --- v2/src/lib/base.conf | 1 - v2/src/lib/base.en.conf | 26 ++++++++++++++++++++++++++ v2/src/lib/base.pt.conf | 26 ++++++++++++++++++++++++++ v2/src/lib/category-header.html | 6 ++++++ v2/src/lib/category.html | 3 +++ v2/src/lib/entry.html | 5 +++++ v2/src/lib/entry.xml | 4 ++-- v2/src/lib/feed.xml | 8 ++++---- v2/src/lib/index-postamble.html | 8 ++++++++ v2/src/lib/index-preamble.html | 7 +++++++ v2/src/lib/postamble.html | 10 +++++++--- v2/src/lib/preamble.html | 6 +++--- 12 files changed, 97 insertions(+), 13 deletions(-) create mode 100755 v2/src/lib/category-header.html create mode 100644 v2/src/lib/category.html create mode 100644 v2/src/lib/entry.html create mode 100755 v2/src/lib/index-postamble.html create mode 100755 v2/src/lib/index-preamble.html (limited to 'v2/src/lib') diff --git a/v2/src/lib/base.conf b/v2/src/lib/base.conf index 319d08c..72f70b9 100644 --- a/v2/src/lib/base.conf +++ b/v2/src/lib/base.conf @@ -6,4 +6,3 @@ export mailto_uri_prefix="mailto:$list_addr?Subject=Re%3A%20" export discussions_url_prefix="https://lists.sr.ht/~euandreh/public-inbox?search=" export sourcecode_url_prefix="https://$domain/git/$domain/tree/" export author='EuAndreh' -export pubkey_id='81F90EC3CD356060' # FIXME diff --git a/v2/src/lib/base.en.conf b/v2/src/lib/base.en.conf index 52aede3..5ced00a 100644 --- a/v2/src/lib/base.en.conf +++ b/v2/src/lib/base.en.conf @@ -2,6 +2,32 @@ export date_fmt='%B %-d, %Y' export site_name="EuAndreh's website" +export lang='en' + +export index_pastebins_title='Pastebins' + +export index_recent_pastebins_title='Pastebins listing' + +export index_category_pastebins_title='Pastebins by category' + +export index by_category_url_part='by-category.html' + +export feed_pastebins_title="EuAndreh's pastebins" + +export index_tils_title='TIL' + +export index_recent_tils_title='TIL listing' + +export index_category_tils_title='TIL by category' + +export feed_tils_title="EuAndreh's TIL" + export about='About' export about_url_name='about.html' + +export homepage_url="$(url-for "$lang/")" + +export homepage_url_absolute="$(absolute "$homepage_url")" + +export about_url="$(url-for "$lang/$about_url_name")" diff --git a/v2/src/lib/base.pt.conf b/v2/src/lib/base.pt.conf index 52aede3..fe03f42 100644 --- a/v2/src/lib/base.pt.conf +++ b/v2/src/lib/base.pt.conf @@ -2,6 +2,32 @@ export date_fmt='%B %-d, %Y' export site_name="EuAndreh's website" +export lang='pt' + +export index_pastebins_title='Pastebins' + +export index_recent_pastebins_title='Pastebins listing' + +export index_category_pastebins_title='Pastebins by category' + +export index by_category_url_part='by-category.html' + +export feed_pastebins_title="EuAndreh's pastebins" + +export index_tils_title='TIL' + +export index_recent_tils_title='TIL listing' + +export index_category_tils_title='TIL by category' + +export feed_tils_title="EuAndreh's TIL" + export about='About' export about_url_name='about.html' + +export homepage_url="$(url-for "$lang/")" + +export homepage_url_absolute="$(absolute "$homepage_url")" + +export about_url="$(url-for "$lang/$about_url_name")" diff --git a/v2/src/lib/category-header.html b/v2/src/lib/category-header.html new file mode 100755 index 0000000..a69b198 --- /dev/null +++ b/v2/src/lib/category-header.html @@ -0,0 +1,6 @@ +

+ $index_recent_title_html + + $icon_atom_alt + +

diff --git a/v2/src/lib/category.html b/v2/src/lib/category.html new file mode 100644 index 0000000..172829b --- /dev/null +++ b/v2/src/lib/category.html @@ -0,0 +1,3 @@ +
  • + $title_html - $formatted_date_html +
  • diff --git a/v2/src/lib/entry.html b/v2/src/lib/entry.html new file mode 100644 index 0000000..cbab9c0 --- /dev/null +++ b/v2/src/lib/entry.html @@ -0,0 +1,5 @@ +
  • + $formatted_date_html +
    + $title_html +
  • diff --git a/v2/src/lib/entry.xml b/v2/src/lib/entry.xml index e4a47c7..b43b238 100644 --- a/v2/src/lib/entry.xml +++ b/v2/src/lib/entry.xml @@ -2,13 +2,13 @@ $title_html - + $date_iso $update_xml - $url + $url_absolute diff --git a/v2/src/lib/feed.xml b/v2/src/lib/feed.xml index 6fd82a4..8e70e98 100644 --- a/v2/src/lib/feed.xml +++ b/v2/src/lib/feed.xml @@ -2,11 +2,11 @@ xmlns="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/" xml:lang="$lang"> - - + + $site_name_html - {{ site.t[include.kind].feed.title[include.lang] | smartify | xml_escape }} - $url + $feed_title_html + $url_absolute $now diff --git a/v2/src/lib/index-postamble.html b/v2/src/lib/index-postamble.html new file mode 100755 index 0000000..92ebbf2 --- /dev/null +++ b/v2/src/lib/index-postamble.html @@ -0,0 +1,8 @@ + + +

    + + $index_category_title_html + $icon_linkto_alt + +

    diff --git a/v2/src/lib/index-preamble.html b/v2/src/lib/index-preamble.html new file mode 100755 index 0000000..2c17031 --- /dev/null +++ b/v2/src/lib/index-preamble.html @@ -0,0 +1,7 @@ +

    + $index_recent_title_html + + $icon_atom_alt + +

    +
      diff --git a/v2/src/lib/postamble.html b/v2/src/lib/postamble.html index 00dc1dc..e55666d 100644 --- a/v2/src/lib/postamble.html +++ b/v2/src/lib/postamble.html @@ -5,16 +5,20 @@ $comment_html

      - The content for this site is licensed under CC BY-SA 4.0. The code is AGPLv3 or later. Patches welcome. + The content for this site is licensed under + CC BY-SA 4.0. + The code is + AGPLv3 or later. + Patches welcome.

      diff --git a/v2/src/lib/preamble.html b/v2/src/lib/preamble.html index 6e0bd30..fc19961 100644 --- a/v2/src/lib/preamble.html +++ b/v2/src/lib/preamble.html @@ -4,7 +4,7 @@ - + $title_html @@ -13,8 +13,8 @@ - - + +
      -- cgit v1.2.3