Prepare preliminary PWA support
Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
This commit is contained in:
parent
cd80f975e1
commit
0e5f41554c
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"name": "Harsh Shandilya's blog",
|
||||
"short_name": "msfjarvis.website",
|
||||
"description": "Thoughts and ramblings of a young software developer",
|
||||
"start_url": "/posts",
|
||||
"background_color": "#292a2d",
|
||||
"theme_color": "#a9a9b3",
|
||||
"icons": [{
|
||||
"src": "favicon-16x16.png",
|
||||
"sizes": "16x16",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "favicon-32x32.png",
|
||||
"sizes": "32x32",
|
||||
"type": "image/png"
|
||||
}]
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
self.addEventListener('fetch', (event) => {});
|
|
@ -6,6 +6,12 @@
|
|||
<meta name="keywords" content="{{ .Site.Params.keywords }}" />
|
||||
<meta name="robots" content="noodp" />
|
||||
<link rel="canonical" href="{{ .Permalink }}" />
|
||||
<script>
|
||||
if ('serviceWorker' in navigator) {
|
||||
// sw.js can literally be empty, but must exist
|
||||
navigator.serviceWorker.register('/sw.js');
|
||||
}
|
||||
</script>
|
||||
|
||||
{{ block "title" . }}
|
||||
<title>
|
||||
|
@ -23,6 +29,10 @@
|
|||
<!-- JS -->
|
||||
<script src="https://assets.digitalclimatestrike.net/widget.js" async></script>
|
||||
|
||||
<!-- PWA -->
|
||||
<link rel="manifest" href="manifest.webmanifest" />
|
||||
<script src="https://cdn.jsdelivr.net/npm/pwacompat@2.0.9/pwacompat.min.js" integrity="sha384-VcI6S+HIsE80FVM1jgbd6WDFhzKYA0PecD/LcIyMQpT4fMJdijBh0I7Iblaacawc" crossorigin="anonymous" async></script>
|
||||
|
||||
{{ $options := (dict "targetPath" "main.css" "outputStyle" "compressed" "enableSourceMap" true) }}
|
||||
{{ $style := resources.Get "scss/main.scss" | resources.ToCSS $options | resources.Minify | resources.Fingerprint }}
|
||||
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
|
||||
|
|
Loading…
Reference in New Issue