diff options
author | Zachary Betz <zwbetz@gmail.com> | 2019-01-16 01:18:57 +0300 |
---|---|---|
committer | Zachary Betz <zwbetz@gmail.com> | 2019-01-16 01:18:57 +0300 |
commit | d4c25d618dfff5fcbeb6e3db1bbc570ad0bd0061 (patch) | |
tree | f2714be59867f98d45fe0101030df71c8869eb37 | |
parent | 5ab7bc751b278cff12aa7bf4a688a55d2ad50c68 (diff) |
Revert "Refactor theme to use new Hugo v0.53 vars"
This reverts commit 5ab7bc751b278cff12aa7bf4a688a55d2ad50c68.
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | layouts/_default/terms.html | 2 | ||||
-rw-r--r-- | layouts/index.html | 4 | ||||
-rw-r--r-- | layouts/partials/date-and-tags.html | 2 | ||||
-rw-r--r-- | layouts/partials/footer.html | 2 | ||||
-rw-r--r-- | layouts/partials/google-analytics-async.html | 4 | ||||
-rw-r--r-- | layouts/partials/head.html | 6 | ||||
-rw-r--r-- | layouts/partials/nav.html | 4 | ||||
-rw-r--r-- | layouts/partials/script.html | 2 | ||||
-rw-r--r-- | layouts/partials/style.html | 2 | ||||
-rw-r--r-- | theme.toml | 2 |
11 files changed, 16 insertions, 16 deletions
@@ -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) }} <p> <a class="btn btn-outline-dark font-125" href="{{ .Permalink }}"> <span class="badge badge-dark">{{ $count }}</span> {{ $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" }} <div id="home-jumbotron" class="jumbotron text-center"> - <h1>{{ site.Title }}</h1> - <p class="font-125">{{ site.Params.homeText | markdownify }}</p> + <h1>{{ .Site.Title }}</h1> + <p class="font-125">{{ .Site.Params.homeText | markdownify }}</p> </div> {{ 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" }} <i data-feather="calendar"></i> <time datetime="{{ $dateTime }}">{{ .PublishDate.Format $dateFormat }}</time> {{ with .Params.tags }} <br> 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 @@ <footer id="footer" class="mt-auto text-center text-muted"> <div class="container"> - {{ site.Params.footerText | markdownify }} + {{ .Site.Params.footerText | markdownify }} </div> </footer>
\ 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 }} <script> window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date; ga('create', '{{ . }}', 'auto'); diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 52878dc..e0acf56 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -1,11 +1,11 @@ <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> - {{ hugo.Generator }} + {{ .Hugo.Generator }} <link rel="stylesheet" href="{{ "css/bootstrap.min.css" | absURL }}"> - {{ $title := print .Title " | " site.Title }} + {{ $title := print .Title " | " .Site.Title }} {{ if .IsHome }} - {{ $title = site.Title }} + {{ $title = .Site.Title }} {{ end }} <title>{{ $title }}</title> {{ partial "style.html" . }} diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html index 68deb99..9ca3c7c 100644 --- a/layouts/partials/nav.html +++ b/layouts/partials/nav.html @@ -1,8 +1,8 @@ <div id="nav-border" class="container"> <nav id="nav" class="nav justify-content-center"> - {{ $showActiveNav := site.Params.showActiveNav }} + {{ $showActiveNav := .Site.Params.showActiveNav }} {{ $currentPage := . }} - {{ range site.Menus.main }} + {{ range .Site.Menus.main }} {{ $active := "" }} {{ if eq $showActiveNav true }} {{ $isMenu := or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }} diff --git a/layouts/partials/script.html b/layouts/partials/script.html index 89e74e5..58af2a4 100644 --- a/layouts/partials/script.html +++ b/layouts/partials/script.html @@ -3,7 +3,7 @@ feather.replace() </script> -{{ if eq site.Params.includeBootstrapJs true }} +{{ if eq .Site.Params.includeBootstrapJs true }} <script src="{{ "js/jquery-3.3.1.slim.min.js" | absURL }}"></script> <script src="{{ "js/bootstrap.bundle.min.js" | absURL }}"></script> {{ 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 @@ <style> .container { - max-width: {{ site.Params.containerMaxWidth | default "700px" | safeCSS }}; + max-width: {{ .Site.Params.containerMaxWidth | default "700px" | safeCSS }}; } #nav a { font-weight: bold; @@ -5,7 +5,7 @@ description = "A vanilla Bootstrap theme for Hugo" homepage = "https://github.com/zwbetz-gh/vanilla-bootstrap-hugo-theme" tags = ["home", "blog", "tags", "bootstrap", "minimal", "clean", "simple", "feather"] features = ["home", "blog", "tags", "bootstrap", "minimal", "clean", "simple", "feather"] -min_version = "0.53" +min_version = "0.48" [author] name = "Zachary Betz" |