Tags :
webmastery
tech
Jump to:
Why Zola?
I vibed with it when I was starting this website. There's no garden-like themes afaik so I'm gonna get my hands dirty and start working on it.
Tools at disposal
- taxonomies
- extra variables
- shortcodes
- backlinks (!!!)
- custom template for garden pages
Existing features
tagging
In the page frontmatter:
[taxonomies]
tags = ["webmastery"]
In config:
taxonomies = [
{ name = "tags", rss = true }
]
page growth levels
In the page frontmatter:
[extra]
garden_level = 0
In the config:
[extra]
garden_levels = [
{title = "seedling", text = " seedling", icon = "🌱"},
{title = "sapling", text = " sapling", icon = "🌿"},
{title = "evergreen", text = "n evergreen", icon = "🌴"}
]
(using the text attribute to correctly use a/an when writing the page header)
Header text in the page template:
{% if page.extra.garden_level or page.extra.garden_level == 0 %}
{% set garden_info = config.extra.garden_levels[page.extra.garden_level] %}
This is a{{garden_info.text}} {{garden_info.icon}}
{% endif %}
{% if page.date %}
planted on {{ macros::format_date(date=page.date) }}
{% endif %}
{% if page.date and page.updated %}
and
{% endif %}
{% if page.updated %}
last tended on {{ macros::format_date(date=page.updated) }}
{% endif %}
backlinks
{% if page.backlinks | length > 0 %}
<hr/>
Backlinks:
<ul></ul>
{% for p in page.backlinks %}
<li>
<a href="{{ p.permalink | safe }}">{{ p.title }}</a>
</li>
</ul>
{% endfor %}
</ul>
{% endif %}
Nice to haves
- expanding/collapsed headings/content (makes me have less .md files to manage and just have to link to sections when connecting thoughts) (will be a shortcode to dump content into?)