diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index ee209d6..b3422b3 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -12,6 +12,8 @@ and this project adheres to https://semver.org/spec/v2.0.0.html[Semantic Version === Changed +* Update the required Hugo version to v0.74. + * Change the CSS linking with https://gohugo.io/hugo-pipes/introduction/[Hugo Pipes], moving it into the assets folder. * Improve the pagination partial. diff --git a/README.md b/README.md index 6f36d3b..0bf5046 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Here are the default features of the theme provides: * Dark mode toggle. * Focus on web accessibility and search engine optimization (SEO) including [Twitter cards](https://dev.twitter.com/cards) and [Open Graph protocol](https://opengraphprotocol.org/). * Google Analytics and Disqus integration. -* Web accessible-ready by following the standard practices as referred to by the https://www.w3.org/TR/wai-aria-1.1/[W3C] +* Web accessible-ready by following the standard practices as referred to by the [W3C](https://www.w3.org/TR/wai-aria-1.1/). As previously mentioned, this theme is made to be easily extensible. With some integration with the huge ecosystem of Hugo, you can make the theme feature the following highlights. @@ -51,7 +51,7 @@ More possibilities are there if you tinker it with your own modifications. ## Installation I assume you already have [Git](https://git-scm.com/) and [Hugo](https://gohugo.io/) installed. -For future reference, the minimum Hugo version required is at v0.58. +For future reference, the minimum Hugo version required is at v0.74. Additionally, the following instructions are done as if you're in a Hugo directory. Installation of a Hugo theme is pretty simple and you can do it in multiple ways. diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..3b79cc8 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module github.com/foo-dogsquared/hugo-theme-contentful + +go 1.15 diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 00360cf..e593ef3 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -14,7 +14,7 @@ Otherwise, we take the pages of a section. */ -}}

{{ .Title }}

- {{- if ne .Date .Lastmod }} + {{- if and .GitInfo (ne (.Date.Format "2006-01-02") (.Lastmod.Format "2006-01-02")) }} (Modified on ) {{- end }}
diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 7cbc109..875bc38 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -17,13 +17,13 @@

{{ i18n "published_on" }}:

{{- end }} - + {{- if ne .Date .Lastmod }}

{{ i18n "updated_on" }}:

{{- end }} - - + + {{- if .IsTranslated }} {{- $lang_links := slice }} {{- $langs := slice }} diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 51ed54d..5a05c9e 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -10,12 +10,18 @@ {{- /* Some sane tags default */ -}} {{ hugo.Generator }} - + +{{- with .Site.Author }} +{{- $names := slice }} +{{- range . }}{{ $names = $names | append .name }}{{ end }} + +{{- end }} + -{{- template "_internal/twitter_cards.html" . -}} -{{- template "_internal/opengraph.html" . -}} +{{- template "_internal/twitter_cards.html" . }} +{{- template "_internal/opengraph.html" . }} {{- /* Linking all of the output formats for discovery. */ -}} diff --git a/theme.toml b/theme.toml index 88ebb19..b896274 100644 --- a/theme.toml +++ b/theme.toml @@ -8,7 +8,7 @@ description = "A minimal and extensible theme that focuses on being contentful a homepage = "https://github.com/foo-dogsquared/hugo-theme-contentful" tags = ["minimal", "multilingual"] features = [] -min_version = "0.58" +min_version = "0.74" [author] name = "foo-dogsquared"