mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-01-18 19:00:24 +00:00
theme: cache page-meta.hugo #380
This commit is contained in:
parent
31173665d9
commit
b1866d62df
8 changed files with 7 additions and 8 deletions
|
@ -1,4 +1,4 @@
|
|||
{{- partial "page-meta.hugo" . }}
|
||||
{{- partialCached "page-meta.hugo" . . }}
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ .Page.Language | default "en" }}" dir="{{ T "Reading-direction" | default "ltr" }}">
|
||||
<head>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{{- partial "page-meta.hugo" . }}
|
||||
{{- partialCached "page-meta.hugo" . . }}
|
||||
{{- $pages := slice }}
|
||||
{{- range .Site.Pages }}
|
||||
{{- if and .Title (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableSearchHiddenPages true) ) }}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{{- partial "page-meta.hugo" . }}
|
||||
{{- partialCached "page-meta.hugo" . . }}
|
||||
{{- $pages := slice }}
|
||||
{{- range .Site.Pages }}
|
||||
{{- if and .Title (or (ne (.Scratch.Get "relearnIsHiddenStem") true) (ne .Site.Params.disableSearchHiddenPages true) ) }}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{{- partial "page-meta.hugo" . }}
|
||||
{{- partialCached "page-meta.hugo" . . }}
|
||||
{{- $pages := .Page.Pages }}
|
||||
{{- if .Page.IsHome }}
|
||||
{{- $pages = .Page.Sections }}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{{- partial "page-meta.hugo" . }}
|
||||
{{- partialCached "page-meta.hugo" . . }}
|
||||
{{- 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 @@
|
|||
{{- partial "page-meta.hugo" . }}
|
||||
{{- partialCached "page-meta.hugo" . . }}
|
||||
{{- partial "output-partial.hugo" (dict "base" "header" "page" . "parameter" .) }}
|
||||
{{- if not .File }}
|
||||
{{- partial "output-partial.hugo" (dict "base" "body" "page" . "parameter" (dict "page" . "content" (partial "output-partial.hugo" (dict "base" "initial" "page" . "parameter" .)))) }}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{{- partial "page-meta.hugo" . }}
|
||||
{{- partialCached "page-meta.hugo" . . }}
|
||||
{{- partial "header.html" . }}
|
||||
<article>
|
||||
{{- $page := . }}
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
{{- $currentNode.Scratch.Delete "relearnIsHiddenNode" }}{{/* the node itself is flagged as hidden */}}
|
||||
{{- $currentNode.Scratch.Delete "relearnIsHiddenStem" }}{{/* the node or one of its parents is flagged as hidden */}}
|
||||
{{- $currentNode.Scratch.Delete "relearnIsHiddenFrom" }}{{/* the node is hidden from the current page */}}
|
||||
{{- $currentNode.Scratch.Delete (printf "%sWantsMathJax" (partial "output-format.hugo" $currentNode)) }}
|
||||
{{- $wantsMathjax := or (and (ne $currentNode.Params.disableMathjax nil) (not $currentNode.Params.disableMathjax)) (and (ne .Site.Params.disableMathjax nil) (not .Site.Params.disableMathjax)) }}
|
||||
{{- if $wantsMathjax }}
|
||||
{{- $currentNode.Store.Set "hasMathJax" true }}
|
||||
|
|
Loading…
Reference in a new issue