mirror of
https://github.com/Vimux/Binario.git
synced 2024-11-24 06:58:35 +00:00
Rename context variable: "dot" -> "page"
Unified a variable name to pass context across layouts partials
This commit is contained in:
parent
5a51cb05c4
commit
77b9fc1ec7
3 changed files with 5 additions and 5 deletions
|
@ -3,7 +3,7 @@
|
|||
<div class="single block">
|
||||
<article class="post">
|
||||
{{- partial "post_featured.html" (dict "page" . "IsSingle" true) }}
|
||||
{{- partial "post_meta.html" (dict "dot" . "class" "mb") }}
|
||||
{{- partial "post_meta.html" (dict "page" . "class" "mb") }}
|
||||
<h1 class="post__title">{{ .Title }}</h1>
|
||||
{{- partial "post_toc.html" . }}
|
||||
<div class="post__content">{{ .Content }}</div>
|
||||
|
|
|
@ -4,5 +4,5 @@
|
|||
{{- with .Summary }}
|
||||
<div class="post__content">{{ . }}</div>
|
||||
{{- end }}
|
||||
{{- partial "post_meta.html" (dict "dot" . "class" "mt tar") }}
|
||||
{{- partial "post_meta.html" (dict "page" . "class" "mt tar") }}
|
||||
</article>
|
|
@ -1,7 +1,7 @@
|
|||
{{ $currentPage := .dot }}
|
||||
{{- if .dot.Param "post_meta" }}
|
||||
{{ $currentPage := .page }}
|
||||
{{- if .page.Param "post_meta" }}
|
||||
<div class="post__meta meta {{ .class }}">
|
||||
{{- range $metaField := .dot.Param "post_meta" -}}
|
||||
{{- range $metaField := .page.Param "post_meta" -}}
|
||||
{{- $metaFieldPath := printf "post_meta/%s.html" $metaField -}}
|
||||
{{- partial $metaFieldPath $currentPage -}}
|
||||
{{ end }}
|
||||
|
|
Loading…
Reference in a new issue