diff --git a/exampleSite/config/_default/config.toml b/exampleSite/config/_default/config.toml
index fc887066..a941dffd 100644
--- a/exampleSite/config/_default/config.toml
+++ b/exampleSite/config/_default/config.toml
@@ -40,9 +40,16 @@ footnotereturnlinkcontents = "^"
ignoreFiles = ["\\.ipynb$", ".ipynb_checkpoints$", "\\.Rmd$", "\\.Rmarkdown$", "_files$", "_cache$"]
[outputs]
- home = [ "HTML", "RSS", "JSON" ]
+ home = [ "HTML", "RSS", "JSON", "WebAppManifest" ]
section = [ "HTML", "RSS" ]
+[mediaTypes."application/manifest+json"]
+ suffixes = ["webmanifest"]
+
+[outputFormats.WebAppManifest]
+ mediaType = "application/manifest+json"
+ rel = "manifest"
+
# Configure BlackFriday Markdown rendering.
# See: https://gohugo.io/getting-started/configuration/#configure-blackfriday
[blackfriday]
diff --git a/layouts/index.webmanifest b/layouts/index.webmanifest
new file mode 100644
index 00000000..ba45b602
--- /dev/null
+++ b/layouts/index.webmanifest
@@ -0,0 +1,18 @@
+{{- $scr := .Scratch -}}
+{
+ "name": "{{site.Title}}",
+ "lang": "{{site.LanguageCode}}",
+ "theme_color": "{{ $scr.Get "primary" }}",
+ "background_color": "{{ $scr.Get "primary" }}",
+ "icons": [{
+ "src": "img/icon-192.png",
+ "sizes": "192x192",
+ "type": "image/png"
+ }{{- if (fileExists "static/img/icon-512.png") -}}, {
+ "src": "img/icon-512.png",
+ "sizes": "512x512",
+ "type": "image/png"
+ }{{end}}],
+ "display": "standalone",
+ "start_url": "./?utm_source=web_app_manifest"
+}
diff --git a/layouts/partials/site_head.html b/layouts/partials/site_head.html
index 03f0df8a..375ce0cb 100644
--- a/layouts/partials/site_head.html
+++ b/layouts/partials/site_head.html
@@ -138,7 +138,10 @@
{{ end }}
-
+ {{ range .AlternativeOutputFormats }}
+
+ {{ end }}
+
diff --git a/static/site.webmanifest b/static/site.webmanifest
deleted file mode 100644
index d60a85db..00000000
--- a/static/site.webmanifest
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "icons": [{
- "src": "img/icon.png",
- "sizes": "32x32",
- "type": "image/png"
- },{
- "src": "img/icon-192.png",
- "sizes": "192x192",
- "type": "image/png"
- }],
- "display": "standalone",
- "start_url": "./?utm_source=web_app_manifest"
-}