mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-09-03 20:22:41 +00:00
18 lines
865 B
HTML
18 lines
865 B
HTML
{{- /* Set site home relative permalink */ -}}
|
|
{{- $homeRelPermalink := .Site.Home.RelPermalink -}}
|
|
{{- $homeRelPermalink = strings.TrimSuffix "archives/" $homeRelPermalink -}}
|
|
{{- $homeRelPermalink = strings.TrimSuffix "offline/" $homeRelPermalink -}}
|
|
{{- .Scratch.Set "homeRelPermalink" $homeRelPermalink -}}
|
|
|
|
{{- /* Set pages of main sections */ -}}
|
|
{{- $pages := where .Site.RegularPages "Section" "in" .Site.MainSections -}}
|
|
{{- $pages = $pages | union (where .Site.RegularPages "Type" "in" .Site.MainSections) -}}
|
|
{{- .Scratch.Set "mainSectionPages" $pages -}}
|
|
|
|
{{- /* Select the scope named `public_repo` to generate personal access token */ -}}
|
|
{{- $header := dict "Authorization" "" -}}
|
|
{{- with (getenv "HUGO_PARAMS_GHTOKEN") -}}
|
|
{{- $header = dict "Authorization" (printf "token %v" .) -}}
|
|
{{- end -}}
|
|
{{- .Scratch.Set "githubTokenHeader" $header -}}
|