diff options
| -rw-r--r-- | layouts/_default/baseof.html | 6 | ||||
| -rw-r--r-- | layouts/partials/head.html | 19 | ||||
| -rw-r--r-- | layouts/partials/sidebar-toc.html | 0 | ||||
| -rw-r--r-- | layouts/partials/sidebar.html | 0 |
4 files changed, 14 insertions, 11 deletions
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 88882e5..13630ce 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -2,6 +2,12 @@ <html lang="{{ .Site.Language.Lang }}"> {{- partial "head.html" . -}} <body class="theme-base-{{ .Site.Params.color_scheme }}"> + <!-- This if statement decides which sidebar to use --> + {{- if .Params.toc -}} + {{- partial "sidebar-toc.html" . -}} + {{- else -}} + {{- partial "sidebar.html" . -}} + {{- end -}} </body> </html> diff --git a/layouts/partials/head.html b/layouts/partials/head.html index a324697..1518319 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -1,8 +1,6 @@ <head prefix="og: http://ogp.me/ns#; dc: http://purl.org/dc/terms/#"> - {{- $resource_url := print .Site.BaseURL | safeURL -}} - {{- $title := print .Title -}} - {{ if .IsHome }}{{ $title = .Site.Title }}{{ end }} + {{- if .IsHome }}{{ $title = .Site.Title }}{{ end -}} {{- $description := print .Params.Description -}} {{- if or .IsHome (eq .Params.Description "") (not .Params.Description) -}} @@ -11,7 +9,6 @@ {{- $author := print .Site.Author.name -}} {{- if .Params.author -}}{{ $author = .Params.author }}{{- end -}} - <!-- Basic meta elements --> <meta charset="utf-8"> @@ -22,20 +19,21 @@ <link rel="canonical" href="{{ .Permalink }}"> <title>{{ $title }}</title> + <meta name="description" content="{{ $description }}"> <!-- Dublin Core metadata for Zotero --> <meta property="dc:title" content="{{ $title }}"> <meta property="dc:creator" content="{{ $author }}"> <meta property="dc:identifier" content="{{ .Permalink }}"> - {{ if .Params.editor }}<meta property="dc:contributor" content="{{ .Params.editor }}">{{ end }} - {{ if .Params.pub_date }}<meta property="dc:date" content="{{ .Params.pub_date }}">{{ end }} - {{ if .Params.rights }}<meta property="dc:rights" content="{{ .Params.rights }}">{{ end }} + {{- if .Params.editor }}<meta property="dc:contributor" content="{{ .Params.editor }}">{{ end }} + {{- if .Params.pub_date }}<meta property="dc:date" content="{{ .Params.pub_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 }}"> <!-- Open Graph metadata --> <meta property="og:title" content="{{ $title }}"> <meta property="og:url" content="{{ .Permalink }}"> - <meta property="og:image" content="{{ $resource_url }}{{ "img/open-graph-logo.png" }}"> + <meta property="og:image" content="{{ .Site.BaseURL | safeURL }}{{ "img/open-graph-logo.png" }}"> <meta property="og:image:width" content="200"> <meta property="og:image:height" content="200"> {{- /* TODO: add fb:admins and fb:app_id */ -}} @@ -43,13 +41,12 @@ <!-- meta property="fb:app_id" content="" --> {{- /* TODO: add ability to render 'article' type */ -}} - <meta name="description" content="{{ $description }}"> <meta property="og:description" content="{{ .Site.Params.Description }}"> <meta property="og:type" content="website"> <!-- CSS link --> - {{ $sass := resources.Get "sass/style.scss" -}} - {{ $style := $sass | resources.ToCSS | resources.Minify | resources.Fingerprint -}} + {{- $sass := resources.Get "sass/style.scss" }} + {{- $style := $sass | resources.ToCSS | resources.Minify | resources.Fingerprint }} <link rel="stylesheet" href="{{ $style.RelPermalink }}"> <!-- Icons --> diff --git a/layouts/partials/sidebar-toc.html b/layouts/partials/sidebar-toc.html new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/layouts/partials/sidebar-toc.html diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/layouts/partials/sidebar.html |
