Websites made with Conscientious are all about structure – Conscientious does not know websites without inherent structure. The base for this structure is the use of taxonomies.
It’s taxonomies all the way down
The first rule of Conscientious is simple:
For the average blogger, this might at first feel a bit unintuitive, if not inconvenient. However, it give us some handy benefits:
- Authors are forced to keep their content ordered, and consider the structure and relation to other content before posting
- The website becomes more than a linear series of posts (while it can still be read in a linear fashion if desiered)
Technical consequences
Conscientious relies on a clear mapping between taxonomies and content files when building pages. Starting with the front page, the theme iterates over known taxonomies and amends them with information from a respective section or page.
Given a taxonomies config like the following…
taxonomies = [
{ name="technologies", feed=true },
{ name="customers", feed=true },
]
…Conscientious expects a content tree like this:
content/
│ customers/
│ ├ cool-company
│ │ └ index.md
│ ├ horrific-company.md
│ │ └ index.md
│ └ _index.md
│ technologies/
│ ├ css
│ │ └ index.md
│ ├ html.md
│ │ └ index.md
│ └ _index.md
└ _index.md
As can be seen, we have two taxonomies (“customers” and “technologies”), and we have prepared two terms for each.
For those who have worked with taxonomies in Zola before, having sections and pages for each might look unexpected – that’s because, unlike Conscientious, other themes do not connect visual layout with taxonomies (they are merely used for tagging posts).
Conscientious, however, will use the special sections and pages to link visual content to the taxonomies:
- It will derive “display names” and descriptions from
the
titleanddescriptionfields of the pages - It will render a catalog of the taxonomies and terms on the frontpage, including titles, descriptions, and icons
- It will generate “cover pages” for each term, including the term’s page content
So, each taxonomy kind’s _index.md and each term’s index.md
need a front-matter, consisting of at least:
title = "Technologies & Stacks"
description = "Technologies we use for our hipster products"
[extra]
icon = "fa-solid fa-microchip"
That, as has hopefully become clear, will take care of rendering
the provided texts everywhere they are used for user-facing
pages. Right now, you are looking at a term’s index.md page.
Adding content
Basically, pages and articles are categorized into taxonomies just as always. Take care to place your pages outside the special section directories used for your taxonomy.
When adding a page, add the relevant taxonomies to their front-matter:
title = "How we made Big Bad Company happy with tons of JavaScript"
date = "2023-04-01"
[taxonomies]
customers = ["Big Bad Company"]
techonologies = ["JavaScript"]
Conscientious will now consider the page when generating
taxonomy pages. Doing so, it will make a distinction between
regular pages and articles (posts): All pages that have a date
are considered articles.
Cross-references
One extension that Conscientious makes to Zola’s concept of taxonomies is that it scans for cross-references. That means that for taxonomy pages, all other taxonomy terms used on pages that are in the current taxonomy will be listed in a panel as well.