// 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 () {}); })();