From 857c17344fa0fe1512762de0a94be6e9ccae2433 Mon Sep 17 00:00:00 2001 From: Jeffrey Phillips Freeman <the@jeffreyfreeman.me> Date: Mon, 9 Oct 2023 22:15:59 -0400 Subject: [PATCH] Using template variables int he manifest file now --- config/_default/hugo.toml | 8 +++++++- static/manifest.json => layouts/index.manifest.json | 6 +++--- 2 files changed, 10 insertions(+), 4 deletions(-) rename static/manifest.json => layouts/index.manifest.json (58%) diff --git a/config/_default/hugo.toml b/config/_default/hugo.toml index 75e133f47..cfa243db2 100644 --- a/config/_default/hugo.toml +++ b/config/_default/hugo.toml @@ -23,6 +23,8 @@ tag = "tags" suffixes = ["js", "mjs"] [mediaTypes."application/activity+json"] suffixes = ["ajson"] +[mediaTypes."application/json"] +suffixes = ["json"] [outputFormats] [outputFormats.ACTIVITY] @@ -33,9 +35,13 @@ baseName = "activity" mediaType = "application/activity+json" notAlternative = true baseName = "outbox" +[outputFormats.MANIFEST] +mediaType = "application/json" +notAlternative = true +baseName = "manifest" [outputs] -home = ["HTML", "RSS", "ACTIVITY", "ACTIVITY_OUTBOX"] +home = ["HTML", "RSS", "ACTIVITY", "ACTIVITY_OUTBOX", "MANIFEST"] section = ["HTML", "RSS"] page = ["HTML"] diff --git a/static/manifest.json b/layouts/index.manifest.json similarity index 58% rename from static/manifest.json rename to layouts/index.manifest.json index 45735a011..94facd592 100644 --- a/static/manifest.json +++ b/layouts/index.manifest.json @@ -1,7 +1,7 @@ { - "name": "FLEAR - Free & Libre Engineers for Amateur Radio", - "short_name": "FLEAR", - "description": "The website of FLEAR, Free & Libre Engineers for Amateur Radio.", + "name": `{{ .Site.Params.siteName }} - {{ .Site.Params.siteTagLine }}`, + "short_name": {{ .Site.Params.siteName }}, + "description": {{ .Site.Params.siteDescription }}, "start_url": "/?homescreen=1", "theme_color": "#000000", "background_color": "#000000", -- GitLab