Files
website/admin/site-meta.js
T
tobias 5e9da58d23 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.
2026-08-23 14:37:54 +02:00

18 lines
825 B
JavaScript

// Loads the site title from /site-meta.json (see hugo.toml,
// outputFormats.SiteMeta) instead of hardcoding "Ableger" - these pages run
// without Hugo templating (see the installation guide on the project website). On failure, the
// "Ableger" fallback already in the markup stays. Shared by admin/index.html
// and admin/status/index.html, which only differ in the title suffix -
// passed in via this script tag's own "data-title-suffix" attribute.
(function () {
var suffix = document.currentScript.dataset.titleSuffix || '';
fetch('/site-meta.json')
.then(function (r) { return r.json(); })
.then(function (meta) {
if (!meta.title) return;
document.title = meta.title + suffix;
document.getElementById('site-title-text').textContent = meta.title;
})
.catch(function () {});
})();