aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2020-10-05 21:27:57 -0300
committerEuAndreh <eu@euandre.org>2020-10-10 14:31:24 -0300
commita7c4db7e9215694ef6c50debcc0b4e7402265687 (patch)
treed45b89f1758b34416e5157cb0e7404276c6fa49a
parentcargo2nix: Use overlay on example (diff)
downloadeuandre.org-a7c4db7e9215694ef6c50debcc0b4e7402265687.tar.gz
euandre.org-a7c4db7e9215694ef6c50debcc0b4e7402265687.tar.xz
Refactor i18n structure, remove layouts, add slides
Yep, this commit is too big big I didn't want to take the trouble of splitting it now. - _config.yml translation keys are now simetrical on the entitiy: articles, pastebins, tils, slides, etc.; - _posts were moved to _articles: the _posts collection had special treatment in Jekyll which I wanted to avoid; - the filtering of entries for the Atom feed is now done inside the _includes/feed.atom file instead of every feed file; - all entities are now dealt with using the pluralized name: articles, pastebins, tils, slides. No more inconsistencies on the key names, they now should only make sense as the translation value on the dictionary; - add base reveal.js infrastruture, with Jekyll generating the listing page and nothing else.
-rw-r--r--.gitignore1
-rw-r--r--.gitmodules3
-rw-r--r--.ignore1
-rw-r--r--_articles/2018-07-17-running-guix-on-nixos.md (renamed from _posts/2018-07-17-running-guix-on-nixos.md)0
-rw-r--r--_articles/2018-08-01-verifying-npm-ci-reproducibility.md (renamed from _posts/2018-08-01-verifying-npm-ci-reproducibility.md)0
-rw-r--r--_articles/2018-12-21-using-youtube-dl-to-manage-youtube-subscriptions.md (renamed from _posts/2018-12-21-using-youtube-dl-to-manage-youtube-subscriptions.md)0
-rw-r--r--_articles/2019-06-02-stateless-os.md (renamed from _posts/2019-06-02-stateless-os.md)0
-rw-r--r--_articles/2020-08-10-guix-inside-sourcehut-builds-sr-ht-ci.md (renamed from _posts/2020-08-10-guix-inside-sourcehut-builds-sr-ht-ci.md)0
-rw-r--r--_articles/2020-08-31-the-database-i-wish-i-had.md (renamed from _posts/2020-08-31-the-database-i-wish-i-had.md)0
-rw-r--r--_articles/2020-10-05-cargo2nix-dramatically-simpler-rust-in-nix.md (renamed from _posts/2020-10-05-cargo2nix-dramatically-simpler-rust-in-nix.md)2
-rw-r--r--_articles/2020-10-05-swift2nix-run-swift-inside-nix-builds.md (renamed from _posts/2020-10-05-swift2nix-run-swift-inside-nix-builds.md)0
-rw-r--r--_config.yml130
-rw-r--r--_data/slides.yml0
-rw-r--r--_includes/feed.atom5
-rw-r--r--_includes/link-listing.html15
-rw-r--r--_layouts/default.html11
-rw-r--r--_layouts/index.html19
-rw-r--r--_layouts/pastebins-listing.html12
l---------_layouts/til.html1
-rw-r--r--_layouts/tils-listing.html18
-rw-r--r--_tils/2020-08-12-nome-de-arquivo-com-timestamp-simplificado.md2
-rw-r--r--_tils/2020-08-12-simple-filname-timestamp.md2
-rw-r--r--_tils/2020-08-13-anchor-headers-and-code-lines-in-jekyll.md2
-rw-r--r--_tils/2020-08-14-browse-a-git-repository-at-a-specific-commit.md2
-rw-r--r--_tils/2020-08-16-search-in-git.md2
-rw-r--r--_tils/2020-08-28-grep-online-repositories.md2
-rw-r--r--_tils/2020-09-04-send-emails-using-the-command-line-for-fun-and-profit.md2
-rw-r--r--_tils/2020-09-05-pull-requests-with-git-the-oldschool-way.md2
-rw-r--r--a-propos.md2
-rw-r--r--about.md2
-rw-r--r--aja.md4
-rw-r--r--diapositives.md8
-rw-r--r--en/index.md4
-rw-r--r--eslaides.md8
-rw-r--r--feed.articles.en.atom3
-rw-r--r--feed.articles.fr.atom3
-rw-r--r--feed.articles.pt.atom3
-rw-r--r--feed.blog.en.atom4
-rw-r--r--feed.blog.fr.atom4
-rw-r--r--feed.blog.pt.atom4
-rw-r--r--feed.pastebins.en.atom3
-rw-r--r--feed.pastebins.fr.atom3
-rw-r--r--feed.pastebins.pt.atom3
-rw-r--r--feed.slides.en.atom3
-rw-r--r--feed.slides.fr.atom3
-rw-r--r--feed.slides.pt.atom3
-rw-r--r--feed.til.en.atom4
-rw-r--r--feed.til.fr.atom4
-rw-r--r--feed.til.pt.atom4
-rw-r--r--feed.tils.en.atom3
-rw-r--r--feed.tils.fr.atom3
-rw-r--r--feed.tils.pt.atom3
-rw-r--r--fr/index.md4
-rw-r--r--hea.md4
-rw-r--r--index.md4
-rw-r--r--pastebins.en.md8
-rw-r--r--pastebins.fr.md8
-rw-r--r--pastebins.md6
-rw-r--r--pastebins.pt.md8
-rw-r--r--pt/index.md4
-rwxr-xr-xscripts/assert-content.sh21
-rw-r--r--site.json67
-rw-r--r--sitemap.xml11
-rw-r--r--slides.md8
-rw-r--r--sobre.md2
-rw-r--r--spelling/en.txt2
-rw-r--r--templates/til.md2
-rw-r--r--til.md4
m---------vendor/reveal.js0
69 files changed, 309 insertions, 176 deletions
diff --git a/.gitignore b/.gitignore
index 0efa62a..476620d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,6 +3,5 @@
# Jekyll
/.bundle/
-/vendor/
/_site/
/.jekyll-cache/ \ No newline at end of file
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..6d301d9
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "vendor/reveal.js"]
+ path = vendor/reveal.js
+ url = https://github.com/hakimel/reveal.js
diff --git a/.ignore b/.ignore
new file mode 100644
index 0000000..243b77e
--- /dev/null
+++ b/.ignore
@@ -0,0 +1 @@
+/vendor/reveal.js/ \ No newline at end of file
diff --git a/_posts/2018-07-17-running-guix-on-nixos.md b/_articles/2018-07-17-running-guix-on-nixos.md
index e409f3c..e409f3c 100644
--- a/_posts/2018-07-17-running-guix-on-nixos.md
+++ b/_articles/2018-07-17-running-guix-on-nixos.md
diff --git a/_posts/2018-08-01-verifying-npm-ci-reproducibility.md b/_articles/2018-08-01-verifying-npm-ci-reproducibility.md
index ff983e5..ff983e5 100644
--- a/_posts/2018-08-01-verifying-npm-ci-reproducibility.md
+++ b/_articles/2018-08-01-verifying-npm-ci-reproducibility.md
diff --git a/_posts/2018-12-21-using-youtube-dl-to-manage-youtube-subscriptions.md b/_articles/2018-12-21-using-youtube-dl-to-manage-youtube-subscriptions.md
index a9a605b..a9a605b 100644
--- a/_posts/2018-12-21-using-youtube-dl-to-manage-youtube-subscriptions.md
+++ b/_articles/2018-12-21-using-youtube-dl-to-manage-youtube-subscriptions.md
diff --git a/_posts/2019-06-02-stateless-os.md b/_articles/2019-06-02-stateless-os.md
index 2614b44..2614b44 100644
--- a/_posts/2019-06-02-stateless-os.md
+++ b/_articles/2019-06-02-stateless-os.md
diff --git a/_posts/2020-08-10-guix-inside-sourcehut-builds-sr-ht-ci.md b/_articles/2020-08-10-guix-inside-sourcehut-builds-sr-ht-ci.md
index 3ce2acf..3ce2acf 100644
--- a/_posts/2020-08-10-guix-inside-sourcehut-builds-sr-ht-ci.md
+++ b/_articles/2020-08-10-guix-inside-sourcehut-builds-sr-ht-ci.md
diff --git a/_posts/2020-08-31-the-database-i-wish-i-had.md b/_articles/2020-08-31-the-database-i-wish-i-had.md
index 004a558..004a558 100644
--- a/_posts/2020-08-31-the-database-i-wish-i-had.md
+++ b/_articles/2020-08-31-the-database-i-wish-i-had.md
diff --git a/_posts/2020-10-05-cargo2nix-dramatically-simpler-rust-in-nix.md b/_articles/2020-10-05-cargo2nix-dramatically-simpler-rust-in-nix.md
index 4d4a8d5..d4b5a41 100644
--- a/_posts/2020-10-05-cargo2nix-dramatically-simpler-rust-in-nix.md
+++ b/_articles/2020-10-05-cargo2nix-dramatically-simpler-rust-in-nix.md
@@ -7,7 +7,7 @@ ref: cargo2nix-dramatically-simpler-rust-in-nix
---
In the same vein of my earlier post on
-[swift2nix]({% post_url 2020-10-05-swift2nix-run-swift-inside-nix-builds %}), I
+[swift2nix]({% link _articles/2020-10-05-swift2nix-run-swift-inside-nix-builds.md %}), I
was able to quickly prototype a Rust and Cargo variation of it:
[cargo2nix][cargo2nix].
diff --git a/_posts/2020-10-05-swift2nix-run-swift-inside-nix-builds.md b/_articles/2020-10-05-swift2nix-run-swift-inside-nix-builds.md
index 7960b8b..7960b8b 100644
--- a/_posts/2020-10-05-swift2nix-run-swift-inside-nix-builds.md
+++ b/_articles/2020-10-05-swift2nix-run-swift-inside-nix-builds.md
diff --git a/_config.yml b/_config.yml
index 2ec298c..134e719 100644
--- a/_config.yml
+++ b/_config.yml
@@ -33,65 +33,113 @@ exclude:
- description
collections:
+ articles:
+ output: true
+ permalink: /:year/:month/:day/:title:output_ext
pastebins:
output: true
- permalink: /pastebin/:title:output_ext
+ permalink: /pastebin/:year/:month/:day/:title:output_ext
tils:
output: true
permalink: /til/:year/:month/:day/:title:output_ext
+ slides:
+ permalink: /slides/:year/:month/:day/:title:output_ext
t:
description:
en: "EuAndreh's website"
pt: "Site do EuAndreh"
fr: "Site d'EuAndreh"
- blog_url:
- en: "en/index.md"
- pt: "pt/index.md"
- fr: "fr/index.md"
- about:
- en: "About"
- pt: "Sobre"
- fr: "À propos"
- about_url:
- en: "about.md"
- pt: "sobre.md"
- fr: "a-propos.md"
- til:
- en: "TIL"
- pt: "HEA"
- fr: "AJA"
- til_url:
- en: "til.md"
- pt: "hea.md"
- fr: "aja.md"
- til_listing:
- en: "TIL Listing"
- pt: "Lista de HEA"
- fr: "Liste de AJA"
- recent_posts:
- en: "Recent posts"
- pt: "Postagens recentes"
- fr: "Postes récent"
- feed:
- title:
- blog:
+ pages:
+ about:
+ name:
+ en: "About"
+ pt: "Sobre"
+ fr: "À propos"
+ url:
+ en: "about.md"
+ pt: "sobre.md"
+ fr: "a-propos.md"
+ articles:
+ name:
+ en: "<web>EuAndreh</web>"
+ pt: "<web>EuAndreh</web>"
+ fr: "<web>EuAndreh</web>"
+ url:
+ en: "en/index.md"
+ pt: "pt/index.md"
+ fr: "fr/index.md"
+ listing:
+ en: "Recent posts"
+ pt: "Postagens recentes"
+ fr: "Postes récent"
+ feed:
+ title:
en: "EuAndreh's blog"
pt: "Blog do EuAndreh"
fr: "Blogue d'EuAndreh"
- til:
+ url:
+ en: "feed.articles.en.atom"
+ pt: "feed.articles.pt.atom"
+ fr: "feed.articles.fr.atom"
+ pastebins:
+ listing:
+ en: "Pastings listing"
+ pt: "Lista de pastebins"
+ fr: "Liste de pastebins"
+ feed:
+ title:
+ en: "EuAndreh's pastebins"
+ pt: "Pastebins do EuAndreh"
+ fr: "Pastebins d'EuAndreh"
+ url:
+ en: "feed.pastebins.en.atom"
+ pt: "feed.pastebins.pt.atom"
+ fr: "feed.pastebins.fr.atom"
+ tils:
+ name:
+ en: "TIL"
+ pt: "HEA"
+ fr: "AJA"
+ url:
+ en: "til.md"
+ pt: "hea.md"
+ fr: "aja.md"
+ listing:
+ en: "TIL Listing"
+ pt: "Lista de HEA"
+ fr: "Liste de AJA"
+ feed:
+ title:
en: "EuAndreh's TIL"
pt: "HEA do EuAndreh"
fr: "AJA d'EuAndreh"
+ url:
+ en: "feed.tils.en.atom"
+ pt: "feed.tils.pt.atom"
+ fr: "feed.tils.fr.atom"
+ slides:
+ name:
+ en: "Slides"
+ pt: "Eslaides"
+ fr: "Diapositives"
url:
- blog:
- en: "feed.blog.en.atom"
- pt: "feed.blog.pt.atom"
- fr: "feed.blog.fr.atom"
- til:
- en: "feed.til.en.atom"
- pt: "feed.til.pt.atom"
- fr: "feed.til.fr.atom"
+ en: "slides.md"
+ pt: "eslaides.md"
+ fr: "diapositives.md"
+ listing:
+ en: "Slides Listing"
+ pt: "Lista de Eslaides"
+ fr: "Liste des Diapositives"
+ feed:
+ title:
+ en: "EuAndreh's slides"
+ pt: "Slides do EuAndreh"
+ fr: "Diapositives d'EuAndreh"
+ url:
+ en: "feed.slides.en.atom"
+ pt: "feed.slides.pt.atom"
+ fr: "feed.slides.fr.atom"
posted_on:
en: "Posted on"
pt: "Postado em"
diff --git a/_data/slides.yml b/_data/slides.yml
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/_data/slides.yml
diff --git a/_includes/feed.atom b/_includes/feed.atom
index 511611f..53a0897 100644
--- a/_includes/feed.atom
+++ b/_includes/feed.atom
@@ -5,14 +5,15 @@
<id>{{ page.url | absolute_url | xml_escape }}</id>
<title>{{ site.title | xml_escape }}</title>
- <subtitle>{{ site.t.feed.title[include.kind][include.lang] | smartify | xml_escape }}</subtitle>
+ <subtitle>{{ site.t[include.kind].feed.title[include.lang] | smartify | xml_escape }}</subtitle>
<author>
<name>{{ site.author.name | xml_escape }}</name>
<email>{{ site.author.email | xml_escape }}</email>
</author>
- {% for entry in include.entries %}
+ {% assign entries = include.entries | where:"lang", page.lang | sort: "date" | reverse %}
+ {% for entry in entries %}
<entry xml:lang="{{ entry.lang }}">
<title type="html">{{ entry.title | smartify | strip_html | normalize_whitespace | xml_escape }}</title>
<link href="{{ entry.url | absolute_url }}" rel="alternate" type="text/html" title="{{ entry.title | xml_escape }}" />
diff --git a/_includes/link-listing.html b/_includes/link-listing.html
new file mode 100644
index 0000000..2828efb
--- /dev/null
+++ b/_includes/link-listing.html
@@ -0,0 +1,15 @@
+<h2>
+ {{ site.t[include.kind].listing[page.lang] }}
+ <a href="{% link {{ site.t[include.kind].feed.url[page.lang] }} %}">
+ <img class="simple-icon" src="/images/atom.svg" alt="{{ site.t.alt.atom[page.lang] }}" />
+ </a>
+</h2>
+
+<ul>
+ {% assign entries = include.entries | where:"lang", page.lang | sort: "date" | reverse %}
+ {% for entry in entries %}
+ <li>
+ <a href="{{ entry.url | relative_url }}">{{ entry.title | escape }}</a> - {% include i18n-date.html date=entry.date %}
+ </li>
+ {% endfor %}
+</ul>
diff --git a/_layouts/default.html b/_layouts/default.html
index 5eac517..ea12a36 100644
--- a/_layouts/default.html
+++ b/_layouts/default.html
@@ -4,8 +4,8 @@
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="/styles.css" />
- <link rel="alternate" type="application/atom+xml" href="{% link {{ site.t.feed.url.blog[page.lang] }} %}" hreflang="{{ page.lang}}" title="{{ site.t.feed.title.blog[page.lang] }}" />
- <link rel="alternate" type="application/atom+xml" href="{% link {{ site.t.feed.url.til[page.lang] }} %}" hreflang="{{ page.lang}}" title="{{ site.t.feed.title.til[page.lang] }}" />
+ <link rel="alternate" type="application/atom+xml" href="{% link {{ site.t.articles.feed.url[page.lang] }} %}" hreflang="{{ page.lang}}" title="{{ site.t.articles.feed.title[page.lang] }}" />
+ <link rel="alternate" type="application/atom+xml" href="{% link {{ site.t.tils.feed.url[page.lang] }} %}" hreflang="{{ page.lang}}" title="{{ site.t.til.feed.title[page.lang] }}" />
<title>{{ page.title }} - EuAndreh</title>
<meta property="og:site_name" content="{{ site.title }}" />
@@ -35,7 +35,7 @@
<header>
<nav>
<div id="nav-left">
- <a href="{% link {{ site.t.blog_url[page.lang] }} %}">&lt;web&gt;EuAndreh&lt;/web&gt;</pre></a>
+ <a href="{% link {{ site.t.articles.url[page.lang] }} %}">{{ site.t.articles.name[page.lang] }}</pre></a>
</div>
<div id="nav-right">
{% if page.ref != nil %}
@@ -66,8 +66,9 @@
{% endfor %}
</ul>
{% endif %}
- <a href="{% link {{ site.t.til_url[page.lang] }} %}">{{ site.t.til[page.lang] }}</a>
- <a href="{% link {{ site.t.about_url[page.lang] }} %}">{{ site.t.about[page.lang] }}</a>
+ <a href="{% link {{ site.t.tils.url[page.lang] }} %}">{{ site.t.tils.name[page.lang] }}</a>
+ <a href="{% link {{ site.t.slides.url[page.lang] }} %}">{{ site.t.slides.name[page.lang] }}</a>
+ <a href="{% link {{ site.t.pages.about.url[page.lang] }} %}">{{ site.t.pages.about.name[page.lang] }}</a>
</div>
</nav>
</header>
diff --git a/_layouts/index.html b/_layouts/index.html
deleted file mode 100644
index 3b0f281..0000000
--- a/_layouts/index.html
+++ /dev/null
@@ -1,19 +0,0 @@
----
-layout: default
----
-<h2>
- {{ site.t.recent_posts[page.lang] }}
- <a href="{% link {{ site.t.feed.url.blog[page.lang] }} %}">
- <img class="simple-icon" src="/images/atom.svg" alt="{{ site.t.alt.atom[page.lang] }}" />
- </a>
-</h2>
-{% assign lposts=site.posts | where:"lang", page.lang | sort: 'date' | reverse %}
-{% if lposts.size > 0 %}
- <ul>
- {%- for post in lposts -%}
- <li>
- <a href="{{ post.url }}">{{ post.title | escape }}</a> - {% include i18n-date.html date=post.date %}
- </li>
- {%- endfor -%}
- </ul>
-{% endif %}
diff --git a/_layouts/pastebins-listing.html b/_layouts/pastebins-listing.html
deleted file mode 100644
index 0c4a993..0000000
--- a/_layouts/pastebins-listing.html
+++ /dev/null
@@ -1,12 +0,0 @@
----
-layout: default
----
-<h2>Pastebins listing</h2>
-<ul>
- {% assign pastebins = site.pastebins | sort: "date" | reverse %}
- {%- for pastebin in pastebins -%}
- <li>
- <a href="{{ pastebin.url | relative_url }}">{{ pastebin.title | escape }}</a> - {% include i18n-date.html date=pastebin.date %}
- </li>
- {%- endfor -%}
-</ul>
diff --git a/_layouts/til.html b/_layouts/til.html
deleted file mode 120000
index d6d72cf..0000000
--- a/_layouts/til.html
+++ /dev/null
@@ -1 +0,0 @@
-post.html \ No newline at end of file
diff --git a/_layouts/tils-listing.html b/_layouts/tils-listing.html
deleted file mode 100644
index 0a59a19..0000000
--- a/_layouts/tils-listing.html
+++ /dev/null
@@ -1,18 +0,0 @@
----
-layout: default
----
-<h2>
- {{ site.t.til_listing[page.lang] }}
- <a href="{% link {{ site.t.feed.url.til[page.lang] }} %}">
- <img class="simple-icon" src="/images/atom.svg" alt="{{ site.t.alt.atom[page.lang] }}" />
- </a>
-</h2>
-{{ content }}
-<ul>
- {% assign tils = site.tils | where:"lang", page.lang | sort: "date" | reverse %}
- {%- for til in tils -%}
- <li>
- <a href="{{ til.url | relative_url }}">{{ til.title | escape }}</a> - {% include i18n-date.html date=til.date %}
- </li>
- {%- endfor -%}
-</ul>
diff --git a/_tils/2020-08-12-nome-de-arquivo-com-timestamp-simplificado.md b/_tils/2020-08-12-nome-de-arquivo-com-timestamp-simplificado.md
index ecbc094..9603464 100644
--- a/_tils/2020-08-12-nome-de-arquivo-com-timestamp-simplificado.md
+++ b/_tils/2020-08-12-nome-de-arquivo-com-timestamp-simplificado.md
@@ -2,7 +2,7 @@
title: Nome de arquivo com timestamp simplificado
date: 2020-08-12
updated_at: 2020-09-04
-layout: til
+layout: post
lang: pt
ref: simple-filename-timestamp
---
diff --git a/_tils/2020-08-12-simple-filname-timestamp.md b/_tils/2020-08-12-simple-filname-timestamp.md
index 2678088..a02c70b 100644
--- a/_tils/2020-08-12-simple-filname-timestamp.md
+++ b/_tils/2020-08-12-simple-filname-timestamp.md
@@ -1,7 +1,7 @@
---
title: Simple filename timestamp
date: 2020-08-12
-layout: til
+layout: post
lang: en
ref: simple-filename-timestamp
---
diff --git a/_tils/2020-08-13-anchor-headers-and-code-lines-in-jekyll.md b/_tils/2020-08-13-anchor-headers-and-code-lines-in-jekyll.md
index bd8a072..6566928 100644
--- a/_tils/2020-08-13-anchor-headers-and-code-lines-in-jekyll.md
+++ b/_tils/2020-08-13-anchor-headers-and-code-lines-in-jekyll.md
@@ -1,7 +1,7 @@
---
title: Anchor headers and code lines in Jekyll
date: 2020-08-13
-layout: til
+layout: post
lang: en
ref: anchor-headers-and-code-lines-in-jekyll
---
diff --git a/_tils/2020-08-14-browse-a-git-repository-at-a-specific-commit.md b/_tils/2020-08-14-browse-a-git-repository-at-a-specific-commit.md
index 8676fcb..3f47772 100644
--- a/_tils/2020-08-14-browse-a-git-repository-at-a-specific-commit.md
+++ b/_tils/2020-08-14-browse-a-git-repository-at-a-specific-commit.md
@@ -1,7 +1,7 @@
---
title: Browse a git repository at a specific commit
date: 2020-08-14
-layout: til
+layout: post
lang: en
ref: browse-a-git-repository-at-a-specific-commit
---
diff --git a/_tils/2020-08-16-search-in-git.md b/_tils/2020-08-16-search-in-git.md
index 552370b..75b63d8 100644
--- a/_tils/2020-08-16-search-in-git.md
+++ b/_tils/2020-08-16-search-in-git.md
@@ -1,7 +1,7 @@
---
title: Search in git
date: 2020-08-16
-layout: til
+layout: post
lang: en
ref: search-in-git
---
diff --git a/_tils/2020-08-28-grep-online-repositories.md b/_tils/2020-08-28-grep-online-repositories.md
index 7860df3..9b95eb2 100644
--- a/_tils/2020-08-28-grep-online-repositories.md
+++ b/_tils/2020-08-28-grep-online-repositories.md
@@ -1,7 +1,7 @@
---
title: Grep online repositories
date: 2020-08-28
-layout: til
+layout: post
lang: en
ref: grep-online-repositories
---
diff --git a/_tils/2020-09-04-send-emails-using-the-command-line-for-fun-and-profit.md b/_tils/2020-09-04-send-emails-using-the-command-line-for-fun-and-profit.md
index 2f9eaef..4a0e4a0 100644
--- a/_tils/2020-09-04-send-emails-using-the-command-line-for-fun-and-profit.md
+++ b/_tils/2020-09-04-send-emails-using-the-command-line-for-fun-and-profit.md
@@ -1,7 +1,7 @@
---
title: Send emails using the command line for fun and profit!
date: 2020-09-04
-layout: til
+layout: post
lang: en
ref: send-emails-using-the-command-line-for-fun-and-profit
---
diff --git a/_tils/2020-09-05-pull-requests-with-git-the-oldschool-way.md b/_tils/2020-09-05-pull-requests-with-git-the-oldschool-way.md
index ceb8207..ce14009 100644
--- a/_tils/2020-09-05-pull-requests-with-git-the-oldschool-way.md
+++ b/_tils/2020-09-05-pull-requests-with-git-the-oldschool-way.md
@@ -1,7 +1,7 @@
---
title: Pull requests with Git, the old school way
date: 2020-09-05
-layout: til
+layout: post
lang: en
ref: pull-requests-with-git-the-oldschool-way
---
diff --git a/a-propos.md b/a-propos.md
index 23405b4..c4855c2 100644
--- a/a-propos.md
+++ b/a-propos.md
@@ -27,4 +27,4 @@ regrouper-les en utilisant LaTeX dans recueils de chansons.
## Autres
-[Liste de pastebins](./pastebins.html) (en anglais).
+[Liste de pastebins]({% link pastebins.fr.md %}).
diff --git a/about.md b/about.md
index d203f15..dd5b4c3 100644
--- a/about.md
+++ b/about.md
@@ -26,4 +26,4 @@ LaTeX sources into songbooks.
## Other things
-[Pastebins listing](./pastebins.html).
+[Pastebins listing]({% link pastebins.en.md %}).
diff --git a/aja.md b/aja.md
index 6bf3a42..cfdbd7b 100644
--- a/aja.md
+++ b/aja.md
@@ -1,6 +1,6 @@
---
title: Aujourd'hui J' Appris
-layout: tils-listing
+layout: page
lang: fr
ref: tils
---
@@ -8,3 +8,5 @@ ref: tils
petites postes de connaissances utiles.
Copie éhontée de [Anna e só](https://til.flourishing.stream/).
+
+{% include link-listing.html entries=site.tils kind="tils" %}
diff --git a/diapositives.md b/diapositives.md
new file mode 100644
index 0000000..4604c75
--- /dev/null
+++ b/diapositives.md
@@ -0,0 +1,8 @@
+---
+title: Diapositives
+layout: page
+lang: fr
+ref: slides
+---
+
+{% include link-listing.html entries=site.data.slides kind="slides" %}
diff --git a/en/index.md b/en/index.md
index d46fd7e..e717fcf 100644
--- a/en/index.md
+++ b/en/index.md
@@ -1,6 +1,8 @@
---
title: Blog
-layout: index
+layout: page
lang: en
ref: index
---
+
+{% include link-listing.html entries=site.articles kind="articles" %}
diff --git a/eslaides.md b/eslaides.md
new file mode 100644
index 0000000..22a65f6
--- /dev/null
+++ b/eslaides.md
@@ -0,0 +1,8 @@
+---
+title: Eslaides
+layout: page
+lang: pt
+ref: slides
+---
+
+{% include link-listing.html entries=site.data.slides kind="slides" %}
diff --git a/feed.articles.en.atom b/feed.articles.en.atom
new file mode 100644
index 0000000..929e9c8
--- /dev/null
+++ b/feed.articles.en.atom
@@ -0,0 +1,3 @@
+---
+---
+{% include feed.atom entries=site.articles kind="articles" lang="en" %}
diff --git a/feed.articles.fr.atom b/feed.articles.fr.atom
new file mode 100644
index 0000000..929e9c8
--- /dev/null
+++ b/feed.articles.fr.atom
@@ -0,0 +1,3 @@
+---
+---
+{% include feed.atom entries=site.articles kind="articles" lang="en" %}
diff --git a/feed.articles.pt.atom b/feed.articles.pt.atom
new file mode 100644
index 0000000..f4f58ca
--- /dev/null
+++ b/feed.articles.pt.atom
@@ -0,0 +1,3 @@
+---
+---
+{% include feed.atom entries=site.articles kind="articles" lang="pt" %}
diff --git a/feed.blog.en.atom b/feed.blog.en.atom
deleted file mode 100644
index f4ac787..0000000
--- a/feed.blog.en.atom
+++ /dev/null
@@ -1,4 +0,0 @@
----
----
-{% assign lposts = site.posts | where:"lang", "en" | sort: "date" | reverse %}
-{% include feed.atom entries=lposts kind="blog" lang="en" %} \ No newline at end of file
diff --git a/feed.blog.fr.atom b/feed.blog.fr.atom
deleted file mode 100644
index bd30392..0000000
--- a/feed.blog.fr.atom
+++ /dev/null
@@ -1,4 +0,0 @@
----
----
-{% assign lposts = site.posts | where:"lang", "fr" | sort: "date" | reverse %}
-{% include feed.atom entries=lposts kind="blog" lang="en" %} \ No newline at end of file
diff --git a/feed.blog.pt.atom b/feed.blog.pt.atom
deleted file mode 100644
index b697b28..0000000
--- a/feed.blog.pt.atom
+++ /dev/null
@@ -1,4 +0,0 @@
----
----
-{% assign lposts = site.posts | where:"lang", "pt" | sort: "date" | reverse %}
-{% include feed.atom entries=lposts kind="blog" lang="pt" %}
diff --git a/feed.pastebins.en.atom b/feed.pastebins.en.atom
new file mode 100644
index 0000000..ea7e4bd
--- /dev/null
+++ b/feed.pastebins.en.atom
@@ -0,0 +1,3 @@
+---
+---
+{% include feed.atom entries=site.pastebins kind="pastebins" lang="en" %}
diff --git a/feed.pastebins.fr.atom b/feed.pastebins.fr.atom
new file mode 100644
index 0000000..ea7e4bd
--- /dev/null
+++ b/feed.pastebins.fr.atom
@@ -0,0 +1,3 @@
+---
+---
+{% include feed.atom entries=site.pastebins kind="pastebins" lang="en" %}
diff --git a/feed.pastebins.pt.atom b/feed.pastebins.pt.atom
new file mode 100644
index 0000000..ea7e4bd
--- /dev/null
+++ b/feed.pastebins.pt.atom
@@ -0,0 +1,3 @@
+---
+---
+{% include feed.atom entries=site.pastebins kind="pastebins" lang="en" %}
diff --git a/feed.slides.en.atom b/feed.slides.en.atom
new file mode 100644
index 0000000..96c6155
--- /dev/null
+++ b/feed.slides.en.atom
@@ -0,0 +1,3 @@
+---
+---
+{% include feed.atom entries=site.data.slides kind="slides" lang="en" %}
diff --git a/feed.slides.fr.atom b/feed.slides.fr.atom
new file mode 100644
index 0000000..96c6155
--- /dev/null
+++ b/feed.slides.fr.atom
@@ -0,0 +1,3 @@
+---
+---
+{% include feed.atom entries=site.data.slides kind="slides" lang="en" %}
diff --git a/feed.slides.pt.atom b/feed.slides.pt.atom
new file mode 100644
index 0000000..96c6155
--- /dev/null
+++ b/feed.slides.pt.atom
@@ -0,0 +1,3 @@
+---
+---
+{% include feed.atom entries=site.data.slides kind="slides" lang="en" %}
diff --git a/feed.til.en.atom b/feed.til.en.atom
deleted file mode 100644
index 2c64b8e..0000000
--- a/feed.til.en.atom
+++ /dev/null
@@ -1,4 +0,0 @@
----
----
-{% assign ltils = site.tils | where:"lang", "en" | sort: "date" | reverse %}
-{% include feed.atom entries=ltils kind="til" lang="en" %} \ No newline at end of file
diff --git a/feed.til.fr.atom b/feed.til.fr.atom
deleted file mode 100644
index 7ed3a8d..0000000
--- a/feed.til.fr.atom
+++ /dev/null
@@ -1,4 +0,0 @@
----
----
-{% assign ltils = site.tils | where:"lang", "fr" | sort: "date" | reverse %}
-{% include feed.atom entries=ltils kind="til" lang="en" %} \ No newline at end of file
diff --git a/feed.til.pt.atom b/feed.til.pt.atom
deleted file mode 100644
index 9d07150..0000000
--- a/feed.til.pt.atom
+++ /dev/null
@@ -1,4 +0,0 @@
----
----
-{% assign ltils = site.tils | where:"lang", "pt" | sort: "date" | reverse %}
-{% include feed.atom entries=ltils kind="til" lang="pt" %}
diff --git a/feed.tils.en.atom b/feed.tils.en.atom
new file mode 100644
index 0000000..97be510
--- /dev/null
+++ b/feed.tils.en.atom
@@ -0,0 +1,3 @@
+---
+---
+{% include feed.atom entries=site.tils kind="tils" lang="en" %}
diff --git a/feed.tils.fr.atom b/feed.tils.fr.atom
new file mode 100644
index 0000000..97be510
--- /dev/null
+++ b/feed.tils.fr.atom
@@ -0,0 +1,3 @@
+---
+---
+{% include feed.atom entries=site.tils kind="tils" lang="en" %}
diff --git a/feed.tils.pt.atom b/feed.tils.pt.atom
new file mode 100644
index 0000000..d646e94
--- /dev/null
+++ b/feed.tils.pt.atom
@@ -0,0 +1,3 @@
+---
+---
+{% include feed.atom entries=site.tils kind="tils" lang="pt" %}
diff --git a/fr/index.md b/fr/index.md
index 45bef71..c713bad 100644
--- a/fr/index.md
+++ b/fr/index.md
@@ -1,6 +1,8 @@
---
title: Blogue
-layout: index
+layout: page
lang: fr
ref: index
---
+
+{% include link-listing.html entries=site.articles kind="articles" %}
diff --git a/hea.md b/hea.md
index e670542..e78caa5 100644
--- a/hea.md
+++ b/hea.md
@@ -1,9 +1,11 @@
---
title: Hoje Eu Aprendi
-layout: tils-listing
+layout: page
lang: pt
ref: tils
---
**H**oje **E**u **A**prendi (do inglês, _**T**oday **I** **L**earned_): pequenas postagens de conhecimentos úteis.
Cópia descarada da [Anna e só](https://til.flourishing.stream/).
+
+{% include link-listing.html entries=site.tils kind="tils" %}
diff --git a/index.md b/index.md
index 38de926..4458d96 100644
--- a/index.md
+++ b/index.md
@@ -1,6 +1,8 @@
---
title: Blog
-layout: index
+layout: page
lang: en
ref: root
---
+
+{% include link-listing.html entries=site.posts kind="articles" %}
diff --git a/pastebins.en.md b/pastebins.en.md
new file mode 100644
index 0000000..974e540
--- /dev/null
+++ b/pastebins.en.md
@@ -0,0 +1,8 @@
+---
+title: Pastebins
+layout: page
+lang: en
+ref: pastebins
+---
+
+{% include link-listing.html entries=site.pastebins kind="pastebins" %}
diff --git a/pastebins.fr.md b/pastebins.fr.md
new file mode 100644
index 0000000..2ea6258
--- /dev/null
+++ b/pastebins.fr.md
@@ -0,0 +1,8 @@
+---
+title: Pastebins
+layout: page
+lang: fr
+ref: pastebins
+---
+
+{% include link-listing.html entries=site.pastebins kind="pastebins" %}
diff --git a/pastebins.md b/pastebins.md
deleted file mode 100644
index 4c3fbc0..0000000
--- a/pastebins.md
+++ /dev/null
@@ -1,6 +0,0 @@
----
-title: Pastebins
-layout: pastebins-listing
-lang: en
-ref: pastebins
----
diff --git a/pastebins.pt.md b/pastebins.pt.md
new file mode 100644
index 0000000..fcece8a
--- /dev/null
+++ b/pastebins.pt.md
@@ -0,0 +1,8 @@
+---
+title: Pastebins
+layout: page
+lang: pt
+ref: pastebins
+---
+
+{% include link-listing.html entries=site.pastebins kind="pastebins" %}
diff --git a/pt/index.md b/pt/index.md
index 11b92e2..ee6eb0a 100644
--- a/pt/index.md
+++ b/pt/index.md
@@ -1,6 +1,8 @@
---
title: Blog
-layout: index
+layout: page
lang: pt
ref: index
---
+
+{% include link-listing.html entries=site.articles kind="articles" %}
diff --git a/scripts/assert-content.sh b/scripts/assert-content.sh
index ab11183..8e30aca 100755
--- a/scripts/assert-content.sh
+++ b/scripts/assert-content.sh
@@ -131,6 +131,19 @@ for til in $(jq -r '.tils[] | @base64' "${JSON}"); do
}
done
+echo Lintins slides... >&2
+for slide in $(jq -r '.slides[] | @base64' "${JSON}"); do
+ assert-frontmatter "$slide"
+ DATE="$(get-date "$slide" | awk '{print $1}')"
+ URL="$(basename "$(get-url "$slide")")"
+ FILE="_slides/${DATE}-${URL%.html}.html"
+
+ [[ -f "${FILE}" ]] || {
+ red "date/filename mismatch: '${FILE}' does not exist."
+ exit 1
+ }
+done
+
echo Asserting unique refs... >&2
KNOWN_IDS=()
assert-unique-ref() {
@@ -153,9 +166,10 @@ assert-unique-ref() {
done
}
-assert-unique-ref "$(jq -r '.pages[] | @base64' "${JSON}")"
-assert-unique-ref "$(jq -r '.posts[] | @base64' "${JSON}")"
-assert-unique-ref "$(jq -r '.tils[] | @base64' "${JSON}")"
+assert-unique-ref "$(jq -r '.pages[] | @base64' "${JSON}")"
+assert-unique-ref "$(jq -r '.pastebins[] | @base64' "${JSON}")"
+assert-unique-ref "$(jq -r '.posts[] | @base64' "${JSON}")"
+assert-unique-ref "$(jq -r '.tils[] | @base64' "${JSON}")"
echo Asserting layouts... >&2
assert-layout() {
@@ -174,5 +188,6 @@ assert-layout() {
assert-layout "$(jq -r '.posts[] | @base64' "${JSON}")" "post"
assert-layout "$(jq -r '.pastebins[] | @base64' "${JSON}")" "pastebin"
assert-layout "$(jq -r '.tils[] | @base64' "${JSON}")" "til"
+assert-layout "$(jq -r '.slides[] | @base64' "${JSON}")" "slide"
echo Done. >&2
diff --git a/site.json b/site.json
index 2a27e8d..061eede 100644
--- a/site.json
+++ b/site.json
@@ -1,14 +1,33 @@
---
---
{
- "posts": [
- {% assign filtered_posts = "" | split:"" %}
- {% for post in site.posts %}
+ "pages": [
+ {% assign filtered_pages = "" | split:"" %}
+ {% for page in site.pages %}
+ {% unless page.plaintext %}
+ {% assign filtered_pages = filtered_pages | push:page %}
+ {% endunless %}
+ {% endfor %}
+ {% for page in filtered_pages %}
+ {
+ "title": "{{ page.title | smartify }}",
+ "url": "{{ page.url }}",
+ "lang": "{{ page.lang }}",
+ "ref": "{{ page.ref }}",
+ "plaintext": "{{ page.plaintext }}",
+ "layout": "{{ page.layout }}",
+ "content": {{ page.content | strip_html | jsonify }}
+ }{% unless forloop.last %},{% endunless %}
+ {% endfor %}
+ ],
+ "articles": [
+ {% assign filtered_articles = "" | split:"" %}
+ {% for post in site.articles %}
{% unless post.plaintext %}
- {% assign filtered_posts = filtered_posts | push:post %}
+ {% assign filtered_articles = filtered_articles | push:post %}
{% endunless %}
{% endfor %}
- {% for post in filtered_posts %}
+ {% for post in filtered_articles %}
{
"title": "{{ post.title | smartify }}",
"date": "{{ post.date }}",
@@ -20,25 +39,6 @@
}{% unless forloop.last %},{% endunless %}
{% endfor %}
],
- "pages": [
- {% assign filtered_pages = "" | split:"" %}
- {% for page in site.pages %}
- {% unless page.plaintext %}
- {% assign filtered_pages = filtered_pages | push:page %}
- {% endunless %}
- {% endfor %}
- {% for page in filtered_pages %}
- {
- "title": "{{ page.title | smartify }}",
- "url": "{{ page.url }}",
- "lang": "{{ page.lang }}",
- "ref": "{{ page.ref }}",
- "plaintext": "{{ page.plaintext }}",
- "layout": "{{ page.layout }}",
- "content": {{ page.content | strip_html | jsonify }}
- }{% unless forloop.last %},{% endunless %}
- {% endfor %}
- ],
"pastebins": [
{% assign filtered_pastebins = "" | split:"" %}
{% for pastebin in site.pastebins %}
@@ -76,5 +76,24 @@
"content": {{ til.content | strip_html | jsonify }}
}{% unless forloop.last %},{% endunless %}
{% endfor %}
+ ],
+ "slides": [
+ {% assign filtered_slides = "" | split:"" %}
+ {% for slide in site.data.slides %}
+ {% unless slide.plaintext %}
+ {% assign filtered_slides = filtered_slides | push:slide %}
+ {% endunless %}
+ {% endfor %}
+ {% for slide in site.slides %}
+ {
+ "title": "{{ slide.title | smartify }}",
+ "date": "{{ slide.date }}",
+ "url": "{{ slide.url }}",
+ "lang": "{{ slide.lang }}",
+ "ref": "{{ slide.ref }}",
+ "layout": "{{ slide.layout }}",
+ "content": {{ slide.content | strip_html | jsonify }}
+ }{% unless forloop.last %},{% endunless %}
+ {% endfor %}
]
}
diff --git a/sitemap.xml b/sitemap.xml
index 8f3aa6f..050bdb4 100644
--- a/sitemap.xml
+++ b/sitemap.xml
@@ -39,6 +39,17 @@
<loc>{{ site.url }}{{ til.url }}</loc>
{% assign versions=site.tils | where:"ref", til.ref %}
{% for version in versions %}
+ <xhtml:link rel="alternate" hreflang="{{ version.lang }}" href="{{ site.url }}{{ version.url }}" />
+ {% endfor %}
+ <changefreq>monthly</changefreq>
+ </url>
+ {% endfor %}
+
+ {% for slide in site.slides %}
+ <url>
+ <loc>{{ site.url }}{{ slide.url }}</loc>
+ {% assign versions=site.slides | where:"ref", slide.ref %}
+ {% for version in versions %}
<xhtml:link rel="alternate" hreflang="{{ version.lang }}" href="{{ site.url }}{{ version.url }}" />
{% endfor %}
<changefreq>monthly</changefreq>
diff --git a/slides.md b/slides.md
new file mode 100644
index 0000000..8c601ab
--- /dev/null
+++ b/slides.md
@@ -0,0 +1,8 @@
+---
+title: Slides
+layout: page
+lang: en
+ref: slides
+---
+
+{% include link-listing.html entries=site.data.slides kind="slides" %}
diff --git a/sobre.md b/sobre.md
index 2e57ed7..5da4f5f 100644
--- a/sobre.md
+++ b/sobre.md
@@ -27,4 +27,4 @@ usando LaTeX em songbooks e hinários.
## Outros
-[Lista de pastebins](./pastebins.html) (em inglês).
+[Lista de pastebins]({% link pastebins.pt.md %}).
diff --git a/spelling/en.txt b/spelling/en.txt
index 4744415..bebfc76 100644
--- a/spelling/en.txt
+++ b/spelling/en.txt
@@ -1,4 +1,6 @@
Patches
+Rollout
+Slides
aren
autocommit
backend
diff --git a/templates/til.md b/templates/til.md
index f4493c0..31d18fe 100644
--- a/templates/til.md
+++ b/templates/til.md
@@ -1,7 +1,7 @@
---
title: FIXME
date: 1970-01-01
-layout: til
+layout: post
lang: en
ref: FIXME
---
diff --git a/til.md b/til.md
index 0468ba0..e9b6f02 100644
--- a/til.md
+++ b/til.md
@@ -1,9 +1,11 @@
---
title: Today I Learned
-layout: tils-listing
+layout: page
lang: en
ref: tils
---
**T**oday **I** **L**earned: small entries of useful knowledge.
Shameless rip-off of [Anna e só](https://til.flourishing.stream/).
+
+{% include link-listing.html entries=site.tils kind="tils" %}
diff --git a/vendor/reveal.js b/vendor/reveal.js
new file mode 160000
+Subproject e09437f4fac47305679374d2b2516a76f6ceb89