diff options
author | Rohan Kumar <[email protected]> | 2021-06-09 16:13:46 -0700 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2021-06-18 13:11:44 +0200 |
commit | 02f31897b4f7252154850a65c900e88e0b237fa3 (patch) | |
tree | 97a517c98892ec07d9e31e0a20e2c759e89db398 /output | |
parent | 402da3f8f327f97302c4b5d69cd4832a94bd189b (diff) | |
download | hugo-02f31897b4f7252154850a65c900e88e0b237fa3.tar.gz hugo-02f31897b4f7252154850a65c900e88e0b237fa3.zip |
media: support application/manifest+json
The standard file extension for Web App Manifest files is
".webmanifest". This commit allows Hugo to recognize .webmanifest files
as "application/manifest+json" files and to minify them using its
JSON minifier.
The .webmanifest file extension is recommended in the w3c spec to
simplify media type registration:
https://www.w3.org/TR/appmanifest/#media-type-registration
Webhint docs are also relevant:
https://webhint.io/docs/user-guide/hints/hint-manifest-file-extension/
Closes #8624
Diffstat (limited to 'output')
-rw-r--r-- | output/outputFormat.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/output/outputFormat.go b/output/outputFormat.go index a52f43c8b..a2ffd7993 100644 --- a/output/outputFormat.go +++ b/output/outputFormat.go @@ -143,6 +143,14 @@ var ( Rel: "alternate", } + WebAppManifestFormat = Format{ + Name: "WebAppManifest", + MediaType: media.WebAppManifestType, + BaseName: "manifest", + IsPlainText: true, + Rel: "manifest", + } + RobotsTxtFormat = Format{ Name: "ROBOTS", MediaType: media.TextType, @@ -176,6 +184,7 @@ var DefaultFormats = Formats{ CSVFormat, HTMLFormat, JSONFormat, + WebAppManifestFormat, RobotsTxtFormat, RSSFormat, SitemapFormat, |