added web app manifest

This commit is contained in:
Gabriele Musco 2021-12-21 10:31:52 +01:00
parent 7607cf97e7
commit 6c16f5afa9
No known key found for this signature in database
GPG Key ID: 0587A5D65B5DC99E
4 changed files with 42 additions and 2 deletions

View File

@ -49,6 +49,7 @@ summaryLength = 70 # number of words for article summaries
faviconIco = "/favicon.ico" # 32x32
appletouch = "/apple-touch-icon.png" # 180x180
svgicon = "/logo.svg"
icon512 = "/icon512.png" # 512x512 png image
showTags = true # show the Tags menu item; default true
showRss = true # show the link for the RSS feed; default true

7
content/manifest.md Normal file
View File

@ -0,0 +1,7 @@
---
title: Manifest
layout: manifest
outputs:
- "json"
norss: true
---

View File

@ -0,0 +1,31 @@
{
"$schema": "https://json.schemastore.org/web-manifest-combined.json",
"name": "{{ .Site.Title }}",
"short_name": "{{ .Site.Title }}",
"start_url": "/",
"display": "standalone",
"background_color": "{{ .Site.Params.backgroundColor | default "#242629" }}",
"theme_color": "{{ .Site.Params.accentColor | default "#db5793" }}"
{{ if .Site.Params.description }}
,
"description": "{{ .Site.Params.description }}"
{{ end }}
{{ if .Site.Params.icon512 }}
,
"icons": [
{
"src": "{{ .Site.Params.icon512 }}",
"sizes": "512x512",
"type": "image/png",
"purpose": "maskable"
},
{
"src": "{{ .Site.Params.icon512 }}",
"sizes": "512x512",
"type": "image/png",
"purpose": "any"
}
]
{{ end }}
}

View File

@ -23,11 +23,12 @@
{{ end }}
{{ .Site.Title | default "Ficurinia" }}
</title>
<link href="/symbols-nerd-font/symbols-nerd-font.css" rel="stylesheet">
<link href="/jetbrains-mono/jetbrains-mono.css" rel="stylesheet">
<link href="/symbols-nerd-font/symbols-nerd-font.css" rel="stylesheet" />
<link href="/jetbrains-mono/jetbrains-mono.css" rel="stylesheet" />
{{ $style := resources.Get "/scss/style.scss" | resources.ExecuteAsTemplate "/scss/style.scss" . | resources.ToCSS (dict "targetPath" "css/styles.css" "outputStyle" "compressed" "enableSourceMap" "true") | resources.Fingerprint "sha512" }}
<link type=text/css rel=stylesheet href={{ $style.Permalink }} integrity="{{ $style.Data.Integrity }}" />
{{- partial "inject/head.html" . -}}
{{- partial "head_meta_seo.html" . -}}
{{- partial "head_meta_opengraph.html" . -}}
<link rel="manifest" href="/manifest/index.json" />
</head>