Web app manifests with Hugo View article history Edit article

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:

  suffixes = ["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 }}"