diff --git a/config.toml b/config.toml index e519dc6..dc5fefc 100644 --- a/config.toml +++ b/config.toml @@ -7,8 +7,15 @@ title = "tp.0x45.cz" description = "" default_language = "en" +taxonomies = [ + {name = "categories"}, + {name = "tags"} +] + [extra] nav = [ {title = "Index", path = "/"}, {title = "About", path = "/about/"} ] +categories_title = "Categories" +tags_title = "Tags" diff --git a/content/lorem.md b/content/lorem.md index 1d7fea4..c096d1e 100644 --- a/content/lorem.md +++ b/content/lorem.md @@ -3,4 +3,5 @@ title = "Lorem Ipsum" [taxonomies] categories = ["lorem", "ipsum"] +tags = ["lorem", "ipsum"] +++ diff --git a/static/style.css b/static/style.css index e153406..e3e8060 100644 --- a/static/style.css +++ b/static/style.css @@ -24,6 +24,11 @@ header { font-size: 1.5em; } +aside span.title { + display: block; + margin: 2em 0 1em 0; + font-weight: bold; +} aside ul { list-style-type: none; padding: 0; diff --git a/templates/categories/list.html b/templates/categories/list.html new file mode 100644 index 0000000..e69de29 diff --git a/templates/categories/single.html b/templates/categories/single.html new file mode 100644 index 0000000..e69de29 diff --git a/templates/index.html b/templates/index.html index d87f5f6..10462b3 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,3 +1,4 @@ +{% import "macros.html" as macros %} @@ -19,6 +20,8 @@
  • {{ item.title }}
  • {% endfor %} + {{ macros::list_taxonomy(title=config.extra.categories_title, kind="categories") }} + {{ macros::list_taxonomy(title=config.extra.tags_title, kind="tags") }}
    {% block content %} diff --git a/templates/macros.html b/templates/macros.html new file mode 100644 index 0000000..6eb0220 --- /dev/null +++ b/templates/macros.html @@ -0,0 +1,10 @@ +{% macro list_taxonomy(title, kind) %} + {{ title }} + +{% endmacro list_categories %} + diff --git a/templates/tags/list.html b/templates/tags/list.html new file mode 100644 index 0000000..e69de29 diff --git a/templates/tags/single.html b/templates/tags/single.html new file mode 100644 index 0000000..e69de29