From 7daa254c0b2be4055a40ef320f44e7d066dca753 Mon Sep 17 00:00:00 2001 From: Ahmed M Alaa Date: Mon, 5 Dec 2022 14:48:27 +0200 Subject: added: default taxonomies templates, custom nav links --- README.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index e3b69c3..8039ca2 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,19 @@ theme = "no-style-please" ## Options +### Default taxonomies + +Special templates for `tags`, `categories`, and `contexts` taxonomies are provided. However, generic templates exist for custom taxonomies. + +To use taxonomies, in a page metadata add + +```toml +[taxonomies] +tags = [ 'tag1', 'tag2' ] +categories = [ 'category A', 'B class' ] +genre = [ 'rock', 'alternative' ] # custom taxonomy +``` + ### Pages list in homepage To enable listing of pages in homepage add the following in `config.toml` @@ -31,6 +44,26 @@ To enable listing of pages in homepage add the following in `config.toml` list_pages = false ``` +### Header and footer nav links + +Also in the `extra` section in `config.toml` + +```toml +[extra] + +header_nav = [ + { name = "~home", url = "/" }, + { name = "#tags", url = "/tags" }, + { name = "+categories", url = "/categories" }, + { name = "@contexts", url = "/contexts" }, +] +footer_nav = [ + { name = "< previous", url = "#" }, + { name = "webring", url = "#" }, + { name = "next >", url = "#" }, +] +``` + ### Add TOC to pages In a page frontmatter, set `extra.add_toc` to `true` -- cgit v1.2.3