A New Practicalli Hope
After a little more experimenting with custom overrides, I have converted Practical.li to Zensical.
My office has been moved upstairs where it will be warmer over the winter months. The large monitor has been fitted to an arm, with two laptops on arms either side.
The office already has a corner desk, although it is not a standing desk. Instead I use a collapsible table on top of the desk which elevates the keyboard to a good hight when standing.
Zensical¶
Experimentation with the catppuccin theme and custom overrides has resolved all the challenges I had to switch all Practicalli websites over to Zensical.
I had an issue with the custom announcement message, which always showed if I included a link to update the cookie consent settings. Removing that link reverted to expected behaviour.
The cookie consent is in the footer, so I updated the message to reflect that.
Custom Overrides¶
A custom announce message was added via an overrides/main.html file. In zensical.toml the "announce.dismiss", feature was enabled (not commented).
As the cookie feature is now used, a link to update the cookie settings was included in the announcement message, i.e. <a href="#__consent">Update cookie consent</a>
The custom announcement popup shows at the top of every page visited. When the X is used to dismiss the announcement it goes away.
Reloading that page or visiting another pages on the same site shows the announcement popup again.
Removing the link to update cookie consent allows the announcement bar to be dismissed once without returning (unless content of the message is updated). This is the expected behaviour of the announce feature.
{% extends "base.html" %}
<!-- From catppuccin-zensical theme -->
{% block styles %}
{{ super() }}
<link rel="stylesheet" href="{{ 'assets/stylesheets/catppuccin.css' | url }}">
{% endblock %}
<!-- Verify Website for Mastodon -->
{% block extrahead %}
{{ super() }}
<link rel="me" href="https://mastodon.social/@practicalli_johnny" />
{% endblock %}
<!-- Content -->
{% block announce %}
Practicalli websites have migrated to <a href="https://zensical.org/">Zensical static site generator</a>, with analytics to understand which content is most valuable.
<a href="#__consent">Update cookie consent</a>
{% endblock %}
Convert Navigation¶
How to the convert a MkDocs navigation in Yaml to a Zensical navigation in TOML.
nav lives under the [project] table and each YAML list item becomes a TOML inline table (or a plain string when there is no custom title).
MkDocs Navigation in Yaml
Zendical Navigation in TOML
The conversion rules include:
- Title: path.mdbecomes { "Title" = "path.md" }- path.md(untitled path) becomes the string"path.md"- Title:followed by a nested list becomes{ "Title" = [ ... ] }- Titles containing spaces or special characters must be quoted
- Trailing commas are allowed in TOML arrays, which makes diffs cleaner.
Thank you.
Thank you.