From d4c25d618dfff5fcbeb6e3db1bbc570ad0bd0061 Mon Sep 17 00:00:00 2001 From: Zachary Betz Date: Tue, 15 Jan 2019 16:18:57 -0600 Subject: Revert "Refactor theme to use new Hugo v0.53 vars" This reverts commit 5ab7bc751b278cff12aa7bf4a688a55d2ad50c68. --- README.md | 2 +- layouts/_default/terms.html | 2 +- layouts/index.html | 4 ++-- layouts/partials/date-and-tags.html | 2 +- layouts/partials/footer.html | 2 +- layouts/partials/google-analytics-async.html | 4 ++-- layouts/partials/head.html | 6 +++--- layouts/partials/nav.html | 4 ++-- layouts/partials/script.html | 2 +- layouts/partials/style.html | 2 +- theme.toml | 2 +- 11 files changed, 16 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 1382d5e..fa97c01 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ A vanilla [Bootstrap](https://getbootstrap.com/) theme for [Hugo](https://gohugo ## Minimum Hugo Version -This theme **requires** Hugo version `0.53` or higher. Take a look at the [Hugo releases](https://github.com/gohugoio/hugo/releases) and download the binary for your OS. +This theme **requires** Hugo version `0.48` or higher. Take a look at the [Hugo releases](https://github.com/gohugoio/hugo/releases) and download the binary for your OS. ## Installation diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html index d95c218..db79fae 100644 --- a/layouts/_default/terms.html +++ b/layouts/_default/terms.html @@ -6,7 +6,7 @@ {{ range $key, $value := .Data.Terms.ByCount }} {{ $name := .Name }} {{ $count := .Count }} - {{ with site.GetPage (printf "/%s/%s" $type $name) }} + {{ with $.Site.GetPage (printf "/%s/%s" $type $name) }}

{{ $count }} {{ $name }} diff --git a/layouts/index.html b/layouts/index.html index 4893b66..820e32e 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,8 +1,8 @@ {{ define "main" }}

-

{{ site.Title }}

-

{{ site.Params.homeText | markdownify }}

+

{{ .Site.Title }}

+

{{ .Site.Params.homeText | markdownify }}

{{ end }} \ No newline at end of file diff --git a/layouts/partials/date-and-tags.html b/layouts/partials/date-and-tags.html index 5adf746..1d6b1c2 100644 --- a/layouts/partials/date-and-tags.html +++ b/layouts/partials/date-and-tags.html @@ -1,5 +1,5 @@ {{ $dateTime := .PublishDate.Format "2006-01-02" }} -{{ $dateFormat := site.Params.dateFormat | default "Jan 2, 2006" }} +{{ $dateFormat := .Site.Params.dateFormat | default "Jan 2, 2006" }} {{ with .Params.tags }}
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 88d7bd7..df6a059 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,5 +1,5 @@
- {{ site.Params.footerText | markdownify }} + {{ .Site.Params.footerText | markdownify }}
\ No newline at end of file diff --git a/layouts/partials/google-analytics-async.html b/layouts/partials/google-analytics-async.html index 1323909..ecc2767 100644 --- a/layouts/partials/google-analytics-async.html +++ b/layouts/partials/google-analytics-async.html @@ -1,5 +1,5 @@ -{{ if not site.IsServer }} - {{ with site.GoogleAnalytics }} +{{ if not .Site.IsServer }} + {{ with .Site.GoogleAnalytics }} -{{ if eq site.Params.includeBootstrapJs true }} +{{ if eq .Site.Params.includeBootstrapJs true }} {{ end }} \ No newline at end of file diff --git a/layouts/partials/style.html b/layouts/partials/style.html index e094a5a..a892b2f 100644 --- a/layouts/partials/style.html +++ b/layouts/partials/style.html @@ -1,6 +1,6 @@