mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-04-27 21:10:29 -04:00
27 lines
947 B
Plaintext
27 lines
947 B
Plaintext
# Cache static assets (webfonts, emojis, etc.) for a long time (1 month)
|
|
/vendor/*
|
|
Cache-Control: max-age=2628000
|
|
|
|
# Recommended MIME type for PWA manifests:
|
|
# https://github.com/w3c/manifest/issues/689
|
|
/site.webmanifest
|
|
Content-Type: application/manifest+json
|
|
|
|
# AMP cache invalidation key requirements:
|
|
# https://developers.google.com/amp/cache/update-cache#update-cache-guidelines
|
|
/.well-known/amphtml/apikey.pub
|
|
Content-Type: text/plain; charset=UTF-8
|
|
|
|
# Set Source and Onion-Location headers based on each URL
|
|
{{- range $page := .Site.Pages }}
|
|
{{ $page.RelPermalink }}
|
|
Onion-Location: {{ print .Site.Params.baseOnionURL $page.RelPermalink }}
|
|
X-View-Source: {{ .Scratch.Get "sourceURL" }}
|
|
|
|
{{ if and .IsPage (ne .Params.amp false) -}}
|
|
{{ print $page.RelPermalink "amp.html" }}
|
|
Onion-Location: {{ print .Site.Params.baseOnionURL $page.RelPermalink "amp.html" }}
|
|
X-View-Source: {{ .Scratch.Get "sourceURL" }}
|
|
{{- end }}
|
|
{{ end -}}
|