Vorlage fuer eigene Ableger-Installationen: Website + CMS-Code

Bereinigt von Pilot-Spezifika (echte Inhalte, Erzbistum-Hamburg-Bezuege,
Domain-Werte) - install.env und hugo.toml [params] mit generischen
Platzhaltern. docs/ komplett entfernt: Konzept, Manifest, Installations-
anleitungen leben jetzt auf der Projekt-Website statt redundant im Repo,
README verweist dorthin. Decap-CMS-Version von einer floatenden ^3.0.0
auf ein festes 3.15.1 gepinnt.
This commit is contained in:
2026-08-23 14:37:54 +02:00
commit 5e9da58d23
65 changed files with 5073 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
#!/usr/bin/env ruby
# Generates vorlagen-manifest.json in the given templates folder - lists all
# .docx/.odt files found there so the methoden-set tool (methoden-set/, see
# the Methoden-Set chapter on the project website) can offer them automatically as template choices,
# including files someone copied manually straight onto the server (not
# just the ones from this repo). Runs in the deploy hook AFTER the rsync of
# methoden-set/ into the docroot (see the installation guide on the project website) and
# therefore deliberately scans the docroot itself, not the git worktree -
# rsync runs there without --delete, so manually added files survive
# across deploys and show up here too.
require 'json'
verzeichnis = ARGV[0] or abort "Verwendung: #{$0} <vorlagen-verzeichnis>"
dateien = Dir.glob(File.join(verzeichnis, '*.{docx,odt}')).map { |pfad| File.basename(pfad) }.sort
# Derive the label from the filename (without extension, hyphens/
# underscores turned into spaces, each word capitalized) - no additional
# metadata field to maintain, the filename itself is the only source.
eintraege = dateien.map do |datei|
format = File.extname(datei).delete_prefix('.')
name = File.basename(datei, '.*')
label = name.gsub(/[-_]+/, ' ').strip.split(' ').map { |w| w.empty? ? w : w[0].upcase + w[1..] }.join(' ')
{ 'datei' => datei, 'format' => format, 'label' => label }
end
File.write(File.join(verzeichnis, 'vorlagen-manifest.json'), JSON.pretty_generate(eintraege))
puts "vorlagen-manifest.json geschrieben: #{eintraege.length} Vorlage(n)"