AutoGen
I’ve declared the following configuration knobs
Global Attributes #
Global Enablement #
Site.Params.sitemeta.enabled- Bool (Default:
false)
Controls if we do a god damned thing.
If this parameter isfalseAll processing is aborted.
Color #
Site.Params.sitemeta.sitecolor- RGB Hex (Default:
#000000)
The Hex Value Web Color associated with the site’s theme.
Author #
Site.Params.sitemeta.siteauthor- String (Default:
null)
If set, this will be used as the siteauthor.
Ifnull, we default to$.Site.Title
Description #
Site.Params.sitemeta.sitedesc- String (Default:
null)
If set, this will be used as the sitedescription.
Ifnull, we default to$.Site.BaseURL
Language #
Site.Params.sitemeta.sitelang- String (Default:
null)
If set, this will be used as the Sitelang.
Ifnull, we default to$.Site.Params.isocode
Short Name #
Site.Params.sitemeta.siteshortname- String (Default:
null)
If set, this will be used as the Siteshort_name.
Ifnull, we default to$.Site.Title
Title #
Site.Params.sitemeta.sitetitle- String (Default:
null)
If set, this will be used as the Sitename.
Ifnull, we default to$.Site.Title
URL #
Site.Params.sitemeta.siteurl- URL (Default:
null)
If set, this will be used as the sitestart_url.
Ifnull, we default to$.Site.BaseURL
Source Image #
Site.Params.sitemeta.sourceimage- String (Default:
null)
This is the full-sized image that will be used by default to create the rest of the images, unless an alternate is specified in a narrower scope.
Meta Tags #
Site.Params.sitemeta.metatags- Slice (Default:
name)
There are several metadata tags included in site headers. The supported attribute keys at time of writing arecharset,content,http-equiv,name
Each tag has an attribute key, and a content key, which stores the associated value string.
FavIcon #
Site.Params.sitemeta.favicon- Dict (Default:
generate: true) Whether or not to create/populate favicon metadata and files.
Params.yaml config: #
sitemeta
webmanifest
{
"background_color": "auto",
"debug": false,
"dir": "ltr",
"display": "standalone",
"icons": {
"defaultimage": "sitemeta/img/HnPSquare-1024-mono-and-halfopacity.png",
"generate": [
{
"format": "svg",
"inclsize": false,
"mimetype": "image/svg+xml",
"postfix": "",
"prefix": "safari-pinned-tab",
"purpose": "any",
"rel": "mask-icon",
"sizes": [
16,
32,
64
],
"src": "sitemeta/img/HnPSquare-mono-and-halfopacity.svg"
},
{
"format": "png",
"inclsize": true,
"mimetype": null,
"postfix": "",
"prefix": "apple-touch-icon",
"purpose": "any",
"rel": "apple-touch-icon",
"sizes": [
16,
32
],
"src": "sitemeta/img/favicon.png"
},
{
"format": "png",
"inclsize": true,
"mimetype": null,
"postfix": "precomposed",
"prefix": "apple-touch-icon",
"purpose": "any",
"rel": "icon",
"sizes": [
32,
16
],
"src": "sitemeta/img/favicon.png"
},
{
"format": "ico",
"inclsize": false,
"mimetype": "image/x-icon",
"prefix": "favicon",
"purpose": "any",
"rel": "icon",
"sizes": [
"48"
],
"src": "sitemeta/img/favicon.ico"
},
{
"format": "svg",
"inclsize": false,
"mimetype": "image/svg+xml",
"postfix": "",
"prefix": "favicon",
"purpose": "any",
"rel": "icon",
"sizes": [
"any"
],
"src": "sitemeta/img/HnPSquare-bgw.svg"
},
{
"format": "png",
"inclsize": true,
"mimetype": null,
"postfix": "",
"prefix": "favicon",
"purpose": "any",
"rel": "icon",
"sizes": [
16,
32
],
"src": "sitemeta/img/favicon.png"
},
{
"format": "png",
"inclsize": true,
"mimetype": null,
"postfix": "",
"prefix": "android-chrome",
"purpose": "any",
"rel": "icon",
"sizes": [
512,
256,
192,
128
],
"src": "sitemeta/img/wpl-1024-src.png"
},
{
"format": "png",
"inclsize": false,
"postfix": "",
"prefix": "apple-touch-icon",
"purpose": "any",
"rel": "icon",
"sizes": [
64
],
"src": "sitemeta/img/wpl-1024-src.png"
}
],
"version": "0.2"
},
"orientation": "natural",
"scope": "/"
}
{
"background_color": "auto",
"debug": false,
"dir": "ltr",
"display": "standalone",
"icons": {
"defaultimage": "sitemeta/img/HnPSquare-1024-mono-and-halfopacity.png",
"generate": [
{
"format": "svg",
"inclsize": false,
"mimetype": "image/svg+xml",
"postfix": "",
"prefix": "safari-pinned-tab",
"purpose": "any",
"rel": "mask-icon",
"sizes": [
16,
32,
64
],
"src": "sitemeta/img/HnPSquare-mono-and-halfopacity.svg"
},
{
"format": "png",
"inclsize": true,
"mimetype": null,
"postfix": "",
"prefix": "apple-touch-icon",
"purpose": "any",
"rel": "apple-touch-icon",
"sizes": [
16,
32
],
"src": "sitemeta/img/favicon.png"
},
{
"format": "png",
"inclsize": true,
"mimetype": null,
"postfix": "precomposed",
"prefix": "apple-touch-icon",
"purpose": "any",
"rel": "icon",
"sizes": [
32,
16
],
"src": "sitemeta/img/favicon.png"
},
{
"format": "ico",
"inclsize": false,
"mimetype": "image/x-icon",
"prefix": "favicon",
"purpose": "any",
"rel": "icon",
"sizes": [
"48"
],
"src": "sitemeta/img/favicon.ico"
},
{
"format": "svg",
"inclsize": false,
"mimetype": "image/svg+xml",
"postfix": "",
"prefix": "favicon",
"purpose": "any",
"rel": "icon",
"sizes": [
"any"
],
"src": "sitemeta/img/HnPSquare-bgw.svg"
},
{
"format": "png",
"inclsize": true,
"mimetype": null,
"postfix": "",
"prefix": "favicon",
"purpose": "any",
"rel": "icon",
"sizes": [
16,
32
],
"src": "sitemeta/img/favicon.png"
},
{
"format": "png",
"inclsize": true,
"mimetype": null,
"postfix": "",
"prefix": "android-chrome",
"purpose": "any",
"rel": "icon",
"sizes": [
512,
256,
192,
128
],
"src": "sitemeta/img/wpl-1024-src.png"
},
{
"format": "png",
"inclsize": false,
"postfix": "",
"prefix": "apple-touch-icon",
"purpose": "any",
"rel": "icon",
"sizes": [
64
],
"src": "sitemeta/img/wpl-1024-src.png"
}
],
"version": "0.2"
},
"orientation": "natural",
"scope": "/"
}BrowserConfig #
Site.Params.sitemeta.browserconfig.generate- Bool (Default:
true)
Controls if we should generate thebrowserconfig.xmlasset. Site.Params.sitemeta.browserconfig.images.generate.src- File (Default
null)
The source image to use to generate the images for browserconfig.
Ifnull, we use thesourceimageasset declared for the sitemeta scope. Site.Params.sitemeta.browserconfig.images.generate.variants- Dict (Default:)
Site.Params.sitemeta.browserconfig.images.generate.version- String (Default:
1.0)
appended to the image resource declaration inside the generated browserconfig file. Site.Params.sitemeta.browserconfig.include- Bool (Default:
true)
Controls if we should include thebrowserconfig.xmlasset in the header metadata. Site.Params.sitemeta.browserconfig.target- String (Default:
browserconfig.xml)
The target to populate from the browserconfig template.
This should usually just bebrowserconfig.xml Site.Params.sitemeta.browserconfig.template- String (Default:
sitemeta/browserconfig.xml-template)
The template file to use to generate the browserconfig file.
This should usually just besitemeta/browserconfig.xml-template.
Template Location: noteFor the template generation to work as anticipated, it’s expected that these templates will be pathed relative to your site’sassetsdirectory.
Site.Params.sitemeta.browserconfig.tilecolor- RGB Hex (Default:
undef)
If set, This will populate the Hex Value Web Color in the generated browserconfig xml file.
If not set, The value used will be populated from the global ``
WebManifest #
a webmanifest file
Site.Params.sitemeta.webmanifest.generate- Bool (Default:
true)
Controls if we should generate thewebmanifest.jsonasset. Site.Params.sitemeta.webmanifest.include- Bool (Default:
true)
Controls if we should include thewebmanifest.jsonasset in the header metadata. Site.Params.sitemeta.webmanifest.include_all- Bool (Default:
true)
Controls if we should include any additional copies of thewebmanifestdata in the header metadata. Site.Params.sitemeta.webmanifest.template- String (Default:
sitemeta/webmanifest.json-template)
The template file to use to generate the browserconfig file.
This should usually just besitemeta/webmanifest.json-template.
Template LocationFor the template generation to work as anticipated, it’s expected that these templates will be pathed relative to your site’sassetsdirectory.
Site.Params.sitemeta.webmanifest.target- String (Default:
manifest.webmanifest) The target to populate with the webmanifest content. Site.Params.sitemeta.webmanifest.additional_targets- Slice (Default:
[ '.webmanifest', 'webmanifest.json', 'site.webmanifest', 'manifest.json'])
A list of additional targets to populate in addition to the resource created above. Site.Params.sitemeta.webmanifest.background_color- bool (Default:
undef)
The manifest’s background_color member describes the expected background color of the web application.
Docs1 Site.Params.sitemeta.webmanifest.dir- String (Default:
undef)
The text direction. acceptable options areltr,rtl, andauto.
https://w3c.github.io/manifest/#dir-member
Site.Params.sitemeta.webmanifest.display- bool (Default:
undef) Site.Params.sitemeta.webmanifest.description- String (Default:
undef)
The content to use for the Site Description. Ifnullwe failback to consumingparams.sitemeta.sitedescwhich consumesParams.description
Docs Site.Params.sitemeta.webmanifest.icons- Dict
This is a slice of dicts, each represents a different name variant of the images we want added to the webmanifest, and created.Site.Params.sitemeta.webmanifest.icons.generate.src
Site.Params.sitemeta.webmanifest.icons.generate.version
Site.Params.sitemeta.webmanifest.icons.generate.variants
prefix: ``
src:
postfix: ``
rel: `icon` `mask-icon`
inclsize: bool - include the size in the filename or not
purpose:
format:
sizes:
mimetype:
purpose: [‘monochrome’, ‘maskable’, ‘any’ ] Docs2
Site.Params.sitemeta.webmanifest.id- String (Default:
undef)
The id property represents the identity of the PWA to the browser.
When the browser sees a manifest that does not have an identity that matches an already installed PWA, it will treat it as a new PWA, even if it is served from the same URL as another PWA.
But if it sees a manifest with an identity that matches the already installed PWA, it will treat that as the installed PWA.
Docs: Chrome3 w3cdocs4 Site.Params.sitemeta.webmanifest.lang- String (Default:
undef)
The language tag for the site. Defaults to consuming$.Site.Params.sitemeta.sitelangDocs5 Site.Params.sitemeta.webmanifest.name- bool (Default:
undef)
The name member serves as the accessible name of an installed web application.
Docs:6 Site.Params.sitemeta.webmanifest.orientation- bool (Default:
undef) Site.Params.sitemeta.webmanifest.prefer_related_applications- bool (Default:
undef) Site.Params.sitemeta.webmanifest.related_applications- bool (Default:
undef) Site.Params.sitemeta.webmanifest.scope- bool (Default:
undef) Site.Params.sitemeta.webmanifest.short_name- String (Default:
null)
A string that represents a short version of the name of the web application.
It is intended to be used where there is insufficient space to display the full name of the web application.
Ifnull, we default to$.Site.TitleDocs:7 Site.Params.sitemeta.webmanifest.shortcuts- Dict (Default:
undef) If populated, may be a list of sub pages relevant to the site.
Docs8 Site.Params.sitemeta.webmanifest.start_url- bool (Default:
undef) Site.Params.sitemeta.webmanifest.theme_color- bool (Default:
undef) Site.Params.sitemeta.webmanifest.lang- Bool (Default:
true)
Controls if we should include thewebmanifest.jsonasset in the header metadata. Site.Params.sitemeta.webmanifest.display- String (Default:
standalone)
The different modes a webapp may request.
Accepted Values:
fullscreenstandaloneminimal-ui- `browse
Controls if we should include the webmanifest.json asset in the header metadata.
References:
Favicons:
WebManifest:
- W3C: Web App Manifest Definition
- web.dev: Add a web-app Manifest
- Mozilla Developer Reference - Web App Manifests
BrowserConfig and Tiles:
- Microsoft Tiles and Schema Portal11
- Microsoft Tiles Reference12
- Microsoft Tile Schema13
- Microsoft Toast Schema14
- Microsoft Badge Schema15
- Microsoft Tile Description16
Hugo Discourse:
Hugo Docpages:
https://mailchimp.com/resources/favicon-size/ https://dev.to/abbeyperini/what-are-favicons-2e9d
-
https://w3c.github.io/manifest/#background_color-member ↩︎ ↩︎
-
https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/pinnedTabs/pinnedTabs.html ↩︎
-
https://dev.to/masakudamatsu/favicon-nightmare-how-to-maintain-sanity-3al7 ↩︎
-
https://learn.microsoft.com/en-us/uwp/schemas/tiles/tiles-xml-schema-portal ↩︎
-
https://learn.microsoft.com/en-us/previous-versions/windows/apps/hh761491(v=win.10) ↩︎
-
https://learn.microsoft.com/en-us/uwp/schemas/tiles/tilesschema/schema-root ↩︎
-
https://learn.microsoft.com/en-us/uwp/schemas/tiles/toastschema/schema-root ↩︎
-
https://learn.microsoft.com/en-us/uwp/schemas/tiles/badgeschema/schema-root ↩︎
-
https://learn.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/platform-apis/dn255024(v=vs.85)#msapplication-tilecolor ↩︎