Web app manifests with Hugo

Published:
Talks about: , , and

In order 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, e.g. 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 }}"
}