mirror of
https://github.com/alex-shpak/hugo-book.git
synced 2024-11-21 19:09:29 +00:00
Add manifest
This commit is contained in:
parent
c672d64f12
commit
e2ffa7b3ad
15
assets/manifest.json
Normal file
15
assets/manifest.json
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"name": "{{ .Site.Title }}",
|
||||
"short_name": "{{ .Site.Title }}",
|
||||
"start_url": "{{ "/" | relURL }}",
|
||||
"scope": "{{ "/" | relURL }}",
|
||||
"display": "standalone",
|
||||
"background_color": "#000000",
|
||||
"theme_color": "#000000",
|
||||
"icons": [
|
||||
{
|
||||
"src": "{{ "/favicon.svg" | relURL }}",
|
||||
"sizes": "512x512"
|
||||
}
|
||||
]
|
||||
}
|
@ -8,10 +8,9 @@ const pages = [
|
||||
self.addEventListener("install", function (event) {
|
||||
self.skipWaiting();
|
||||
|
||||
const precache = caches.open(cacheName).then((cache) => {
|
||||
caches.open(cacheName).then((cache) => {
|
||||
return cache.addAll(pages);
|
||||
});
|
||||
event.waitUntil(precache);
|
||||
});
|
||||
|
||||
self.addEventListener("fetch", (event) => {
|
||||
|
@ -1,4 +1,4 @@
|
||||
<div class="flex justify-between">
|
||||
<div class="flex flex-wrap justify-between">
|
||||
{{ if .Site.IsMultiLingual }}
|
||||
{{ partial "docs/languages" . }}
|
||||
{{ end }}
|
||||
|
@ -1,10 +1,14 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="{{ default .Summary .Description }}">
|
||||
<meta name="theme-color" content="#FFFFFF">
|
||||
|
||||
{{- template "_internal/opengraph.html" . -}}
|
||||
|
||||
<title>{{ partial "docs/title" . }} | {{ .Site.Title -}}</title>
|
||||
|
||||
{{- $manifest := resources.Get "manifest.json" | resources.ExecuteAsTemplate "manifest.json" . }}
|
||||
<link rel="manifest" href="{{ $manifest.RelPermalink }}">
|
||||
<link rel="icon" href="{{ "favicon.png" | relURL }}" type="image/x-icon">
|
||||
|
||||
{{- range .Translations }}
|
||||
|
1
static/favicon.svg
Normal file
1
static/favicon.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M3 18h12v-2H3v2zM3 6v2h18V6H3zm0 7h18v-2H3v2z"/></svg>
|
After Width: | Height: | Size: 185 B |
Loading…
Reference in New Issue
Block a user