Editing Guide

Article · Created: 3 Feb 2026 · Last edited: 3 Feb 2026

This site is created using Hugo. When writing pages, there are certain Hugo “shortcodes” that can be used to inject HTML components.

Article Frontmatter

These are the variables that can be provided in frontmatter on each page:

---
title: <Page Title>
description: <Page Description>
draft: false
date: 2026-01-11
lastmod: 2026-01-17
toc: false           <------------Defaults to True; Setting to false will remove the sidebar toc.
categories:
  - <Category Tag>
related:
  - <Related Page 1>
  - <Related Page 2>
aliases:
  - /alternate-url/
---

Shortcodes

toc

This adds a table of contents next to the infobox, in the main/first paragraph of a page. This is useful to fill whitespace. If using this shortcode, it is helpful to set toc: false in the frontmatter of the page.

Shortcode Example
{{< toc >}}

infobox

Creates a Wikipedia-style infobox that floats to the right of the content.

Variables
  • title
  • image
  • caption
Shortcode Example
{{<infobox
    title="Cannabis sativa"
    image="https://upload.wikimedia.org/wikipedia/commons/a/a8/Cannabis_leaf.svg"
    caption="A flowering cannabis plant"
>}}

| Field | Value |
|-------|-------|
| **Kingdom** | Plantae |
| **Family** | Cannabaceae |
| **Genus** | Cannabis |

{{< /infobox >}}

imgcard

Displays an image with caption, useful for inline images.

Variables
  • src
  • caption
  • width
  • float
Shortcode Example
{{<imgcard
    title="Cannabis sativa"
    src="https://upload.wikimedia.org/wikipedia/commons/a/a8/Cannabis_leaf.svg"
    caption="A flowering cannabis plant"
    width="20%"
>}}

details

A collapsible box for hiding content until clicked.

Variables
  • summary - the clickable text
  • open - set to “true” to have it expanded by default
Shortcode Example
{{< details summary="Click to expand" >}}
Your hidden content here. Markdown works.
{{< /details >}}

didyouknow

Displays a random fact from the data file, which changes on each site build.

Shortcode Example
{{< didyouknow >}}
Data File Format

Add facts to data/didyouknow.yaml:

- fact: "Your fact here with [links](/articles/page) supported."
- fact: "Another interesting fact."

wikibox

A styled box for homepage sections (Getting Started, Popular Pages, etc.).

Variables
  • title - the header text
  • class - optional custom CSS class
Shortcode Example
{{< wikibox title="Getting Started" >}}
Your content here. Markdown works.

- [Link one](/articles/page)
- [Link two](/articles/other)
{{< /wikibox >}}

Creates wiki-style links. Shows as red if the target page doesn’t exist.

Note: This shortcode is optional. Standard markdown links like [title](page-name) work well for most cases.

Variables
  • First param: link text (also used as page name if only one param)
  • Second param (optional): the actual page path
Shortcode Example
{{< link "Cannabis" >}}
Links to /articles/cannabis with text "Cannabis"

{{< link "the sativa plant" "cannabis-sativa" >}}
Links to /articles/cannabis-sativa with text "the sativa plant"

See Also


More on Hugo:

In Hugo’s template system:

  • single.html - Used for individual content pages (regular .md files)
  • list.html - Used for section/index pages (_index.md files)

So list.html is used for:

  • /about/ (from _index.md)
  • /articles/
  • /categories/
  • /categories/cannabinoids/
  • Any taxonomy or section landing page

And single.html is used for:

  • /about/contributing/ (from contributing.md)
  • /about/editing/
  • /articles/thc/
  • Any regular content page