Configuration

4 minutes read

Liftoff reads conventional Hugo configuration. A few extras enable the landing-style chrome.

Required markup settings

The shortcodes emit HTML, so Goldmark must be allowed to pass it through. Without this, feature cards and callouts render as escaped text.

toml
[markup.goldmark.renderer]
  unsafe = true

Syntax highlighting comes from a stylesheet the theme ships, assets/css/syntax.css, so Chroma has to emit class names for it to match. The inline variant is also the first thing a Content-Security-Policy without 'unsafe-inline' throws away, which leaves every code block colourless.

toml
[markup.highlight]
  style      = "github-dark"
  noClasses  = false
  lineNos    = false
  codeFences = true
  tabWidth   = 2

Another Chroma style needs its own stylesheet. Write it to assets/css/syntax.css in your site, where it takes precedence over the theme’s copy:

bash
hugo gen chromastyles --style=dracula > assets/css/syntax.css

Site params

toml
[params]
  description     = "What your site does in one line."
  tagline         = "Used in the footer brand block."
  ogImage         = "/images/og.png"
  accent          = "cyan"
  copyrightOwner  = "ACME"
  copyrightSuffix = "All rights reserved."
ParamUsed byDefault
descriptionMeta description, Open Graphnone
taglineFooter brand blocknone
ogImageOpen Graph and Twitter card imagenone
accentColour preset, see belowcyan
copyrightOwnerFooter copyright linesite.Title
copyrightSuffixText after the copyright linenone

Colour presets

accent swaps the two brand colours. Surfaces, text and the semantic colours stay the same, and every preset ships a matching light-mode variant, so the theme toggle keeps working either way.

ValueBrand coloursReads as
cyanCyan and violetDefault. Product and developer tooling
emberOrange and pinkWarm, high energy
forestEmerald and cyanCalm, infrastructure-flavoured
indigoIndigo and magentaConservative SaaS
monoSlate onlyNear-neutral, content-first

The two colours sit far enough apart on the wheel that the gradients in the hero headline, the CTA band and the brand mark stay legible as gradients. mono is the deliberate exception: it has almost no contrast between the two, which is the point.

The value lands on <html data-accent="...">. For a palette of your own, override the tokens directly instead, see customization.

Any of these can be overridden per language under [languages.<code>.params].

Repository stats

Renders a star count in the header. Only codeberg and github are supported as hosts. The count is fetched in the browser and cached in localStorage for an hour, so it costs nothing at build time.

toml
[params.repo]
  host  = "codeberg"
  owner = "head1328"
  name  = "liftoff"

Rendered in the footer. icon is an Iconify identifier. Internal paths are resolved per language, external URLs are left alone.

toml
[[params.social]]
  icon = "simple-icons:codeberg"
  name = "Codeberg"
  url  = "https://codeberg.org/head1328"

Parsed as markdown, so links and line breaks work.

toml
[params.footer]
  address = """
ACME
Anytown, Germany
[hello@acme.example](mailto:hello@acme.example)
"""

Pagination

The articles listing and taxonomy term pages both use Hugo’s paginator.

toml
[pagination]
  pagerSize = 6

Languages

toml
defaultContentLanguage = "en"
defaultContentLanguageInSubdir = true

[languages.en]
  label  = "English"
  locale = "en"
  weight = 1
[languages.de]
  label  = "Deutsch"
  locale = "de"
  weight = 2
toml
[[menus.main]]
  name    = "Docs"
  pageRef = "/docs"
  weight  = 10

Footer columns are top-level menu entries with children:

toml
[[menus.footer]]
  identifier = "product"
  name       = "Product"
[[menus.footer]]
  parent = "product"
  name   = "Get started"
  url    = "/get-started"

Prefer pageRef over url for internal targets. It resolves through Hugo’s page lookup, so a broken reference fails the build instead of shipping a 404. Footer entries with a hard url are not checked.

Front matter

Fields the theme reads on top of Hugo’s built-ins.

FieldSectionsPurpose
heroany list or pageRenders the hero, see landing pages
descriptionallCard summary and meta description
imageallPer-page Open Graph image, overrides params.ogImage
authorarticlesShown in the article meta line
weightdocsIndex order and prev/next links
tagsarticles, docsTaxonomy terms, linked
categoriesarticlesTaxonomy terms, linked
markblueprintsShort label on the card, falls back to the first two title characters
filtersblueprintsFilter buttons on the index, not a taxonomy
startFromblueprintsOptional link to the matching reference page