Commits: 4
Present devlogs in reverse chronological order
So latest entries first. I think it makes more sense that way, so readers can easily see what happened recently. Otherwise they would have to scroll through a lot of historical entries.
index d80af22..f75a753 100644
--- a/templates/project.html
+++ b/templates/project.html
@@ -28,7 +28,7 @@
= {# NOTE: If there is no devlog, then the heading will be hidden using CSS #}
= <h2 id="devlog-heading">Devlog</h2>
=
- {\% for entry in devlog.pages %}
+ {\% for entry in devlog.pages | sort(attribute="date") | reverse %}
= {\% if entry.extra.projects is containing(page.title) %}
= <section class="devlog-entry">
= <h3><time datetime="{\{ entry.date \}}">{\{ entry.date | date(format="%A, %F")\}}</time></h3>Update Nix dependencies
index 03cb250..4cee253 100644
--- a/flake.lock
+++ b/flake.lock
@@ -20,11 +20,11 @@
= },
= "nixpkgs": {
= "locked": {
- "lastModified": 1775036866,
- "narHash": "sha256-ZojAnPuCdy657PbTq5V0Y+AHKhZAIwSIT2cb8UgAz/U=",
+ "lastModified": 1776169885,
+ "narHash": "sha256-l/iNYDZ4bGOAFQY2q8y5OAfBBtrDAaPuRQqWaFHVRXM=",
= "owner": "NixOS",
= "repo": "nixpkgs",
- "rev": "6201e203d09599479a3b3450ed24fa81537ebc4e",
+ "rev": "4bd9165a9165d7b5e33ae57f3eecbcb28fb231c9",
= "type": "github"
= },
= "original": {Introduce craft taxonomy for projects
I want to highlight the crafts (like programming languages, frameworks, methodologies, tools and techniques) applied to each project. In Zola this is best expressed using taxonomies.
Each craft is listed in the project card and dedicated page. There is also a crafts list page under /crafts/ and each craft has a page listing projects it's applied to.
index e276ece..56a70c8 100644
--- a/config.toml
+++ b/config.toml
@@ -14,6 +14,10 @@ build_search_index = true
=generate_feeds = true
=feed_filenames = ["atom.xml", "rss.xml"]
=
+taxonomies = [
+ { name = "craft", render = true }
+]
+
=[markdown]
=bottom_footnotes = false
=index f55c819..fe4f05e 100644
--- a/content/works/tad-better-behavior/index.md
+++ b/content/works/tad-better-behavior/index.md
@@ -1,6 +1,12 @@
=---
=title: Tad Better Behavior
=weight: 0
+
+taxonomies:
+ craft:
+ - Rust
+ - Behavior Driven Development
+ - Command Line Tools
=---
=
=# TBB: Tad Better Behaviornew file mode 100644
index 0000000..59464a7
--- /dev/null
+++ b/templates/craft/list.html
@@ -0,0 +1,43 @@
+{\% extends "base.html" %}
+
+{\% block variables %}
+{\{ super() \}}
+{\% set page_class = "taxonomy crafts" %}
+{\% set title = "Tad Crafts" %}
+{\% set description = "Technologies, methods, techniques and skills I cultivate in my work." %}
+{\% endblock variables %}
+
+{\% block content %}
+<header>
+ <nav aria-label="breadcrumb">
+ <ul>
+ <li><a href="{\{ get_url(path='@/_index.md') \}}">Tad Lispy</a></li>
+ <li><strong>Crafts</strong></li>
+ </ul>
+ </nav>
+</header>
+
+<main>
+
+ <p>In my work I proudly cultivate the following crafts.</p>
+
+ {\% for craft in terms %}
+ <article class="craft-card">
+ <p><a href="{\{ craft.path \}}">{\{ craft.name \}}</a></p>
+ <p>
+ Practiced in {\{ craft.pages | length \}} featured
+ {\{ craft.pages | length | pluralize(singular="project", plural="project")\}}:
+
+ {\% for project in craft.pages %}
+ <a href="{\{ project.path \}}">{\{ project.title \}}</a>
+ {\% endfor %}
+ </p>
+
+ </article>
+ {\% endfor %}
+
+</main>
+
+{\% include "includes/footer.html" %}
+{\% endblock content %}
+new file mode 100644
index 0000000..3977306
--- /dev/null
+++ b/templates/craft/single.html
@@ -0,0 +1,39 @@
+{\% extends "base.html" %}
+
+{\% block variables %}
+{\{ super() \}}
+{\% set page_class = "taxonomy crafts" %}
+{\% set title = term.name %}
+{\% set description = "It's a craft." %}
+{\% endblock variables %}
+
+{\% block content %}
+<header>
+ <nav aria-label="breadcrumb">
+ <ul>
+ <li><a href="{\{ get_url(path='@/_index.md') \}}">Tad Lispy</a></li>
+ <li><a href="{\{ get_url(path='/craft/') \}}">Crafts</a></li>
+ <li><strong>{\{ term.name \}}</strong></li>
+ </ul>
+ </nav>
+</header>
+
+<main>
+
+ <p>
+ Practiced in {\{ term.pages | length \}} featured
+ {\{ term.pages | length | pluralize(singular="project", plural="project")\}}.
+ </p>
+
+ {\% for project in term.pages %}
+ <article>
+ <h2>{\{ project.title \}}</h2>
+ <p><a href="{\{ project.path \}}">Read more about {\{ project.title \}}</a> </p>
+ </article>
+ {\% endfor %}
+
+</main>
+
+{\% include "includes/footer.html" %}
+{\% endblock content %}
+index f75a753..eccccad 100644
--- a/templates/project.html
+++ b/templates/project.html
@@ -25,6 +25,13 @@
=
= {\{ page.content | safe \}}
=
+ <ul class="craft-list">
+ {\% for craft in page.taxonomies | get(key="craft", default=[]) %}
+
+ <li><a href="{\{ get_taxonomy_url(kind="craft", name=craft) \}}">{\{ craft \}}</a></li>
+ {\% endfor %}
+ </ul>
+
= {# NOTE: If there is no devlog, then the heading will be hidden using CSS #}
= <h2 id="devlog-heading">Devlog</h2>
=index ec1694f..49b18af 100644
--- a/templates/works.html
+++ b/templates/works.html
@@ -29,6 +29,12 @@
= {\% for project in section.pages %}
= <article>
= <h2>{\{ project.title \}}</h2>
+ <ul class="craft-list">
+ {\% for craft in project.taxonomies | get(key="craft", default=[]) %}
+
+ <li><a href="{\{ get_taxonomy_url(kind="craft", name=craft) \}}">{\{ craft \}}</a></li>
+ {\% endfor %}
+ </ul>
= <p><a href="{\{ project.path \}}">Read more about {\{ project.title \}}</a> </p>
= </article>
= {\% endfor %}Create two featured project pages
- Better Tech Club website
- Devlog Excavator
At this moment I mainly want to see how the new taxonomy will work with multiple projects. There are already some devlog entries for them, and they share some crafts, so these are good candidates to add. Later I'll list many more projects.
And of course as soon as I added them, I found a bug in pluralization :P
new file mode 100644
index 0000000..35bfae2
--- /dev/null
+++ b/content/works/better-tech-club-website/index.md
@@ -0,0 +1,15 @@
+---
+title: Better Tech Club website
+weight: 1
+taxonomies:
+ craft:
+ - Web Development
+ - No JS
+ - Modern CSS
+ - Handcrafted HTML
+ - Graphic Design
+---
+
+# Better Tech Club website
+
+<https://bettertechclub.eu>new file mode 100644
index 0000000..fe5fdff
--- /dev/null
+++ b/content/works/devlog-excavator/index.md
@@ -0,0 +1,16 @@
+---
+title: Devlog Excavator
+weight: 1
+
+taxonomies:
+ craft:
+ - Nushell
+ - Behavior Driven Development
+ - Command Line Tools
+ - Markdown processing
+---
+
+# Devlog Excavator
+
+I use it to excavate the content below, and in other projects listed on this site.
+index fe4f05e..aa74ada 100644
--- a/content/works/tad-better-behavior/index.md
+++ b/content/works/tad-better-behavior/index.md
@@ -7,6 +7,7 @@ taxonomies:
= - Rust
= - Behavior Driven Development
= - Command Line Tools
+ - Markdown processing
=---
=
=# TBB: Tad Better Behaviorindex 59464a7..c506e7a 100644
--- a/templates/craft/list.html
+++ b/templates/craft/list.html
@@ -26,7 +26,7 @@
= <p><a href="{\{ craft.path \}}">{\{ craft.name \}}</a></p>
= <p>
= Practiced in {\{ craft.pages | length \}} featured
- {\{ craft.pages | length | pluralize(singular="project", plural="project")\}}:
+ {\{ craft.pages | length | pluralize(singular="project", plural="projects")\}}:
=
= {\% for project in craft.pages %}
= <a href="{\{ project.path \}}">{\{ project.title \}}</a>index 3977306..67ab0de 100644
--- a/templates/craft/single.html
+++ b/templates/craft/single.html
@@ -22,7 +22,7 @@
=
= <p>
= Practiced in {\{ term.pages | length \}} featured
- {\{ term.pages | length | pluralize(singular="project", plural="project")\}}.
+ {\{ term.pages | length | pluralize(singular="project", plural="projects")\}}.
= </p>
=
= {\% for project in term.pages %}