Update to v2.0.0

This commit is contained in:
Gabriel Arazas 2020-10-24 20:48:43 +08:00
parent 818dcf7dc3
commit 4882a88da8
7 changed files with 21 additions and 10 deletions

View File

@ -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.

View File

@ -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.

3
go.mod Normal file
View File

@ -0,0 +1,3 @@
module github.com/foo-dogsquared/hugo-theme-contentful
go 1.15

View File

@ -14,7 +14,7 @@ Otherwise, we take the pages of a section. */ -}}
<h1><a href="{{ .Permalink }}" aria-label="{{ .Title }}">{{ .Title }}</a></h1>
<div class="post__meta">
<time datetime="{{ .Date.Format "2006-01-02" }}">{{ .Date.Format "2006-01-02" }}</time>
{{- if ne .Date .Lastmod }}
{{- if and .GitInfo (ne (.Date.Format "2006-01-02") (.Lastmod.Format "2006-01-02")) }}
(Modified on <time datetime="{{ .Lastmod.Format "2006-01-02" }}">{{ .Lastmod.Format "2006-01-02" }}</time>)
{{- end }}
</div>

View File

@ -23,7 +23,7 @@
<p data-content-modification-date="{{ .Lastmod }}">{{ i18n "updated_on" }}: <time datetime="{{ .Lastmod.Format "2006-01-02" }}">{{ .Lastmod.Format "2006-01-02" }}</time></p>
{{- end }}
<!-- Link the translated versions if the article has at least one translated page. -->
<!-- Link the translated versions if the article has at least one translated page. -->
{{- if .IsTranslated }}
{{- $lang_links := slice }}
{{- $langs := slice }}

View File

@ -10,12 +10,18 @@
{{- /* Some sane <meta> tags default */ -}}
{{ hugo.Generator }}
<meta charset="utf-8">
<meta name="author" content="{{ with .Param "author.name" }}{{ . }}{{ else }}{{ $.Site.Author.name }}{{ end }}" />
{{- with .Site.Author }}
{{- $names := slice }}
{{- range . }}{{ $names = $names | append .name }}{{ end }}
<meta name="author" content="{{ delimit $names ", " (printf " %s " (i18n "and")) }}" />
{{- end }}
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="referrer" content="no-referrer" />
<meta name="description" content="{{ if (and (eq .Kind "home") .IsHome) }}{{ .Site.Title }}{{ else }}{{ .Summary | safeHTML }}{{ 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. */ -}}

View File

@ -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"