diff options
Diffstat (limited to 'v2')
46 files changed, 1045 insertions, 155 deletions
diff --git a/v2/.gitignore b/v2/.gitignore index 5f13add..971b0fe 100644 --- a/v2/.gitignore +++ b/v2/.gitignore @@ -1,22 +1,24 @@ /generated.mk /*.sentinel /po/po4a.cfg +/po/*.mo /public/ -/src/content/*/feeds/ -/src/content/*/*.conf -/src/content/*/*.content -/src/content/*/*.html -/src/content/*/*.md.tmp -/src/content/*/*.htmlbody -/src/content/*/*.snippets -/src/content/*/*.html.*.txt -/src/content/*/*/*.conf -/src/content/*/*/*.content -/src/content/*/*/*.html -/src/content/*/*/*.md.tmp -/src/content/*/*/*.htmlbody -/src/content/*/*/*.snippets -/src/content/*/*/*.html.*.txt -/src/content/*/*/*.sortdata -/src/content/*/*/*.sortref -/src/content/*/*/*.xmlentry +/src/lib/generated.conf +/src/lib/generated.*.conf +/src/content/**/index.extrafeeds +/src/content/**/*.categories +/src/content/**/*.category +/src/content/**/*.categoryentry +/src/content/**/*.categorysort +/src/content/**/*.conf +/src/content/**/*.content +/src/content/**/*.html +/src/content/**/*.extrahtml +/src/content/**/*.md.tmp +/src/content/**/*.htmlbody +/src/content/**/*.snippets +/src/content/**/*.html.*.txt +/src/content/**/*.sortdata +/src/content/**/*.indexentry +/src/content/**/*.xmlentry +/src/content/**/*.xml diff --git a/v2/dynamic.mk b/v2/dynamic.mk index 06d9bbf..9ebd5ef 100644 --- a/v2/dynamic.mk +++ b/v2/dynamic.mk @@ -7,7 +7,7 @@ include generated.mk .SUFFIXES: -.SUFFIXES: .md .content .conf .html .xmlentry +.SUFFIXES: .md .content .conf .html .categoryentry .indexentry .xmlentry .md.content: @@ -19,39 +19,69 @@ include generated.mk .md.html: html $< > $@ +.md.categoryentry: + category $< > $@ + +.md.indexentry: + indexentry $< > $@ + .md.xmlentry: xmlentry $< > $@ -derived-assets = \ - $(all-generated) \ - $(feeds) \ - all: public $(all-generated.conf) $(all-generated.content): $(non-content) -$(all-generated.conf): src/lib/base.conf +$(all-generated.conf): src/lib/base.conf src/lib/generated.conf + +src/lib/generated.conf: src/bin/conf + conf > $@ + +$(all-generated.categories): + categories $@ + +$(all-generated.index): src/lib/generated.conf + index $@ $(all-generated.xml): feed $@ clean: rm -rf \ - public/ $(derived-assets) *.sentinel generated.mk po/po4a.cfg \ - src/content/*/*.html.*.txt src/content/*/*/*.html.*.txt \ - src/content/*/*/*.sortdata src/content/**/feeds/ \ + public/ $(all-generated) *.sentinel generated.mk po/po4a.cfg \ + src/content/*/*.category src/content/*/*/*.category \ + src/content/*/*.categorysort src/content/*/*/*.categorysort \ + src/content/*/*.html src/content/*/*/*.html \ + src/content/*/*.extrahtml src/content/*/*/*.extrahtml \ + src/content/*/*.extrafeeds src/content/*/*/*.extrafeeds \ + src/content/*/*.html.*.txt src/content/*/*/*.html.*.txt \ + src/content/*/*.sortdata src/content/*/*/*.sortdata \ + src/content/*/feed.*.xml src/content/*/*/feed.*.xml \ + src/lib/generated.conf src/lib/generated.*.conf po/*.mo \ -public: $(derived-assets) symlink-mappings.sentinel copy-content.sentinel copy-code-snippets.sentinel +public: symlink-mappings.sentinel copy-content.sentinel copy-containers.sentinel content = \ $(all-generated.html) \ + $(all-generated.index) \ $(all-generated.xml) \ $(static-content) \ -symlink-mappings.sentinel: src/redirect.mappings content-mkdir.sentinel +containers = \ + $(all-generated.snippets) \ + $(all-generated.extrahtml) \ + $(all-generated.extrafeeds) \ + + +symlink-mappings.sentinel: src/redirect.mappings + awk '{print $$2}' src/redirect.mappings | \ + xargs dirname | \ + sort | \ + uniq | \ + xargs -P`nproc` -I% mkdir -p public/% < src/redirect.mappings \ awk '{ printf "ln -rfs public/%s public/%s\n", $$2, $$1 }' | \ sh @@ -62,15 +92,14 @@ copy-content.sentinel: $(content) content-mkdir.sentinel xargs -P`nproc` -I% ln -f src/content/% public/% touch $@ -copy-code-snippets.sentinel: $(all-generated.snippets) content-mkdir.sentinel +copy-containers.sentinel: $(containers) content-mkdir.sentinel echo $? | tr ' ' '\n' | grep '^src/content/' | \ xargs sed 's|^src/content/||' | \ xargs -P`nproc` -I% ln -f src/content/% public/% touch $@ -content-mkdir.sentinel: $(content) $(all-generated.snippets) src/redirect.mappings +content-mkdir.sentinel: $(content) $(containers) echo $? | tr ' ' '\n' | grep '^src/content/' | sed 's|^src/content/||' | \ - printf '%s\n%s\n' "`cat -`" "`awk '{print $$2}' src/redirect.mappings`" | \ xargs dirname | \ sort | \ uniq | \ @@ -78,8 +107,8 @@ content-mkdir.sentinel: $(content) $(all-generated.snippets) src/redirect.mappin touch $@ -src/content/favicon.ico: src/content/favicon.svg - convert src/content/favicon.svg $@ +src/content/favicon.ico: src/content/img/favicon.svg + convert src/content/img/favicon.svg $@ src/content/public.asc.txt: gpg --armour --export '$(EMAIL)' > $@ diff --git a/v2/po/euandre.org.pot b/v2/po/euandre.org.pot index fcaba04..90c1acb 100644 --- a/v2/po/euandre.org.pot +++ b/v2/po/euandre.org.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2023-04-05 18:22-0300\n" +"POT-Creation-Date: 2023-04-08 12:41-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -17,6 +17,38 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" #. type: Plain text +#: src/content/img/alt/atom.en.txt:1 +msgid "three yellow lines representing an Atom feed" +msgstr "" + +#. type: Plain text +#: src/content/img/alt/envelope.en.txt:1 +msgid "an envelope icon representing an email address" +msgstr "" + +#. type: Plain text +#: src/content/img/alt/favicon.en.txt:1 +msgid "a crude hand doing a thumbs up" +msgstr "" + +#. type: Plain text +#: src/content/img/alt/link.en.txt:1 +msgid "two chain rings, representing an anchor to this header" +msgstr "" + +#. type: Plain text +#: src/content/img/alt/linkto.en.txt:1 +msgid "" +"a drawing of a box with an arrow going outwards, representing an internal " +"link" +msgstr "" + +#. type: Plain text +#: src/content/img/alt/lock.en.txt:1 +msgid "a lock icon representing a GPG public key" +msgstr "" + +#. type: Plain text #: src/lib/base.en.conf:2 msgid "export date_fmt='%B %-d, %Y'" msgstr "" @@ -28,14 +60,79 @@ msgstr "" #. type: Plain text #: src/lib/base.en.conf:6 +msgid "export lang='en'" +msgstr "" + +#. type: Plain text +#: src/lib/base.en.conf:8 +msgid "export index_pastebins_title='Pastebins'" +msgstr "" + +#. type: Plain text +#: src/lib/base.en.conf:10 +msgid "export index_recent_pastebins_title='Pastebins listing'" +msgstr "" + +#. type: Plain text +#: src/lib/base.en.conf:12 +msgid "export index_category_pastebins_title='Pastebins by category'" +msgstr "" + +#. type: Plain text +#: src/lib/base.en.conf:14 +msgid "export index by_category_url_part='by-category.html'" +msgstr "" + +#. type: Plain text +#: src/lib/base.en.conf:16 +msgid "export feed_pastebins_title=\"EuAndreh's pastebins\"" +msgstr "" + +#. type: Plain text +#: src/lib/base.en.conf:18 +msgid "export index_tils_title='TIL'" +msgstr "" + +#. type: Plain text +#: src/lib/base.en.conf:20 +msgid "export index_recent_tils_title='TIL listing'" +msgstr "" + +#. type: Plain text +#: src/lib/base.en.conf:22 +msgid "export index_category_tils_title='TIL by category'" +msgstr "" + +#. type: Plain text +#: src/lib/base.en.conf:24 +msgid "export feed_tils_title=\"EuAndreh's TIL\"" +msgstr "" + +#. type: Plain text +#: src/lib/base.en.conf:26 msgid "export about='About'" msgstr "" #. type: Plain text -#: src/lib/base.en.conf:7 +#: src/lib/base.en.conf:28 msgid "export about_url_name='about.html'" msgstr "" +#. type: Plain text +#: src/lib/base.en.conf:30 +msgid "export homepage_url=\"$(url-for \"$lang/\")\"" +msgstr "" + +#. type: Plain text +#: src/lib/base.en.conf:32 +msgid "export homepage_url_absolute=\"$(absolute \"$homepage_url\")\"" +msgstr "" + +#. type: Plain text +#: src/lib/base.en.conf:33 +msgid "export about_url=\"$(url-for \"$lang/$about_url_name\")\"" +msgstr "" + #. type: Content of: <p> #: src/lib/comment.en.html:3 msgid "" @@ -67,7 +164,7 @@ msgstr "" #. type: Plain text #: src/content/en/about.md:1 src/content/en/about.md:5 #: src/content/en/pastebins/sicp-exercise-3-19.md:1 -#: src/content/en/pastebins/sicp-exercise-3-19.md:7 +#: src/content/en/pastebins/sicp-exercise-3-19.md:9 #, no-wrap msgid "---\n" msgstr "" @@ -93,12 +190,17 @@ msgid "date: 2021-09-02" msgstr "" #. type: Plain text -#: src/content/en/pastebins/sicp-exercise-3-19.md:10 +#: src/content/en/pastebins/sicp-exercise-3-19.md:8 +msgid "categories: lisp programming-languages" +msgstr "" + +#. type: Plain text +#: src/content/en/pastebins/sicp-exercise-3-19.md:12 msgid "Some content here, before:" msgstr "" #. type: Plain text -#: src/content/en/pastebins/sicp-exercise-3-19.md:20 +#: src/content/en/pastebins/sicp-exercise-3-19.md:22 #, no-wrap msgid "" "```scheme\n" @@ -113,12 +215,12 @@ msgid "" msgstr "" #. type: Plain text -#: src/content/en/pastebins/sicp-exercise-3-19.md:22 +#: src/content/en/pastebins/sicp-exercise-3-19.md:24 msgid "Sample interactive session:" msgstr "" #. type: Plain text -#: src/content/en/pastebins/sicp-exercise-3-19.md:39 +#: src/content/en/pastebins/sicp-exercise-3-19.md:41 #, no-wrap msgid "" "```scheme\n" @@ -140,93 +242,93 @@ msgid "" msgstr "" #. type: Plain text -#: src/content/en/pastebins/sicp-exercise-3-19.md:41 +#: src/content/en/pastebins/sicp-exercise-3-19.md:43 msgid "# An h1" msgstr "" #. type: Plain text -#: src/content/en/pastebins/sicp-exercise-3-19.md:43 +#: src/content/en/pastebins/sicp-exercise-3-19.md:45 msgid "a list:" msgstr "" #. type: Bullet: '1. ' -#: src/content/en/pastebins/sicp-exercise-3-19.md:47 +#: src/content/en/pastebins/sicp-exercise-3-19.md:49 #, markdown-text msgid "one" msgstr "" #. type: Bullet: '2. ' -#: src/content/en/pastebins/sicp-exercise-3-19.md:47 +#: src/content/en/pastebins/sicp-exercise-3-19.md:49 #, markdown-text msgid "two" msgstr "" #. type: Bullet: '3. ' -#: src/content/en/pastebins/sicp-exercise-3-19.md:47 +#: src/content/en/pastebins/sicp-exercise-3-19.md:49 #, markdown-text msgid "three" msgstr "" #. type: Plain text -#: src/content/en/pastebins/sicp-exercise-3-19.md:49 +#: src/content/en/pastebins/sicp-exercise-3-19.md:51 msgid "some content." msgstr "" #. type: Bullet: '- ' -#: src/content/en/pastebins/sicp-exercise-3-19.md:53 +#: src/content/en/pastebins/sicp-exercise-3-19.md:55 #, markdown-text msgid "item" msgstr "" #. type: Bullet: '- ' -#: src/content/en/pastebins/sicp-exercise-3-19.md:53 +#: src/content/en/pastebins/sicp-exercise-3-19.md:55 #, markdown-text msgid "another" msgstr "" #. type: Bullet: '- ' -#: src/content/en/pastebins/sicp-exercise-3-19.md:53 +#: src/content/en/pastebins/sicp-exercise-3-19.md:55 #, markdown-text msgid "yet another" msgstr "" #. type: Plain text -#: src/content/en/pastebins/sicp-exercise-3-19.md:55 +#: src/content/en/pastebins/sicp-exercise-3-19.md:57 msgid "## An h2" msgstr "" #. type: Plain text -#: src/content/en/pastebins/sicp-exercise-3-19.md:57 +#: src/content/en/pastebins/sicp-exercise-3-19.md:59 msgid "Xablau:" msgstr "" #. type: Plain text -#: src/content/en/pastebins/sicp-exercise-3-19.md:60 +#: src/content/en/pastebins/sicp-exercise-3-19.md:62 msgid "``` xupliu 1" msgstr "" #. type: Plain text -#: src/content/en/pastebins/sicp-exercise-3-19.md:63 +#: src/content/en/pastebins/sicp-exercise-3-19.md:65 msgid "3 4" msgstr "" #. type: Plain text -#: src/content/en/pastebins/sicp-exercise-3-19.md:70 +#: src/content/en/pastebins/sicp-exercise-3-19.md:72 msgid "dez ```" msgstr "" #. type: Plain text -#: src/content/en/pastebins/sicp-exercise-3-19.md:72 +#: src/content/en/pastebins/sicp-exercise-3-19.md:74 msgid "Foi `wikiwiu`." msgstr "" #. type: Plain text -#: src/content/en/pastebins/sicp-exercise-3-19.md:74 +#: src/content/en/pastebins/sicp-exercise-3-19.md:76 msgid "a very long code block:" msgstr "" #. type: Plain text -#: src/content/en/pastebins/sicp-exercise-3-19.md:80 +#: src/content/en/pastebins/sicp-exercise-3-19.md:82 #, no-wrap msgid "" "```\n" @@ -238,27 +340,27 @@ msgid "" msgstr "" #. type: Plain text -#: src/content/en/pastebins/sicp-exercise-3-19.md:82 +#: src/content/en/pastebins/sicp-exercise-3-19.md:84 msgid "Someone said:" msgstr "" #. type: Plain text -#: src/content/en/pastebins/sicp-exercise-3-19.md:84 +#: src/content/en/pastebins/sicp-exercise-3-19.md:86 msgid "> Xablau, xupliu." msgstr "" #. type: Plain text -#: src/content/en/pastebins/sicp-exercise-3-19.md:87 +#: src/content/en/pastebins/sicp-exercise-3-19.md:89 msgid "### A repeated header ### A repeated header" msgstr "" #. type: Plain text -#: src/content/en/pastebins/sicp-exercise-3-19.md:89 +#: src/content/en/pastebins/sicp-exercise-3-19.md:91 msgid "a big list:" msgstr "" #. type: Bullet: '1. ' -#: src/content/en/pastebins/sicp-exercise-3-19.md:107 +#: src/content/en/pastebins/sicp-exercise-3-19.md:109 #, markdown-text msgid "a" msgstr "" diff --git a/v2/po/pt.po b/v2/po/pt.po index dd60fea..2df706c 100644 --- a/v2/po/pt.po +++ b/v2/po/pt.po @@ -1,3 +1,48 @@ +msgid "" +msgstr "" +"Project-Id-Version: \n" +"POT-Creation-Date: 2023-04-08 12:41-0300\n" +"PO-Revision-Date: \n" +"Last-Translator: \n" +"Language-Team: \n" +"Language: pt\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Poedit 2.2.4\n" + +#. type: Plain text +#: src/content/img/alt/atom.en.txt:1 +msgid "three yellow lines representing an Atom feed" +msgstr "" + +#. type: Plain text +#: src/content/img/alt/envelope.en.txt:1 +msgid "an envelope icon representing an email address" +msgstr "" + +#. type: Plain text +#: src/content/img/alt/favicon.en.txt:1 +msgid "a crude hand doing a thumbs up" +msgstr "" + +#. type: Plain text +#: src/content/img/alt/link.en.txt:1 +msgid "two chain rings, representing an anchor to this header" +msgstr "" + +#. type: Plain text +#: src/content/img/alt/linkto.en.txt:1 +msgid "" +"a drawing of a box with an arrow going outwards, representing an internal " +"link" +msgstr "" + +#. type: Plain text +#: src/content/img/alt/lock.en.txt:1 +msgid "a lock icon representing a GPG public key" +msgstr "" + #. type: Plain text #: src/lib/base.en.conf:2 msgid "export date_fmt='%B %-d, %Y'" @@ -10,14 +55,79 @@ msgstr "" #. type: Plain text #: src/lib/base.en.conf:6 +msgid "export lang='en'" +msgstr "export lang='pt'" + +#. type: Plain text +#: src/lib/base.en.conf:8 +msgid "export index_pastebins_title='Pastebins'" +msgstr "" + +#. type: Plain text +#: src/lib/base.en.conf:10 +msgid "export index_recent_pastebins_title='Pastebins listing'" +msgstr "" + +#. type: Plain text +#: src/lib/base.en.conf:12 +msgid "export index_category_pastebins_title='Pastebins by category'" +msgstr "" + +#. type: Plain text +#: src/lib/base.en.conf:14 +msgid "export index by_category_url_part='by-category.html'" +msgstr "" + +#. type: Plain text +#: src/lib/base.en.conf:16 +msgid "export feed_pastebins_title=\"EuAndreh's pastebins\"" +msgstr "" + +#. type: Plain text +#: src/lib/base.en.conf:18 +msgid "export index_tils_title='TIL'" +msgstr "" + +#. type: Plain text +#: src/lib/base.en.conf:20 +msgid "export index_recent_tils_title='TIL listing'" +msgstr "" + +#. type: Plain text +#: src/lib/base.en.conf:22 +msgid "export index_category_tils_title='TIL by category'" +msgstr "" + +#. type: Plain text +#: src/lib/base.en.conf:24 +msgid "export feed_tils_title=\"EuAndreh's TIL\"" +msgstr "" + +#. type: Plain text +#: src/lib/base.en.conf:26 msgid "export about='About'" msgstr "" #. type: Plain text -#: src/lib/base.en.conf:7 +#: src/lib/base.en.conf:28 msgid "export about_url_name='about.html'" msgstr "" +#. type: Plain text +#: src/lib/base.en.conf:30 +msgid "export homepage_url=\"$(url-for \"$lang/\")\"" +msgstr "" + +#. type: Plain text +#: src/lib/base.en.conf:32 +msgid "export homepage_url_absolute=\"$(absolute \"$homepage_url\")\"" +msgstr "" + +#. type: Plain text +#: src/lib/base.en.conf:33 +msgid "export about_url=\"$(url-for \"$lang/$about_url_name\")\"" +msgstr "" + #. type: Content of: <p> #: src/lib/comment.en.html:3 msgid "" @@ -48,7 +158,7 @@ msgstr "" #. type: Plain text #: src/content/en/about.md:1 src/content/en/about.md:5 #: src/content/en/pastebins/sicp-exercise-3-19.md:1 -#: src/content/en/pastebins/sicp-exercise-3-19.md:7 +#: src/content/en/pastebins/sicp-exercise-3-19.md:9 #, no-wrap msgid "---\n" msgstr "" @@ -74,12 +184,17 @@ msgid "date: 2021-09-02" msgstr "" #. type: Plain text -#: src/content/en/pastebins/sicp-exercise-3-19.md:10 +#: src/content/en/pastebins/sicp-exercise-3-19.md:8 +msgid "categories: lisp programming-languages" +msgstr "" + +#. type: Plain text +#: src/content/en/pastebins/sicp-exercise-3-19.md:12 msgid "Some content here, before:" msgstr "" #. type: Plain text -#: src/content/en/pastebins/sicp-exercise-3-19.md:20 +#: src/content/en/pastebins/sicp-exercise-3-19.md:22 #, no-wrap msgid "" "```scheme\n" @@ -94,12 +209,12 @@ msgid "" msgstr "" #. type: Plain text -#: src/content/en/pastebins/sicp-exercise-3-19.md:22 +#: src/content/en/pastebins/sicp-exercise-3-19.md:24 msgid "Sample interactive session:" msgstr "" #. type: Plain text -#: src/content/en/pastebins/sicp-exercise-3-19.md:39 +#: src/content/en/pastebins/sicp-exercise-3-19.md:41 #, no-wrap msgid "" "```scheme\n" @@ -121,87 +236,87 @@ msgid "" msgstr "" #. type: Plain text -#: src/content/en/pastebins/sicp-exercise-3-19.md:41 +#: src/content/en/pastebins/sicp-exercise-3-19.md:43 msgid "# An h1" msgstr "" #. type: Plain text -#: src/content/en/pastebins/sicp-exercise-3-19.md:43 +#: src/content/en/pastebins/sicp-exercise-3-19.md:45 msgid "a list:" msgstr "" #. type: Bullet: '1. ' -#: src/content/en/pastebins/sicp-exercise-3-19.md:47 +#: src/content/en/pastebins/sicp-exercise-3-19.md:49 msgid "one" msgstr "" #. type: Bullet: '2. ' -#: src/content/en/pastebins/sicp-exercise-3-19.md:47 +#: src/content/en/pastebins/sicp-exercise-3-19.md:49 msgid "two" msgstr "" #. type: Bullet: '3. ' -#: src/content/en/pastebins/sicp-exercise-3-19.md:47 +#: src/content/en/pastebins/sicp-exercise-3-19.md:49 msgid "three" msgstr "" #. type: Plain text -#: src/content/en/pastebins/sicp-exercise-3-19.md:49 +#: src/content/en/pastebins/sicp-exercise-3-19.md:51 msgid "some content." msgstr "" #. type: Bullet: '- ' -#: src/content/en/pastebins/sicp-exercise-3-19.md:53 +#: src/content/en/pastebins/sicp-exercise-3-19.md:55 msgid "item" msgstr "" #. type: Bullet: '- ' -#: src/content/en/pastebins/sicp-exercise-3-19.md:53 +#: src/content/en/pastebins/sicp-exercise-3-19.md:55 msgid "another" msgstr "" #. type: Bullet: '- ' -#: src/content/en/pastebins/sicp-exercise-3-19.md:53 +#: src/content/en/pastebins/sicp-exercise-3-19.md:55 msgid "yet another" msgstr "" #. type: Plain text -#: src/content/en/pastebins/sicp-exercise-3-19.md:55 +#: src/content/en/pastebins/sicp-exercise-3-19.md:57 msgid "## An h2" msgstr "" #. type: Plain text -#: src/content/en/pastebins/sicp-exercise-3-19.md:57 +#: src/content/en/pastebins/sicp-exercise-3-19.md:59 msgid "Xablau:" msgstr "" #. type: Plain text -#: src/content/en/pastebins/sicp-exercise-3-19.md:60 +#: src/content/en/pastebins/sicp-exercise-3-19.md:62 msgid "``` xupliu 1" msgstr "" #. type: Plain text -#: src/content/en/pastebins/sicp-exercise-3-19.md:63 +#: src/content/en/pastebins/sicp-exercise-3-19.md:65 msgid "3 4" msgstr "" #. type: Plain text -#: src/content/en/pastebins/sicp-exercise-3-19.md:70 +#: src/content/en/pastebins/sicp-exercise-3-19.md:72 msgid "dez ```" msgstr "" #. type: Plain text -#: src/content/en/pastebins/sicp-exercise-3-19.md:72 +#: src/content/en/pastebins/sicp-exercise-3-19.md:74 msgid "Foi `wikiwiu`." msgstr "" #. type: Plain text -#: src/content/en/pastebins/sicp-exercise-3-19.md:74 +#: src/content/en/pastebins/sicp-exercise-3-19.md:76 msgid "a very long code block:" msgstr "" #. type: Plain text -#: src/content/en/pastebins/sicp-exercise-3-19.md:80 +#: src/content/en/pastebins/sicp-exercise-3-19.md:82 #, no-wrap msgid "" "```\n" @@ -212,26 +327,26 @@ msgid "" msgstr "" #. type: Plain text -#: src/content/en/pastebins/sicp-exercise-3-19.md:82 +#: src/content/en/pastebins/sicp-exercise-3-19.md:84 msgid "Someone said:" msgstr "" #. type: Plain text -#: src/content/en/pastebins/sicp-exercise-3-19.md:84 +#: src/content/en/pastebins/sicp-exercise-3-19.md:86 msgid "> Xablau, xupliu." msgstr "" #. type: Plain text -#: src/content/en/pastebins/sicp-exercise-3-19.md:87 +#: src/content/en/pastebins/sicp-exercise-3-19.md:89 msgid "### A repeated header ### A repeated header" msgstr "" #. type: Plain text -#: src/content/en/pastebins/sicp-exercise-3-19.md:89 +#: src/content/en/pastebins/sicp-exercise-3-19.md:91 msgid "a big list:" msgstr "" #. type: Bullet: '1. ' -#: src/content/en/pastebins/sicp-exercise-3-19.md:107 +#: src/content/en/pastebins/sicp-exercise-3-19.md:109 msgid "a" msgstr "" diff --git a/v2/src/bin/absolute b/v2/src/bin/absolute index ecf5a64..f475901 100755 --- a/v2/src/bin/absolute +++ b/v2/src/bin/absolute @@ -5,7 +5,7 @@ set -eu usage() { cat <<-'EOF' Usage: - absolute < STDIN + absolute [CONTENT...] absolute -h EOF } @@ -16,9 +16,13 @@ help() { Options: -h, --help show this message + CONTENT a literal string to be prefixed - Read URL from STDIN and adds the FQDN prefix. Meant to be used - in conjunction with `url-for`. + + Add domain prefix to build a full URL. If CONTENT is not given, + get data from STDIN. + + Usually used in conjunction with url-for(1). Examples: @@ -27,6 +31,12 @@ help() { $ url-for 'static/style.css' | absolute https://euandre.org/static/style.css + + + Get the absolute variant of a relative URL: + + $ absolute "$homepage_url" + https://euandre.org/pt/ EOF } @@ -64,4 +74,16 @@ shift $((OPTIND - 1)) . src/lib/base.conf -printf 'https://%s%s' "$domain" "$(cat)" + +prefix() { + sed "s|^/\?|https://$domain/|" +} + + +if [ $# = 0 ]; then + prefix +else + for s in "$@"; do + printf '%s\n' "$s" | prefix + done +fi diff --git a/v2/src/bin/categories b/v2/src/bin/categories new file mode 100755 index 0000000..bc08704 --- /dev/null +++ b/v2/src/bin/categories @@ -0,0 +1,80 @@ +#!/bin/sh +set -eu + +usage() { + cat <<-'EOF' + Usage: + categories FILENAME + categories -h + EOF +} + +help() { + cat <<-'EOF' + Options: + -h, --help show this message + + FILENAME the target categories index to be built + + + Generate FILENAME as the indexed list of articles by category. + + + Examples: + + Generate the index.categories entry for english pastebins: + + $ categories src/en/pastebins/index.categories + EOF +} + + +for flag in "$@"; do + case "$flag" in + --) + break + ;; + --help) + usage + help + exit + ;; + *) + ;; + esac +done + +while getopts 'h' flag; do + case "$flag" in + h) + usage + help + exit + ;; + *) + usage >&2 + exit 2 + ;; + esac +done +shift $((OPTIND - 1)) + +. src/lib.sh + +FILENAME="${1:-}" +eval "$(assert_arg "$FILENAME" 'FILENAME')" +DIR="$(dirname "$FILENAME")" + + +mkdir -p "$DIR" +printf '' > "$FILENAME" +find "$DIR"/*.categorysort 2>/dev/null | + awk -F. '{ print $(NF-1) }' | + sort | + uniq | + while read -r category; do + find "$DIR"/*."$category".categorysort | + sort -nr | + xargs cat > "$DIR/$category.category" + printf '%s\n' "$category" >> "$FILENAME" + done diff --git a/v2/src/bin/category b/v2/src/bin/category new file mode 100755 index 0000000..2a2fdea --- /dev/null +++ b/v2/src/bin/category @@ -0,0 +1,80 @@ +#!/bin/sh +set -eu + +usage() { + cat <<-'EOF' + Usage: + category FILENAME + html -h + EOF +} + +help() { + cat <<-'EOF' + + + Options: + -h, --help show this message + + FILENAME the name of the input file .md file + + + Process the FILENAME, and generate a the derived category files. + + + Examples: + + Generate the categories for a pastebin: + + $ categories src/a-paste.md > src/a-paste.categoryentry + EOF +} + + +for f in "$@"; do + case "$f" in + --) + break + ;; + --help) + usage + help + exit + ;; + *) + ;; + esac +done + +while getopts 'h' flag; do + case "$flag" in + h) + usage + help + exit + ;; + *) + usage >&2 + exit 2 + ;; + esac +done +shift $((OPTIND - 1)) + +. src/lib.sh + +FILENAME="${1:-}" +eval "$(assert_arg "$FILENAME" 'FILENAME')" + + +# shellcheck source=/dev/null +. "${FILENAME%.md}.conf" +DIR="$(dirname "$FILENAME")" + + + +echo "${categories:-}" | tr ' ' '\n' | grep . | while read -r category; do + echo "$FILENAME" > "$DIR/${date_iso:?}.$category.categorysort" +done + +envsubst < src/lib/category.html diff --git a/v2/src/bin/collection-for b/v2/src/bin/collection-for new file mode 100755 index 0000000..b3fc211 --- /dev/null +++ b/v2/src/bin/collection-for @@ -0,0 +1,83 @@ +#!/bin/sh +set -eu + +usage() { + cat <<-'EOF' + Usage: + collection-for FILE + collection-for -h + EOF +} + +help() { + cat <<-'EOF' + + + Options: + -h, --help show this message + + FILE the path of the file to get the collection for + + + Say the collection of the given file, using the path of FILE. + + + Examples: + + Get "tils" for "src/en/tils/some-pt.md": + + $ collection-for src/en/tils/some-pt.md + tils + EOF +} + + +for flag in "$@"; do + case "$flag" in + --) + break + ;; + --help) + usage + help + exit + ;; + *) + ;; + esac +done + +while getopts 'h' flag; do + case "$flag" in + h) + usage + help + exit + ;; + *) + usage >&2 + exit 2 + ;; + esac +done +shift $((OPTIND - 1)) + +. src/lib.sh + + +FILE="${1:-}" +eval "$(assert_arg "$FILE" 'FILE')" + + +# echo "${FILE#"$CONTENT_PREFIX"/}" | cut -d/ -f1 +# echo "${FILE#"$CONTENT_PREFIX"/}" | awk '{ + # awk -F/ '$3 && $0=$2 { print; next } $0' + +ATTEMPT="$(echo "${FILE#"$CONTENT_PREFIX"/}" | cut -d/ -f2-)" + +if [ "$ATTEMPT" = 'index.html' ]; then + echo articles +else + NAME="$(echo "$ATTEMPT" | cut -d/ -f1)" + collections | grep "$NAME" +fi diff --git a/v2/src/bin/conf b/v2/src/bin/conf index 5717039..62ef97a 100755 --- a/v2/src/bin/conf +++ b/v2/src/bin/conf @@ -5,7 +5,7 @@ set -eu usage() { cat <<-'EOF' Usage: - conf FILENAME + conf [FILENAME] conf -h EOF } @@ -21,7 +21,8 @@ help() { Separate the content from the "frontmatter", and emit the - selected one, given the FILENAME. + selected one, given the FILENAME. If FILENAME is not given, + generate the global config. Examples: @@ -65,11 +66,36 @@ shift $((OPTIND - 1)) . src/lib.sh + FILENAME="${1:-}" -eval "$(assert_arg "$FILENAME" 'FILENAME')" +if [ -z "$FILENAME" ]; then + printf 'export style_url="%s"\n' "$(url-for 'style.css')" + printf 'export pubkey_url="%s"\n' "$(url-for 'public.asc.txt')" + printf 'export pubkey_id="%s"\n' "$( + LANG=C.UTF-8 gpg --list-key "$EMAIL" | + awk 'NR==2 { print substr($1, length($1) - 15) }' | + shesc + )" + + for f in "$CONTENT_PREFIX"/img/*.svg; do + name="$(basename "$f" .svg | sed 's|-|_|g')" + printf 'export icon_%s_url="%s"\n' "$name" "$(url-for "img/$(basename "$f")")" + done + for l in $(langs); do + for f in "$CONTENT_PREFIX"/img/*.svg; do + name="$(basename "$f" .svg | sed 's|-|_|g')" + printf 'export icon_%s_alt="%s"\n' "$name" "$(shesc < "$CONTENT_PREFIX/img/alt/$(basename "$f" .svg).$l.txt" )" + done > src/lib/generated."$l".conf + done + exit +fi + +lang="$(lang-for "$FILENAME")" +export lang -tee "$FILENAME".tmp < src/lib/base.conf +cat src/lib/base.conf src/lib/generated.conf src/lib/generated."$lang".conf | + tee "$FILENAME".tmp DELIMITER=0 while read -r line; do if [ "$line" = '---' ]; then @@ -92,14 +118,17 @@ done < "$FILENAME" | tee -a "$FILENAME".tmp rm -f "$FILENAME".tmp +collection="$(collection-for "$FILENAME" ||:)" +if [ -n "$collection" ]; then + export collection + printf 'export collection="%s"\n' "$collection" +fi + if [ -z "${layout:-}" ]; then - if [ "$(dirname "$(dirname "$FILENAME")")" = "$CONTENT_PREFIX" ]; then + if [ -z "$collection" ]; then layout=page else layout=post - collection="$(basename "$(dirname "$FILENAME")")" - export collection - printf 'export collection="%s"\n' "$collection" custom_layout="$(echo "$LAYOUTS" | grep . | awk -v coll="$collection" '$1 == coll { print $2 }' @@ -131,10 +160,10 @@ if [ -n "${date:-}" ]; then formatted_date="$(LANG="$lang" date -ud "${date:?}" +"${date_fmt:?}")" export formatted_date + printf 'export formatted_date_html="%s"\n' "$(htmlesc "$formatted_date" | shesc)" printf 'export date_html="%s"\n' "$(envsubst < src/lib/date."$lang".html | shesc)" - echo "${FILENAME%.md}.xmlentry" > "$(dirname "$FILENAME")/$date_iso.sortdata" - touch "${FILENAME%.md}.sortref" + echo "$FILENAME" > "$(dirname "$FILENAME")/$date_iso.sortdata" fi if [ -n "${update:-}" ]; then @@ -149,31 +178,19 @@ if [ -n "${update:-}" ]; then fi -url_part="$(printf '%s' "${FILENAME%.md}.html" | sed "s|^$CONTENT_PREFIX||")" +url_part="$(printf '%s' "${FILENAME%.md}.html" | sed "s|^$CONTENT_PREFIX/||")" +url="$(url-for "$url_part")" title_uri="$(uri "$title")" printf 'export title_html="%s"\n' "$(printf '%s' "$title" | htmlesc | shesc)" printf 'export filename="%s"\n' "$FILENAME" printf 'export url_part="%s"\n' "$url_part" -printf 'export url="%s"\n' "$(url-for "$url_part" | absolute)" +printf 'export url="%s"\n' "$url" +printf 'export url_absolute="%s"\n' "$(absolute "$url")" printf 'export mailto_uri="%s%s"\n' "${mailto_uri_prefix:?}" "$title_uri" printf 'export discussions_url="%s%s"\n' "${discussions_url_prefix:?}" "$title_uri" printf 'export sourcecode_url="%s%s"\n' "${sourcecode_url_prefix:?}" "$FILENAME" -printf 'export style_url="%s"\n' "$(url-for 'style.css')" -printf 'export favicon_url="%s"\n' "$(url-for 'favicon.svg')" -printf 'export pubkey_url="%s"\n' "$(url-for 'public.asc.txt')" - -for f in "$CONTENT_PREFIX"/img/*.svg; do - name="$(basename "$f" .svg | sed 's|-|_|g')" - printf 'export icon_%s_url="%s"\n' "$name" "$(url-for "img/$(basename "$f")")" -done - -# FIXME: special treatment of root -printf 'export homepage_url="%s"\n' "$(url-for '/')" - -printf 'export about_url="%s"\n' "$(url-for "${about_url_name:?}")" - if [ "${layout:-}" = 'post' ]; then export mailto_uri="$mailto_uri_prefix$title_uri" diff --git a/v2/src/bin/feed b/v2/src/bin/feed index 0488c86..52c6199 100755 --- a/v2/src/bin/feed +++ b/v2/src/bin/feed @@ -27,7 +27,7 @@ help() { Generate a feed for TILs: - $ feed src/en/feeds/til.xml + $ feed src/en/tils/feed.xml EOF } @@ -68,24 +68,44 @@ FILENAME="${1:-}" eval "$(assert_arg "$FILENAME" 'FILENAME')" -COLLECTION="$(basename "$FILENAME" '.xml')" -LANGUAGE="$(lang-for "$FILENAME")" -DIR="$(dirname "$(dirname "$FILENAME")")/$COLLECTION" - - . src/lib/base.conf # shellcheck source=/dev/null -. src/lib/base."$LANGUAGE".conf +. src/lib/base."$(lang-for "$FILENAME")".conf + now="$(date -uIs)" -url="$(url-for "${FILENAME#"$CONTENT_PREFIX"}" | absolute)" +url_absolute="$(url-for "${FILENAME#"$CONTENT_PREFIX"/}" | absolute)" site_name_html="$(htmlesc "${site_name:?}")" -export now url site_name_html +collection="$(collection-for "$FILENAME")" +collection_url_absolute="$(url-for "${lang:?}/$collection/" | absolute)" +feed_title_html="$(eval "echo \"\$feed_${collection}_title\"" | htmlesc)" +export now url_absolute site_name_html collection_url_absolute feed_title_html - -mkdir -p "$(dirname "$FILENAME")" +DIR="$(dirname "$FILENAME")" +mkdir -p "$DIR" { envsubst < src/lib/feed.xml - find "$DIR"/*.sortdata 2>/dev/null | sort -nr | xargs cat | xargs cat + find "$DIR"/*.sortdata 2>/dev/null | + sort -nr | + xargs cat | + sed 's|\.md$|.xmlentry|' | + xargs cat printf '</feed>\n' } > "$FILENAME" + +printf '' > "$DIR"/index.extrafeeds +while read -r category; do + url_absolute="$(url-for "${DIR#"$CONTENT_PREFIX"/}/feed.$category.xml" | absolute)" + collection_url_absolute="$(url-for "${DIR#"$CONTENT_PREFIX"/}/${by_category_url_part:?}#$category" | absolute)" + feed_title_html="$(eval "echo \"\$index_category_${collection}_title\"" | htmlesc)" + export url_absolute collection_url_absolute feed_title_html + + { + envsubst < src/lib/feed.xml + < "$DIR/$category.category" \ + sed 's|\.md$|.xmlentry|' | + xargs cat + printf '</feed>\n' + } > "$DIR/feed.$category.xml" + echo "$DIR/feed.$category.xml" >> "$DIR"/index.extrafeeds +done < "$DIR"/index.categories diff --git a/v2/src/bin/index b/v2/src/bin/index new file mode 100755 index 0000000..36750b3 --- /dev/null +++ b/v2/src/bin/index @@ -0,0 +1,128 @@ +#!/bin/sh +set -eu + +usage() { + cat <<-'EOF' + Usage: + collection FILENAME + collection -h + EOF +} + +help() { + cat <<-'EOF' + Options: + -h, --help show this message + + FILENAME the target collection HTML page to be generated + + + Generate FILENAME as a collection index. The collection type + and language are inferred by the name of FILENAME. + + + Examples: + + Generate an index.html entry for english pastebins: + + $ collection src/en/pastebins/index.html + EOF +} + + +for flag in "$@"; do + case "$flag" in + --) + break + ;; + --help) + usage + help + exit + ;; + *) + ;; + esac +done + +while getopts 'h' flag; do + case "$flag" in + h) + usage + help + exit + ;; + *) + usage >&2 + exit 2 + ;; + esac +done +shift $((OPTIND - 1)) + +. src/lib.sh + +FILENAME="${1:-}" +eval "$(assert_arg "$FILENAME" 'FILENAME')" +DIR="$(dirname "$FILENAME")" + + +l="$(lang-for "$FILENAME")" +. src/lib/base.conf +. src/lib/generated.conf +# shellcheck source=/dev/null +. src/lib/generated."$l".conf +# shellcheck source=/dev/null +. src/lib/base."$l".conf + +url_part="$(printf '%s' "${FILENAME#"$CONTENT_PREFIX"/}" | sed "s|\.md$|.html|")" +url_absolute="$(url-for "$url_part" | absolute)" +collection="$(collection-for "$FILENAME")" +feed_url="$(url-for "${DIR#"$CONTENT_PREFIX"/}"/feed.xml)" +by_category_url="$(url-for "${DIR#"$CONTENT_PREFIX"/}/${by_category_url_part:?}")" +title_html="$(eval "echo \"\$index_${collection}_title\"" | htmlesc)" +index_recent_title_html="$(eval "echo \"\$index_recent_${collection}_title\"" | htmlesc)" +index_category_title_html="$(eval "echo \"\$index_category_${collection}_title\"" | htmlesc)" +export url_absolute feed_url by_category_url title_html index_recent_title_html \ + index_category_title_html + + + +mkdir -p "$DIR" +{ + cat src/lib/preamble.html src/lib/index-preamble.html | envsubst + find "$DIR"/*.sortdata 2>/dev/null | + sort -nr | + xargs cat | + sed 's|\.md$|.indexentry|' | + xargs cat + cat src/lib/index-postamble.html src/lib/postamble.html | envsubst +} > "$FILENAME" + + +CATEGORY_FILENAME="$CONTENT_PREFIX$by_category_url" +echo "$CATEGORY_FILENAME" > "${FILENAME%.html}.extrahtml" + +url_absolute="$(absolute "$by_category_url")" +title_html="$(eval "echo \"\$index_category_${collection}_title\"" | htmlesc)" +export url_absolute title_html + + +DIR="$(dirname "$CATEGORY_FILENAME")" +mkdir -p "$DIR" +{ + envsubst < src/lib/preamble.html + while read -r category; do + feed_url="$(url-for "${DIR#"$CONTENT_PREFIX"/}/feed.$category.xml")" + index_recent_title_html="$category" + export category feed_url index_recent_title_html + + envsubst < src/lib/category-header.html + echo ' <ul>' + < "$DIR/$category.category" \ + sed 's|\.md$|.categoryentry|' | + xargs cat + echo ' </ul>' + done < "$DIR"/index.categories + envsubst < src/lib/postamble.html +} > "$CATEGORY_FILENAME" diff --git a/v2/src/bin/indexentry b/v2/src/bin/indexentry new file mode 100755 index 0000000..03bf771 --- /dev/null +++ b/v2/src/bin/indexentry @@ -0,0 +1,73 @@ +#!/bin/sh +set -eu + +usage() { + cat <<-'EOF' + Usage: + indexentry FILENAME + indexentry -h + EOF +} + +help() { + cat <<-'EOF' + + + Options: + -h, --help show this message + + FILENAME the name of the input .md file + + + Process FILE, and generate an index collection entry. + + + Examples: + + Generate the index entry for a TIL: + + $ indexentry src/tils/a-til.md > src/tils/a-til.indexentry + EOF +} + + +for flag in "$@"; do + case "$flag" in + --) + break + ;; + --help) + usage + help + exit + ;; + *) + ;; + esac +done + +while getopts 'h' flag; do + case "$flag" in + h) + usage + help + exit + ;; + *) + usage >&2 + exit 2 + ;; + esac +done +shift $((OPTIND - 1)) + +. src/lib.sh + +FILENAME="${1:-}" +eval "$(assert_arg "$FILENAME" 'FILENAME')" + + +# shellcheck source=/dev/null +. "${FILENAME%.md}.conf" + +envsubst < src/lib/entry.html diff --git a/v2/src/bin/makemake b/v2/src/bin/makemake index 665bb84..20fd6dd 100755 --- a/v2/src/bin/makemake +++ b/v2/src/bin/makemake @@ -74,7 +74,8 @@ EXTENSIONS=' ' COLL_EXTENSIONS=' -.sortref +.categoryentry +.indexentry .xmlentry ' @@ -116,16 +117,20 @@ for lang in $(langs); do exts | sed "s|^\(.*\)\$|\$($c.$lang\1)|" | varlist "$c.$lang" mds | sed 's/^\(.*\)\.md$/\1.conf \1.content: \1.md/' - mds | sed 's/^\(.*\)\.md$/\1.snippets \1.htmlbody \1.html: \1.conf \1.content/' + mds | sed 's/^\(.*\)\.md$/\1.categoryentry \1.indexentry \1.html: \1.conf \1.content/' + mds | sed 's/^\(.*\)\.md$/\1.snippets \1.htmlbody: \1.html/' if [ "$c" = 'pages' ]; then continue fi - mds | sed 's/^\(.*\)\.md$/\1.sortref: \1.md/' - mds | sed 's/^\(.*\)\.md$/\1.xmlentry: \1.html/' + mds | sed 's/^\(.*\)\.md$/\1.xmlentry: \1.htmlbody/' - echo "$CONTENT_PREFIX/$lang/feeds/$c.xml: \$($c.$lang.xmlentry)" + echo "$CONTENT_PREFIX/$lang/$c/index.categories: \$($c.$lang.categoryentry)" + echo "$CONTENT_PREFIX/$lang/$c/index.html: \$($c.$lang.indexentry) $CONTENT_PREFIX/$lang/$c/index.categories" + echo "$CONTENT_PREFIX/$lang/$c/feed.xml: \$($c.$lang.xmlentry) $CONTENT_PREFIX/$lang/$c/index.categories" + echo "$CONTENT_PREFIX/$lang/$c/index.extrahtml: $CONTENT_PREFIX/$lang/$c/index.html" + echo "$CONTENT_PREFIX/$lang/$c/index.extrafeeds: $CONTENT_PREFIX/$lang/$c/feed.xml" printf '\n\n' done @@ -141,17 +146,33 @@ for lang in $(langs); do done collections | - sed "s|^\(.*\)\$|$CONTENT_PREFIX/$lang/feeds/\1.xml|" | + sed "s|^\(.*\)\$|$CONTENT_PREFIX/$lang/\1/index.categories|" | + varlist "all-generated.$lang.categories" + + collections | + sed "s|^\(.*\)\$|$CONTENT_PREFIX/$lang/\1/index.extrahtml|" | + varlist "all-generated.$lang.extrahtml" + + collections | + sed "s|^\(.*\)\$|$CONTENT_PREFIX/$lang/\1/index.extrafeeds|" | + varlist "all-generated.$lang.extrafeeds" + + collections | + sed "s|^\(.*\)\$|$CONTENT_PREFIX/$lang/\1/index.html|" | + varlist "all-generated.$lang.index" + + collections | + sed "s|^\(.*\)\$|$CONTENT_PREFIX/$lang/\1/feed.xml|" | varlist "all-generated.$lang.xml" - extensions '.xml' | + extensions '.categories' '.extrahtml' '.extrafeeds' '.index' '.xml' | sed "s|^\(.*\)\$|\$(all-generated.$lang\1)|" | varlist "all-generated.$lang" printf '\n' done -for e in $(extensions .xml); do +for e in $(extensions '.categories' '.extrahtml' '.extrafeeds' '.index' '.xml'); do langs | sed "s|^\(.*\)\$|\$(all-generated.\1$e)|" | varlist "all-generated$e" diff --git a/v2/src/content/en/pastebins/raku-tuple-type-annotation.md b/v2/src/content/en/pastebins/raku-tuple-type-annotation.md index 5877470..6c13b39 100644 --- a/v2/src/content/en/pastebins/raku-tuple-type-annotation.md +++ b/v2/src/content/en/pastebins/raku-tuple-type-annotation.md @@ -4,6 +4,8 @@ title: Raku tuple type annotation date: 2019-12-29 +categories: raku programming-languages + --- ```perl diff --git a/v2/src/content/en/pastebins/sicp-exercise-3-19.md b/v2/src/content/en/pastebins/sicp-exercise-3-19.md index 3188dce..32f7aa9 100644 --- a/v2/src/content/en/pastebins/sicp-exercise-3-19.md +++ b/v2/src/content/en/pastebins/sicp-exercise-3-19.md @@ -4,6 +4,8 @@ title: SICP exercise 3.19 date: 2021-09-02 +categories: lisp programming-languages + --- Some content here, before: diff --git a/v2/src/content/en/tils/lisp-three-way-conditional.md b/v2/src/content/en/tils/lisp-three-way-conditional.md index cd7a034..20fbd09 100644 --- a/v2/src/content/en/tils/lisp-three-way-conditional.md +++ b/v2/src/content/en/tils/lisp-three-way-conditional.md @@ -6,6 +6,8 @@ date: 2021-04-24 3 update: 2021-08-14 +categories: lisp scheme common-lisp + --- A useful macro from Paul Graham's [On Lisp][on-lisp] book: diff --git a/v2/src/content/img/alt/atom.en.txt b/v2/src/content/img/alt/atom.en.txt new file mode 100644 index 0000000..33bc955 --- /dev/null +++ b/v2/src/content/img/alt/atom.en.txt @@ -0,0 +1 @@ +three yellow lines representing an Atom feed diff --git a/v2/src/content/img/alt/atom.pt.txt b/v2/src/content/img/alt/atom.pt.txt new file mode 100644 index 0000000..33bc955 --- /dev/null +++ b/v2/src/content/img/alt/atom.pt.txt @@ -0,0 +1 @@ +three yellow lines representing an Atom feed diff --git a/v2/src/content/img/alt/envelope.en.txt b/v2/src/content/img/alt/envelope.en.txt new file mode 100644 index 0000000..8b72080 --- /dev/null +++ b/v2/src/content/img/alt/envelope.en.txt @@ -0,0 +1 @@ +an envelope icon representing an email address diff --git a/v2/src/content/img/alt/envelope.pt.txt b/v2/src/content/img/alt/envelope.pt.txt new file mode 100644 index 0000000..8b72080 --- /dev/null +++ b/v2/src/content/img/alt/envelope.pt.txt @@ -0,0 +1 @@ +an envelope icon representing an email address diff --git a/v2/src/content/img/alt/favicon.en.txt b/v2/src/content/img/alt/favicon.en.txt new file mode 100644 index 0000000..add8557 --- /dev/null +++ b/v2/src/content/img/alt/favicon.en.txt @@ -0,0 +1 @@ +a crude hand doing a thumbs up diff --git a/v2/src/content/img/alt/favicon.pt.txt b/v2/src/content/img/alt/favicon.pt.txt new file mode 100644 index 0000000..add8557 --- /dev/null +++ b/v2/src/content/img/alt/favicon.pt.txt @@ -0,0 +1 @@ +a crude hand doing a thumbs up diff --git a/v2/src/content/img/alt/link.en.txt b/v2/src/content/img/alt/link.en.txt new file mode 100644 index 0000000..bbf036f --- /dev/null +++ b/v2/src/content/img/alt/link.en.txt @@ -0,0 +1 @@ +two chain rings, representing an anchor to this header diff --git a/v2/src/content/img/alt/link.pt.txt b/v2/src/content/img/alt/link.pt.txt new file mode 100644 index 0000000..bbf036f --- /dev/null +++ b/v2/src/content/img/alt/link.pt.txt @@ -0,0 +1 @@ +two chain rings, representing an anchor to this header diff --git a/v2/src/content/img/alt/linkto.en.txt b/v2/src/content/img/alt/linkto.en.txt new file mode 100644 index 0000000..a192899 --- /dev/null +++ b/v2/src/content/img/alt/linkto.en.txt @@ -0,0 +1 @@ +a drawing of a box with an arrow going outwards, representing an internal link diff --git a/v2/src/content/img/alt/linkto.pt.txt b/v2/src/content/img/alt/linkto.pt.txt new file mode 100644 index 0000000..df3bbf7 --- /dev/null +++ b/v2/src/content/img/alt/linkto.pt.txt @@ -0,0 +1,2 @@ +a drawing of a box with an arrow going outwards, representing an internal +link diff --git a/v2/src/content/img/alt/lock.en.txt b/v2/src/content/img/alt/lock.en.txt new file mode 100644 index 0000000..b809247 --- /dev/null +++ b/v2/src/content/img/alt/lock.en.txt @@ -0,0 +1 @@ +a lock icon representing a GPG public key diff --git a/v2/src/content/img/alt/lock.pt.txt b/v2/src/content/img/alt/lock.pt.txt new file mode 100644 index 0000000..b809247 --- /dev/null +++ b/v2/src/content/img/alt/lock.pt.txt @@ -0,0 +1 @@ +a lock icon representing a GPG public key diff --git a/v2/src/content/img/atom.svg b/v2/src/content/img/atom.svg new file mode 100644 index 0000000..37bace2 --- /dev/null +++ b/v2/src/content/img/atom.svg @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg width="22" height="22" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"> + <path d="M576 1344q0 80-56 136t-136 56-136-56-56-136 56-136 136-56 136 56 56 136zm512 123q2 28-17 48-18 21-47 21h-135q-25 0-43-16.5t-20-41.5q-22-229-184.5-391.5t-391.5-184.5q-25-2-41.5-20t-16.5-43v-135q0-29 21-47 17-17 43-17h5q160 13 306 80.5t259 181.5q114 113 181.5 259t80.5 306zm512 2q2 27-18 47-18 20-46 20h-143q-26 0-44.5-17.5t-19.5-42.5q-12-215-101-408.5t-231.5-336-336-231.5-408.5-102q-25-1-42.5-19.5t-17.5-43.5v-143q0-28 20-46 18-18 44-18h3q262 13 501.5 120t425.5 294q187 186 294 425.5t120 501.5z" + fill="#EA990E" /> +</svg> diff --git a/v2/src/content/favicon.svg b/v2/src/content/img/favicon.svg index ce566b2..ce566b2 100644 --- a/v2/src/content/favicon.svg +++ b/v2/src/content/img/favicon.svg diff --git a/v2/src/content/img/linkto.svg b/v2/src/content/img/linkto.svg new file mode 100644 index 0000000..d4d9fe1 --- /dev/null +++ b/v2/src/content/img/linkto.svg @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8"?> +<svg width="22" height="22" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> + <path fill-rule="evenodd" + d="M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5z"/> + <path fill-rule="evenodd" + d="M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0v-5z"/> +</svg> diff --git a/v2/src/content/pt/pastebins/exercicios-sicp-e-19.md b/v2/src/content/pt/pastebins/exercicios-sicp-e-19.md index d4db88d..89dacfd 100644 --- a/v2/src/content/pt/pastebins/exercicios-sicp-e-19.md +++ b/v2/src/content/pt/pastebins/exercicios-sicp-e-19.md @@ -4,6 +4,8 @@ title: SICP exercise 3.19 date: 2021-09-02 +categories: lisp programming-languages + --- Some content here, before: diff --git a/v2/src/content/security.txt b/v2/src/content/security.txt deleted file mode 120000 index abdf74b..0000000 --- a/v2/src/content/security.txt +++ /dev/null @@ -1 +0,0 @@ -.well-known/security.txt
\ No newline at end of file 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 @@ + <h2 id="$category"> + <a href="#$category">$index_recent_title_html</a> + <a href="$feed_url"> + <img class="simple-icon" src="$icon_atom_url" alt="$icon_atom_alt" /> + </a> + </h2> 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 @@ + <li> + <a href="$url">$title_html</a> - $formatted_date_html + </li> 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 @@ + <li> + $formatted_date_html + <br /> + <a href="$url">$title_html</a> + </li> 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 type="html"> $title_html </title> - <link type="text/html" rel="alternative" href="$url" title="$title_html" /> + <link type="text/html" rel="alternative" href="$url_absolute" title="$title_html" /> <published> $date_iso </published> $update_xml <id> - $url + $url_absolute </id> <author> <name> 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"> - <link href="$url" rel="self" type="application/atom+xml" /> - <link href="$homepage_url" rel="alternate" type="text/html" hreflang="$lang" /> + <link href="$url_absolute" rel="self" type="application/atom+xml" /> + <link href="$collection_url_absolute" rel="alternate" type="text/html" hreflang="$lang" /> <title>$site_name_html</title> - <subtitle>{{ site.t[include.kind].feed.title[include.lang] | smartify | xml_escape }}</subtitle> - <id>$url</id> + <subtitle>$feed_title_html</subtitle> + <id>$url_absolute</id> <updated>$now</updated> <author> 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 @@ + </ul> + + <h2> + <a href="$by_category_url"> + $index_category_title_html + <img class="simple-icon" src="$icon_linkto_url" alt="$icon_linkto_alt" /> + </a> + </h2> 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 @@ + <h2> + $index_recent_title_html + <a href="$feed_url"> + <img class="simple-icon" src="$icon_atom_url" alt="$icon_atom_alt" /> + </a> + </h2> + <ul class="no-style"> 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 <hr /> <ul> <li> - <img class="svg-icon" src="$icon_envelope_url" alt="a envelope icon representing an email address" /> + <img class="svg-icon" src="$icon_envelope_url" alt="$icon_envelope_alt" /> <a href="mailto:$email">$email</a> </li> <li> - <img class="svg-icon" src="$icon_lock_url" alt="a lock icon representing a GPG public key" /> + <img class="svg-icon" src="$icon_lock_url" alt="$icon_lock_alt" /> <a href="$pubkey_url">$pubkey_id</a> </li> </ul> <p> - The content for this site is licensed under <a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a>. The <a href="https://euandre.org/git/euandre.org">code</a> is <a rel="license" href="https://euandre.org/git/euandre.org/tree/COPYING">AGPLv3 or later</a>. Patches welcome. + The content for this site is licensed under + <a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</a>. + The <a href="https://euandre.org/git/euandre.org">code</a> is + <a rel="license" href="https://euandre.org/git/euandre.org/tree/COPYING">AGPLv3 or later</a>. + Patches welcome. </p> </footer> </body> 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 @@ <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <link rel="stylesheet" type="text/css" href="$style_url" /> - <link rel="icon" type="image/svg+xml" href="$favicon_url" /> + <link rel="icon" type="image/svg+xml" href="$icon_favicon_url" /> <title>$title_html</title> @@ -13,8 +13,8 @@ <meta property="og:locale" content="$lang" /> <meta property="og:title" content="$title_html" /> - <link rel="canonical" href="$url" /> - <meta property="og:url" content="$url" /> + <link rel="canonical" href="$url_absolute" /> + <meta property="og:url" content="$url_absolute" /> </head> <body> <header> diff --git a/v2/src/redirect.mappings b/v2/src/redirect.mappings index 6945e89..6701b19 100644 --- a/v2/src/redirect.mappings +++ b/v2/src/redirect.mappings @@ -1 +1,3 @@ index.html en/index.html +favicon.svg img/favicon.svg +security.txt .well-known/security.txt |