# admin/config.template.yml # Template for the Decap CMS starting configuration. NOT served directly: # scripts/generate-config.sh builds admin/config.yml from it (generated, # not versioned, see .gitignore) - two independent substitution steps: # (1) fields between "# VOKABULAR::START/END" markers are replaced # if a matching entry exists in the content repo under _content/ableger.yml # (key "vokabular") (a closed selection list instead of free text) - if the # entry is missing, the block entered here stays unchanged. (2) # "{{VARIABLE}}" placeholders (see backend/site_url below) are always # replaced by the like-named values from install.env. # Details: the Manifest chapter on the project website Teil C, vokabular/README.md. # Deliberately separate from the website/CMS code repo (ableger_demo/ableger): # dedicated access rights for method content instead of full access to the # whole repo via CMS access. Details: the concept chapter on the project website Abschnitt 4 and 9. # repo/app_id/api_root/base_url/auth_endpoint come from install.env # (adjust centrally there for a fork), not directly here. backend: name: gitea repo: "{{METHODEN_REPO}}" app_id: "{{OAUTH_CLIENT_ID}}" api_root: "https://{{GITEA_DOMAIN}}/api/v1" base_url: "https://{{GITEA_DOMAIN}}" auth_endpoint: "https://{{GITEA_DOMAIN}}/login/oauth/authorize" branch: main # For the "Preview" link in the editor toolbar (not in the list overview - # per Decap's own docs, that only shows on the edit page). # WEBSITE_DOMAIN comes from install.env, must match baseURL in hugo/hugo.toml. site_url: "https://{{WEBSITE_DOMAIN}}" # editorial_workflow (branch + PR per submission) would be the actually # intended model, but is not supported by the Gitea backend in Decap CMS # (runtime error on load): https://github.com/decaporg/decap-cms/issues/7115 # (open, no workaround). Hence simple: a direct commit for anyone with CMS # access. Who gets access is a process question outside this config - see # the concept chapter on the project website Abschnitt 5. publish_mode: simple # Fallback for media without their own field-level media_folder (among # others the global "Media" button in the navigation) - now points into the # content repo (ableger_demo/ableger_methoden) instead of the website repo, # see backend.repo above. media_folder: "_assets" public_folder: "/_assets" # Strip umlauts/accents from generated slugs: for the existence check Decap # runs before every save (GET .../git/trees/main:), Gitea returns a # 400 error ("sha not found") for a path with non-ASCII characters - and # that's true even when the path exists, not only for new entries. Verified # live against the real Gitea API (ableger_methoden, main). Affects not # only creation but every subsequent save of an existing entry with an # umlaut in the folder name. Since this is a quirk of Gitea's extended-SHA # resolution (not a Decap bug), it can't be fixed in this repo's code - # only worked around via ASCII-clean slugs. slug: clean_accents: true collections: - name: "methoden" label: "Methoden" # Deliberately "methoden" instead of repo root ("") - Decap CMS crashes # on an empty folder value (config processing sets collection.type only # inside "if (folder) {...}", an empty string is falsy). Reproduced and # verified locally, see the ableger_methoden commit "Methoden in # methoden/-Unterordner verschieben". folder: "methoden" create: true # Slug comes from the dedicated field "kennung", no longer from the # title (Decap's default {{slug}}): the title may change at any time # without moving the folder - see the "kennung" field below and # the Manifest chapter on the project website, section "Bezeichner". Previously {{slug}} (derived # from titel) - a title change demonstrably deleted the method page # live and orphaned both variants, see the project website (background/analysis notes), # Befund A. slug: "{{fields.kennung}}" path: "{{slug}}/index" # {{slug}} in preview_path here (unlike slug: above) means the full # path compiled from path: "{{slug}}/index", including "index" - would # result in "beispiel-methode-index" instead of "beispiel-methode". # {{dirname}} is the parent folder relative to the collection folder, # which matches the slug exactly. Verified locally. preview_path: "{{dirname}}" identifier_field: "titel" # Last-modified info in the overview, analogous to the variants # collection below - {{commit_date}}/{{commit_author}} are Decap's own # tokens fed from the Gitea API (checked live, also work in the summary # template, not just in sortable_fields). summary: "{{fields.titel}} | {{commit_date | date('D.M.YY')}} {{commit_author}}" # Consistent vocabulary/order with the variants collection below: # "Methode" instead of "Titel" as the label, "Zuletzt geändert am/durch" # instead of Decap's default labels "Updated On"/"Author" - "Author" # would be easily confused here with our own "Autor:innen" field (on # variants), but actually means the commit author. sortable_fields: - { field: "titel", label: "Methode" } - { field: "commit_date", label: "Zuletzt geändert am" } - { field: "commit_author", label: "Zuletzt geändert durch" } format: "frontmatter" media_folder: "" public_folder: "" # Deliberately no draft field of its own here: publication is derived # from the variants (see their "veroeffentlicht" field below) - as soon # as at least one variant is published, the method is too. # scripts/compute-methoden-sichtbarkeit.rb sets draft: true # automatically for that, before every Hugo build, in the local # _content copy (not in the repo), for every method without a # published variant - Hugo's own, reliable draft mechanism then takes # care of the rest (e.g. automatic exclusion from the # homepage/search/taxonomies, not just the detail page). Details: # the concept chapter on the project website Abschnitt 5. # # Equally deliberately no duration/group-size fields here: these depend # on the respective variant (different versions of a method can take # different amounts of time or be meant for different group sizes), # hence they sit on the variant (see below) and are aggregated into a # range for the method page from all its variants (see # hugo/layouts/partials/variantenspanne.html). # # Equally deliberately no material field here (since August 2026, # before that there was one): different variants of the same method # often need different material - unlike duration/group size, there is # also no aggregated display for this on the method page, since a # material list as a union set would be misleading (could suggest you # need everything together). Lives exclusively on the respective # variant. # # License also on the variant, not here: what's copyrightable is not # the method as an idea but the concrete description/write-up - which # has lived entirely there since variants were introduced. The method # page instead shows the set of licenses present across all variants # (analogous to the duration range, see partials/variantenspanne.html). fields: # Stable identifier - becomes the folder name (see slug above) and # thereby the target of every variant reference (see their "methode" # field below). Assigned once, never changed afterward - the title # may change freely, this may not. No technical lock in the editor # possible (Decap has no readonly field), the validation script # (scripts/validate.rb) flags later changes as an error. pattern # also enforces ASCII-clean folder names directly in the form, # rather than only via slug.clean_accents. - label: "Kennung" name: "kennung" widget: "string" hint: "Kurz und selbsterklärend. Kleinbuchstaben/Ziffern/Bindestriche/Unterstriche. Wird zum Ordnernamen und eindeutigen Identifier. Nach dem Anlegen nicht mehr ändern." pattern: ["^[a-z0-9_]+(-[a-z0-9_]+)*$", "Nur Kleinbuchstaben, Ziffern, Unterstriche und Bindestriche, kein Bindestrich am Anfang/Ende"] - { label: "Titel", name: "titel", widget: "string" } - { label: "Kurzbeschreibung", name: "kurzbeschreibung", widget: "text", hint: "Kurze Zusammenfassung von Ziel und Ablauf, für den schnellen Überblick bei der Suche" } - { label: "Verwendungsmöglichkeit", name: "verwendungsmoeglichkeit", widget: "text", hint: "Wann und wofür eignet sich die Methode?" } # VOKABULAR:zielgruppe:START - label: "Zielgruppe" name: "zielgruppe" widget: "select" multiple: true options: - "Kinder" - "Jugendliche" - "Erwachsene" - "Senior_innen" # VOKABULAR:zielgruppe:END - label: "Kompetenzbereich" name: "kompetenzbereich" widget: "select" multiple: true hint: "Kompetenzmodell nach Leipold, Kopf & Seidl (2010)" options: - "Fachkompetenz" - "Methodenkompetenz" - "Sozialkompetenz" - "Selbstkompetenz" # VOKABULAR:kategorie:START - label: "Kategorie" name: "kategorie" widget: "list" hint: "Frei wählbar, z. B. Advent, Firmvorbereitung, Kennenlernen, Konfliktbearbeitung – bewusst kein festes Vokabular" # VOKABULAR:kategorie:END - label: "Lernchancen" name: "lernchancen" widget: "list" hint: "Stichsätze zu den (Lern-)Chancen, die mit der Methode verbunden werden" summary: "{{fields.eintrag}}" field: { label: "Lernchance", name: "eintrag", widget: "string" } - label: "Herkunft" name: "herkunft" widget: "list" required: false hint: "Woher stammt die Methode ursprünglich? (Eigenentwicklung, Vorlage, Tradition o. Ä.) - wovon sich eine einzelne Variante ableitet, steht bei dieser selbst, siehe Collection \"Varianten\", Feld \"Quellen\"." summary: "{{fields.eintrag}}" field: { label: "Angabe", name: "eintrag", widget: "string" } - label: "Initiator:innen" name: "initiatoren" widget: "list" hint: "Wer die Methode ursprünglich entwickelt/eingebracht hat. Autor:innen einzelner Varianten stehen bei der jeweiligen Variante, siehe Collection \"Varianten\"." summary: "{{fields.eintrag}}" field: { label: "Initiator:in", name: "eintrag", widget: "string" } # VOKABULAR:tags:START - { label: "Tags", name: "tags", widget: "list", required: false } # VOKABULAR:tags:END # Every method has at least one variant - no special case for "just one # version" in the data model, otherwise adding a second variant would # require a later migration (moving content out of the method into a # first variant). A method without a variant is deliberately not # intended, but not technically enforced by the CMS (no access to other # collections while saving). Linked via a relation field instead of # nested files in the method folder: whether Decap's path template can # include the folder of a method referenced via relation is unclear/ # unverified - the link instead happens only in Hugo (see # hugo/layouts/_default/single.html), similar to a taxonomy. # # Own page bundle per variant (like methods), so that attachments - which # belong to the respective variant, not the method, see the # untertitel/varianten_beschreibung rationale above - have a fixed # location where embedded images in the content (![]()) also resolve # correctly via Hugo page resources. With only one variant, attachments # stay functionally identical to the previous state (directly in the # bundle folder of the - then only - variant, no dedicated src # subfolder, same reason as for methods). - name: "varianten" label: "Varianten" folder: "varianten" create: true # methode resolves via value_field (see relation field below) to the # method's kennung, no longer to its title - title changes therefore no # longer move variant folders, see the Manifest chapter on the project website and # the project website (background/analysis notes), Befund A/E. slug: "{{fields.methode}}--{{fields.kennung}}" path: "{{slug}}/index" # {{slug}} in preview_path here (as already with methods) means the # full path compiled from path: "{{slug}}/index", including "index". # {{dirname}} is the parent folder relative to the collection folder, # which matches the slug exactly AND the real live URL: variants do # live in Hugo's content structure under the "varianten" section (see # hugo/hugo.toml module.mounts), but via the [permalinks] override # there without a "varianten/" prefix in the URL - the section is kept # for the template logic (where site.RegularPages "Section" # "varianten"), only the URL becomes flat. Slug collisions with methods # are ruled out, since variant slugs are always # "--", and method slugs never # contain "--". preview_path: "{{dirname}}" identifier_field: "untertitel" # Without this line, the overview would only show the subtitle (e.g. # "Kurzform") with no recognizable relation to the method - no longer # distinguishable with several methods that have similar variant names. # "Show variants on the method edit page" would be the more obvious # solution, but Decap CMS doesn't support it (no reverse-relation # feature) and would need a custom widget - deliberately not built # here. Method first, then subtitle: this way the overview groups # sensibly when sorted by "Methode", not just alphabetically by slug. # {{commit_date}}/{{commit_author}} are Decap's own tokens fed from the # Gitea API - checked live, also work in the summary template (not just # in sortable_fields, where they were originally intended for this # purpose). summary: "{{fields.methode}} – {{fields.untertitel}} | {{commit_date | date('D.M.YY')}} {{commit_author}}" # Decap doesn't automatically offer relation fields (like "methode") in # "Sort by" (checked live: without this line, only "Untertitel" showed # up there) - added explicitly, so the overview can also be grouped by # method. "commit_author"/"commit_date" (Decap's built-in, git-based # sort options) have to be listed explicitly here too: an explicit # sortable_fields list REPLACES Decap's default selection entirely, # instead of extending it - without these two entries they would have # disappeared from this collection, even though they should appear the # same way for methods (also explicitly set there now, see above). # Consistent vocabulary/order with the methods collection above: # "Methode" first, then - only here in addition, since only variants # have this field - "Variante" (label for the untertitel field), then # "Zuletzt geändert am/durch" instead of Decap's default labels # "Updated On"/"Author" - "Author" would be easily confused here with # our own "Autor:innen" field, but actually means the commit author. sortable_fields: - { field: "methode", label: "Methode" } - { field: "untertitel", label: "Variante" } - { field: "commit_date", label: "Zuletzt geändert am" } - { field: "commit_author", label: "Zuletzt geändert durch" } format: "frontmatter" media_folder: "" public_folder: "" fields: # Positive polarity (on = published) instead of a switch that writes # directly into Hugo's "draft" field: marking "on" as "draft" (as # required for an inverted draft field) is confusing UX. Decap cannot # write a boolean field inverted into a differently named # frontmatter field, so scripts/apply-veroeffentlicht.rb translates # this field, inverted, into Hugo's native "draft" before every Hugo # build, in the local _content copy (not in the repo) - Hugo's own # draft mechanism then takes care of reliable build exclusion, as # with methods (see above). - label: "Veröffentlicht (auf der Website sichtbar)" name: "veroeffentlicht" widget: "boolean" default: false hint: "Häkchen setzen, um diese Variante (und damit auch die zugehörige Methode, siehe deren Hinweistext) auf der Website zu veröffentlichen. Bleibt bis dahin in Git gespeichert, ist aber nur im CMS sichtbar." - label: "Methode" name: "methode" widget: "relation" collection: "methoden" search_fields: ["titel"] display_fields: ["titel"] # value_field determines what's actually stored/used for the slug - # "kennung" instead of "titel" (the state before kennung was # introduced), so that a title change on the method no longer # breaks this reference (see the project website, background/analysis # notes, Befund A). search_fields/display_fields stay on # "titel", so the search in the dropdown still searches by the # readable name, not the kennung. Neither {{slug}} nor {{dirname}} # give a cleaned folder name here (reproduced live) - a direct # field reference to "kennung" is the robust way. Linking in Hugo # correspondingly happens via Params.kennung, not via Params.titel # or the filename/slug. value_field: "kennung" hint: "Zu welcher Methode gehört diese Variante?" # Stable identifier of this variant - becomes the second part of the # folder name (see slug above). Assigned once, never changed # afterward, see the Manifest chapter on the project website. Unlike the method, nothing # currently references a variant from outside - kept consistent # anyway, for later fork merges. - label: "Kennung" name: "kennung" widget: "string" hint: "Kurz und selbsterklärend. Kleinbuchstaben/Ziffern/Bindestriche/Unterstriche. Wird zum Ordnernamen und eindeutigen Identifier. Nach dem Anlegen nicht mehr ändern." pattern: ["^[a-z0-9_]+(-[a-z0-9_]+)*$", "Nur Kleinbuchstaben, Ziffern, Unterstriche und Bindestriche, kein Bindestrich am Anfang/Ende"] - { label: "Untertitel", name: "untertitel", widget: "string", hint: "Ein Wort, das die Besonderheit dieser Variante ausdrückt, z. B. \"Kurzform\" oder \"Sommer\"." } - { label: "Varianten-Beschreibung", name: "varianten_beschreibung", widget: "text", hint: "Kurze Erläuterung, was diese Variante besonders macht - hilft später bei der Orientierung zwischen mehreren Varianten" } - { label: "Dauer (Minuten)", name: "dauer_minuten", widget: "number", value_type: "int" } - { label: "Gruppengröße (mindestens)", name: "gruppengroesse_min", widget: "number", value_type: "int", hint: "Für eine feste Gruppengröße hier und beim Maximum denselben Wert eintragen" } - { label: "Gruppengröße (höchstens)", name: "gruppengroesse_max", widget: "number", value_type: "int" } - label: "Material" name: "material" widget: "list" hint: "Was für diese Variante konkret gebraucht wird - andere Varianten derselben Methode können anderes Material brauchen" summary: "{{fields.eintrag}}" field: { label: "Material", name: "eintrag", widget: "string" } # VOKABULAR:lizenz:START - { label: "Lizenz", name: "lizenz", widget: "string", default: "CC-BY 4.0", hint: "Gilt für diesen Text/diese Ausarbeitung - die Methode-Seite zeigt die Menge aller vorkommenden Lizenzen ihrer Varianten" } # VOKABULAR:lizenz:END - label: "Quellen" name: "quellen" widget: "list" required: false hint: "Worauf sich diese konkrete Ausarbeitung stützt (z. B. eine Handreichung, eine Adaption) - wovon die Methode allgemein abstammt, steht bei ihr selbst unter \"Herkunft\"" summary: "{{fields.eintrag}}" field: { label: "Quelle", name: "eintrag", widget: "string" } - label: "Autor:innen" name: "autoren" widget: "list" hint: "Wer diese Variante erarbeitet hat (kann sich von den Initiator:innen der Methode unterscheiden)" summary: "{{fields.eintrag}}" field: { label: "Autor:in", name: "eintrag", widget: "string" } - label: "Inhalt (Vorbereitung, Ablauf, Hintergründe)" name: "body" widget: "markdown" default: | # Vorbereitung *Stichsätze, was erledigt werden muss, um mit den Inhalten zu starten (bei Bedarf auch Anmerkungen zum Material).* # Ablauf *Detaillierter Ablaufplan mit Anweisungen, möglicherweise in weiteren Überschriftenebenen verschachtelt.* # Hintergründe *Erläuterung von Hintergründen (Implizites im Ablauf explizit machen), um die Methode zugänglich zu gestalten.* - label: "Anhänge" name: "anhaenge" widget: "list" required: false hint: "Arbeitsblätter, Vorlagen o. Ä. zum Herunterladen - gehören zu dieser Variante, nicht zur Methode allgemein" # Deliberately no dedicated media_folder subfolder (e.g. "src"): a # git folder that has never contained a file simply doesn't exist - # Gitea returns HTTP 400 for that instead of an empty list, and # Decap only catches 404. The variant's own bundle folder, on the # other hand, always exists (because of index.md), hence # attachments live directly there. fields: - { label: "Datei", name: "datei", widget: "file" } - { label: "Beschreibung", name: "beschreibung", widget: "string", hint: "Kurze Einordnung, wofür der Anhang gedacht ist" }