class

Taxonomies::Taxonomy

Inherits Reference < Object

A Taxonomy, which means "a way to classify posts"

Constructors

new(name : String, title : String, term_title : String, path : String, posts : Array(Markdown::File))
Source

Instance methods

lightweight_value(lang)

Lightweight value for taxonomy templates (doesn't render posts)

Source
path
Source
path=(path : String)
Source
render
Source
term_title
Source
term_title=(term_title : String)
Source
terms_for(post : Markdown::File, lang : String) : Array(Term)

Terms of this taxonomy that contain post in lang, in the order the post's front matter lists them, each once (front matter may repeat a term, with or without stray whitespace).

Looked up from the post's own parsed terms: scanning every term's post list for the post instead was O(terms x posts) per page, which on a 4000-post site made taxonomies 6% of the build.

Source
terms_for_lang(lang : String) : Hash(String, Term)

Terms registered for a language

Source
title
Source
title=(title : String)
Source
value(lang)
Source