Web app manifests with Hugo
Published:
, Updated:
Talks about:
<a class="post-tag post-tag-hugo" href="/tags/hugo">hugo</a>, <a class="post-tag post-tag-manifest" href="/tags/manifest">manifest</a>, and <a class="post-tag post-tag-web-app" href="/tags/web-app">web app</a>
To publish a web app manifest document with your Hugo site, configure a media type in your config.toml
:
[mediaTypes."application/manifest+json"]
suffixes = ["webmanifest"]
[outputFormats.Webmanifest]
name = "Web App Manifest"
mediaType = "application/manifest+json"
baseName = "manifest"
isPlainText = false
rel = "alternate"
isHTML = false
noUgly = true
permalinkable = false
Create a new layout in _default/home.manifest.json
with the following content:
{
"name": "{{ .Site.Title }}",
"short_name": "{{ .Site.Title }}",
"start_url": ".",
"display": "minimal-ui",
"background_color": "#fff",
"description": "{{ .Site.Params.description }}"
}