summaryrefslogtreecommitdiffstats
path: root/layouts/partials
diff options
context:
space:
mode:
authorSerghei Iakovlev <egrep@protonmail.ch>2022-05-01 11:56:29 +0200
committerSerghei Iakovlev <egrep@protonmail.ch>2022-05-01 11:56:29 +0200
commit4c3f5c2b8c890be8798d1bf25205d8249fe8faec (patch)
treec8ca654c9e87420b565a2ba976e0a0adfbc8775f /layouts/partials
parenta135e9bc110cb3337101e7e9d6d29c391430b0fc (diff)
downloadgohugo-theme-ed-4c3f5c2b8c890be8798d1bf25205d8249fe8faec.tar.gz
Use site function instead of .Site or $.Site
Diffstat (limited to 'layouts/partials')
-rw-r--r--layouts/partials/head.html6
-rw-r--r--layouts/partials/sidebar.html8
2 files changed, 7 insertions, 7 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 5c76d9f..f4303e1 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -2,7 +2,7 @@
<head prefix="og: http://ogp.me/ns#; dc: http://purl.org/dc/terms/#">
{{- $description := print .Params.Description -}}
{{- if or .IsHome (eq .Params.Description "") (not .Params.Description) -}}
- {{ $description = .Site.Params.Description }}
+ {{ $description = site.Params.Description }}
{{- end -}}
<meta charset="utf-8">
@@ -11,7 +11,7 @@
<link rel="canonical" href="{{ .Permalink }}">
- <title>{{ block "title" . }}{{ if .IsHome }}{{ .Site.Title }}{{ else }}{{ with .Params.Title }}{{ . }} - {{ end }}{{ .Site.Title }}{{ end }}{{ end }}</title>
+ <title>{{ block "title" . }}{{ if .IsHome }}{{ site.Title }}{{ else }}{{ with .Params.Title }}{{ . }} - {{ end }}{{ site.Title }}{{ end }}{{ end }}</title>
<meta name="description" content="{{ $description }}">
<meta name="author" content="{{ (partial "author.html" . ) }}">
{{ hugo.Generator }}
@@ -23,7 +23,7 @@
{{- if .Params.editor }}<meta property="dc:contributor" content="{{ .Params.editor }}">{{ end }}
{{- if .Params.date }}<meta property="dc:date" content="{{ .Params.date }}">{{ end }}
{{- if .Params.rights }}<meta property="dc:rights" content="{{ .Params.rights }}">{{ end }}
- <meta property="dc:source" content="{{ if .Params.source }}{{ .Params.source }}{{ else }}{{ .Site.Title }}{{ end }}">
+ <meta property="dc:source" content="{{ if .Params.source }}{{ .Params.source }}{{ else }}{{ site.Title }}{{ end }}">
{{- /* Misc */}}
{{template "partials/templates/opengraph.html" . }}
diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html
index 8178537..70f0b81 100644
--- a/layouts/partials/sidebar.html
+++ b/layouts/partials/sidebar.html
@@ -4,15 +4,15 @@
<!-- Toggleable sidebar -->
<aside class="sidebar" id="sidebar">
<div class="sidebar-item">
- <p>{{- .Site.Params.Description -}}</p>
+ <p>{{- site.Params.Description -}}</p>
</div>
<nav class="sidebar-nav">
- <a class="sidebar-nav-item{{- if .IsHome }} active{{ end -}}" href="{{ .Site.Home.RelPermalink }}">Home</a>
+ <a class="sidebar-nav-item{{- if .IsHome }} active{{ end -}}" href="{{ site.Home.RelPermalink }}">Home</a>
{{- $current := . }}
{{- /* TODO: Render items dynamically */}}
- {{- range .Site.Menus.nav }}
+ {{- range site.Menus.nav }}
{{- $active := or ($current.IsMenuCurrent "nav" .) ($current.HasMenuCurrent "nav" .) }}
{{- $active = or $active (eq .Name $current.Title) }}
<a class="sidebar-nav-item {{ if $active }}active{{ end }}" href="{{ .URL }}">
@@ -21,7 +21,7 @@
</a>
{{- end -}}
{{/* TODO: Add hypothesis support */}}
- <a class="sidebar-nav-item" href="{{ .Site.Params.github_url }}" target="_blank">GitHub project</a>
+ <a class="sidebar-nav-item" href="{{ site.Params.github_url }}" target="_blank">GitHub project</a>
</nav>
<div class="sidebar-item">