mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2026-07-27 12:56:03 -04:00
add Onion-Location header to each page with relative URLs (#401)
http://jarvisz2fxjx54yve4zgtp5rehnwehu22nkww47dg2qv4e6xxzq6fdyd.onion
This commit is contained in:
@@ -11,3 +11,16 @@
|
||||
# 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 -}}
|
||||
|
||||
Reference in New Issue
Block a user