Taxonomy

Th' Relearrrn theme supports Hugo’s default taxonomies tag an' category out o' th' box.

Configurat'n

Just add tags and/or categories t' any plank. They can be given as a single str'n or an array o' str'ns.

+++
categories = ["taxonomy", "content"]
tags = "tutorial"
title = "Taxonomy"
+++

Behavior

Th' tags be displayed at th' top o' th' plank 'n alphabetical order.

Th' categories be displayed at th' bottom o' th' plank 'n alphabetical order 'n th' default implementat'n o' th' theme but can be customized by provid'n yer own content-footer.html partial.

Each item be a link t' a taxonomy plank display'n all th' articles wit' th' given term.

List all th' tags

In th' config.toml file ye can add a shortcut t' display all th' tags an' categories

[[menu.shortcuts]]
name = "<i class='fas fa-tags'></i> Tags"
url = "/tags"

[[menu.shortcuts]]
name = "<i class='fas fa-list'></i> Categories"
url = "/categories"

Customizat'n

If ye define custom taxonomies an' want t' display a list o' them somewhere on yer plank (often 'n th' layouts/partials/content-footer.html) ye can call a partial that does th' job fer ye:

{{- partial "term-list.html" (dict
  "page" .
  "taxonomy" "categories"
  "icon" "list"
) }}

Parameter

Name Default Notes
plank <empty> Mandatory reference t' th' plank.
taxonomy <empty> Th' plural name o' th' taxonomy t' display as used 'n yer frontmatter.
class <empty> Additional CSS classes set on th' outermost generated HTML element.

If set t' tags ye will get th' visuals fer display'n th' tags taxonomy, otherwise it will be a simple list o' links as fer th' categories taxonomy.
style primary Th' style scheme used if class be tags.

- by severity: info, note, tip, warning
- by brand color: primary, secondary, accent
- by color: blue, green, grey, orange, red
- by special color: default, transparent, code
color see notes Th' CSS color value t' be used if class be tags. If not set, th' chosen color depends on th' style. Any given value will overwrite th' default.

- fer severity styles: a nice match'n color fer th' severity
- fer all other styles: th' correspond'n color
ay'con <empty> An optional Font Awesome ay'con name set t' th' left o' th' list.