mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-01-18 19:00:24 +00:00
theme: only use RelPermalink for caching #380
because achretypes caching was unreliable when the whole page was used; Hugo bug or is it just me?
This commit is contained in:
parent
92919ac893
commit
d2d7d808a0
9 changed files with 9 additions and 9 deletions
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
{{- partialCached "page-meta.hugo" . . }}
|
||||
{{- partialCached "page-meta.hugo" . .RelPermalink }}
|
||||
{{- $outputFormat := partial "output-format.hugo" . }}
|
||||
<html lang="{{ .Page.Language | default "en" }}" dir="{{ T "Reading-direction" | default "ltr" }}">
|
||||
<head>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{{- partialCached "page-meta.hugo" . . }}
|
||||
{{- partialCached "page-meta.hugo" . .RelPermalink }}
|
||||
{{- $pages := slice }}
|
||||
{{- range .Site.Pages }}
|
||||
{{- if and .Title (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableSearchHiddenPages true) ) }}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{{- partialCached "page-meta.hugo" . . }}
|
||||
{{- partialCached "page-meta.hugo" . .RelPermalink }}
|
||||
{{- $pages := slice }}
|
||||
{{- range .Site.Pages }}
|
||||
{{- if and .Title (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableSearchHiddenPages true) ) }}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{{- partialCached "page-meta.hugo" . . }}
|
||||
{{- partialCached "page-meta.hugo" . .RelPermalink }}
|
||||
{{- $pages := .Page.Pages }}
|
||||
{{- if .Page.IsHome }}
|
||||
{{- $pages = .Page.Sections }}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{{- partialCached "page-meta.hugo" . . }}
|
||||
{{- partialCached "page-meta.hugo" . .RelPermalink }}
|
||||
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\" ?>" | safeHTML }}
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">
|
||||
{{- range .Data.Pages }}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{{- partialCached "page-meta.hugo" . . }}
|
||||
{{- partialCached "page-meta.hugo" . .RelPermalink }}
|
||||
{{- $outputFormat := partial "output-format.hugo" . }}
|
||||
{{- partial "output-partial.hugo" (dict "base" "header" "page" . "parameter" . "outputFormat" $outputFormat) }}
|
||||
{{- if not .File }}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{{- partialCached "page-meta.hugo" . . }}
|
||||
{{- partialCached "page-meta.hugo" . .RelPermalink }}
|
||||
{{- partial "header.html" . }}
|
||||
<article>
|
||||
{{- $page := . }}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
</main><!-- #body-inner -->
|
||||
{{- partial "custom-comments.html" . }}
|
||||
</div><!-- #body -->
|
||||
{{- partialCached "menu.html" . . }}
|
||||
{{- partialCached "menu.html" . .RelPermalink }}
|
||||
<script src="{{"js/clipboard.min.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}" defer></script>
|
||||
<script src="{{"js/perfect-scrollbar.min.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}" defer></script>
|
||||
<script src="{{"js/featherlight.min.js" | relURL}}{{ if not .Site.Params.disableAssetsBusting }}?{{ now.Unix }}{{ end }}" defer></script>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
{{- if not $outputFormat }}
|
||||
{{- $outputFormat = partial "output-format.hugo" $page }}
|
||||
{{- end }}
|
||||
{{- $suffix := partialCached "output-suffix.hugo" $page $page $outputFormat }}
|
||||
{{- $suffix := partialCached "output-suffix.hugo" $page $page.RelPermalink $outputFormat }}
|
||||
{{- $f := printf "/layouts/partials/%s.%s.%s" $base $outputFormat $suffix }}
|
||||
{{- if or (not $outputFormat) (not (partialCached "fileExists.hugo" $f $f)) }}
|
||||
{{- $f = printf "/layouts/partials/%s.%s" $base $suffix }}
|
||||
|
|
Loading…
Reference in a new issue