# hugo/hugo.template.toml # Root configuration for Ableger - template, not read by Hugo directly. # scripts/generate-config.sh generates hugo/hugo.toml from this file (same # {{VARIABLE}} substitution it already does for admin/config.yml), filling # in WEBSITE_DOMAIN/GITEA_DOMAIN/METHODEN_REPO from install.env. hugo.toml # itself is generated and not versioned (see .gitignore) - edit this file # instead. Reason: Hugo's own config file can't read install.env, so these # two values (baseURL, methoden_repo_url below) would otherwise have to be # kept in sync by hand on every fork - found live, twice, while setting up # a second test instance. baseURL = "https://{{WEBSITE_DOMAIN}}/" locale = "de-DE" title = "Ableger" # Once module.mounts is set at all, every mount needed must be listed # explicitly - Hugo's default mounts no longer apply automatically then. [[module.mounts]] # Method content lives in the separate repo ableger_demo/ableger_methoden # (see the concept chapter on the project website Abschnitt 9). ../_content is freshly fetched by # scripts/sync-methoden.sh (not versioned, see .gitignore) and itself # contains a methoden/ subfolder (Decap CMS workaround, see # admin/config.yml). source = "../_content/methoden" target = "content" [[module.mounts]] # Variants (preparation/procedure/background per method, see Konzept # Abschnitt 8) live as their own Decap collection in a dedicated top-level # folder in the content repo, not inside the method's own folder - the # link to the corresponding method happens via a relation field, # evaluated in hugo/layouts/_default/single.html via "where", not via # file paths. varianten/_index.md (in the content repo, not managed by # Decap) hides variant pages from all views that list methods (cascade # "_build.list: never") - they can still be opened individually, just # aren't part of .Site.RegularPages. source = "../_content/varianten" target = "content/varianten" [[module.mounts]] # protokoll_version for the footer (see layouts/_default/baseof.html) - # the same file that the Manifest chapter on the project website requires as Regel 14. Lives at the # root of the content repo, not in methoden/ or varianten/. source = "../_content/ableger.yml" target = "data/ableger.yml" [[module.mounts]] # Static pages with no relation to the content repo (currently: /suche/, # see layouts/suche/list.html) - a dedicated mount versioned here in the # website repo instead of a local hugo/content/ folder, because # module.mounts is already set, so Hugo's implicit default mount for # "content" no longer applies (see comment above). source = "content-static" target = "content" [[module.mounts]] source = "static" target = "static" [[module.mounts]] source = "layouts" target = "layouts" [[module.mounts]] source = "assets" target = "assets" [[module.mounts]] source = "data" target = "data" # Taxonomies: map the metadata fields from the schema (Abschnitt 8 of the # Konzept) directly to filterable, searchable categories - no extra code. # Key and value deliberately kept identical (instead of e.g. # zielgruppe = "zielgruppen"): Hugo's automatic singular/plural detection is # built for English words and otherwise creates extra, empty ghost # taxonomies for German plural forms. The only exception: `tag`/"tags", # because the frontmatter field itself is already called "tags". # Variants live in Hugo's "varianten" section (see module.mounts above), # but are meant to appear in the URL without a folder prefix, just like # methods (expected by the Decap preview button, preview_path: # "{{dirname}}" in admin/config.template.yml - without this override, # preview would point to a 404 URL without the "varianten/" prefix). :slug # is always "--" for variants, so it doesn't collide # with method slugs. [permalinks] # :slug stays empty here (variants have no title/slug frontmatter field - # the slug is derived purely from the folder name assigned by Decap), # :contentbasename is used instead, which takes the actual bundle folder # name. Verified live: with :slug, all variant URLs collapsed onto "/" # (":filename" would be the obvious name, but has been removed since Hugo # 0.144). varianten = "/:contentbasename/" # Raw markdown per variant, for the methoden-set tool (methoden-set/, see # the Methoden-Set chapter on the project website) - serves a self-describing markdown document under # "index.md" (own YAML header, steckbrief and variant fields, # content, attachment links) that the client fetches via fetch(), instead # of parsing HTML. [outputFormats.MethodenSetMd] mediaType = "text/markdown" baseName = "index" isPlainText = true notAlternative = true [[cascade]] outputs = ["HTML", "MethodenSetMd"] [cascade.target] kind = "page" path = "{/varianten/**}" # Method URLs also serve "index.md" - with exactly one variant, using the # same document as the variant itself (see partials/methoden-set- # dokument.html and _default/single.md), otherwise a short notice document. # Reason: if a method has only one variant, its HTML page # (_default/single.html) embeds the variant text directly, without showing # a visible link to the actual variant URL - so users are likely to copy # the method URL, not the (non-obvious) variant URL. A dedicated, second # cascade rule instead of a single "{/**}" pattern for both sections: # method paths have exactly one segment ("/beispiel-methode"), variant # paths have two ("/varianten/") - the "{/*}" glob (no "**") only # matches single path segments, so it doesn't collide with the rule above. [[cascade]] outputs = ["HTML", "MethodenSetMd"] [cascade.target] kind = "page" path = "{/*}" # Serves the site title (among other things) as JSON under /site-meta.json - # admin/index.html and admin/status/index.html are plain static files # without Hugo templating (see the installation guide on the project website, copied unchanged # via rsync) and therefore load this file via fetch(), so "Ableger" isn't # hardcoded a second time in the title/header but taken from .Site.Title. [outputFormats.SiteMeta] mediaType = "application/json" baseName = "site-meta" isPlainText = true notAlternative = true [outputs] home = ["HTML", "RSS", "SiteMeta"] [taxonomies] zielgruppe = "zielgruppe" kompetenzbereich = "kompetenzbereich" kategorie = "kategorie" tag = "tags" [params] # First sentence on the homepage - deliberately generic instead of # provider-specific, so forks don't have to change it. beschreibung = "Ableger ist eine strukturierte Sammlung von Methoden." # Primary (accent) color of the read UI - set as a CSS custom property in baseof.html. farbe_primaer = "#3c8a98" # Footer link to the content repo (see layouts/_default/baseof.html) - # replaces a blanket license sentence, which would be wrong anyway since # variants were introduced (no longer ONE value for all methods, see the # "Manifest" chapter on the project website). Derived automatically from # GITEA_DOMAIN + METHODEN_REPO in install.env, not edited here directly. methoden_repo_url = "https://{{GITEA_DOMAIN}}/{{METHODEN_REPO}}" # Provider name for the footer (see layouts/_default/baseof.html). # Rendered as a link when betreiber_url is set, otherwise as plain text. betreiber_name = "Ableger-Projekt" # Link to the provider. Placeholder - adjust on a fork. betreiber_url = "https://example.org" # Imprint, privacy policy, and a link to the website repo (counterpart to # methoden_repo_url above, for the footer placeholder "Ableger-Projekt") - # still without a target, since there is no project page for it yet. As # long as these three lines stay commented out, the footer keeps showing # the previous "Folgt" placeholder (see baseof.html). On a fork, fill in # your own URL here once you have one. # impressum_url = "" # datenschutz_url = "" # website_repo_url = ""