diff --git a/.gitignore b/.gitignore index bdfa006..f24606e 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,5 @@ npm-debug.log /junit.xml partials/structure/stylesheet.html +# Hugo +.hugo_build.lock diff --git a/assets/ananke/css/_styles.css b/assets/ananke/css/_styles.css index 70e63a5..9db98a7 100644 --- a/assets/ananke/css/_styles.css +++ b/assets/ananke/css/_styles.css @@ -17,4 +17,4 @@ .nested-links a{ overflow-wrap: break-word; -} \ No newline at end of file +} diff --git a/assets/ananke/socials/instagram.svg b/assets/ananke/socials/instagram.svg index 8e7af59..5079269 100644 --- a/assets/ananke/socials/instagram.svg +++ b/assets/ananke/socials/instagram.svg @@ -1 +1 @@ - + diff --git a/assets/ananke/socials/keybase.svg b/assets/ananke/socials/keybase.svg index a9081dc..db7fe5b 100644 --- a/assets/ananke/socials/keybase.svg +++ b/assets/ananke/socials/keybase.svg @@ -1,3 +1,3 @@ - + diff --git a/assets/ananke/socials/linkedin.svg b/assets/ananke/socials/linkedin.svg index af3e418..30b5223 100644 --- a/assets/ananke/socials/linkedin.svg +++ b/assets/ananke/socials/linkedin.svg @@ -1,3 +1,3 @@ - + diff --git a/assets/ananke/socials/mastodon.svg b/assets/ananke/socials/mastodon.svg index 4600e65..eab6193 100644 --- a/assets/ananke/socials/mastodon.svg +++ b/assets/ananke/socials/mastodon.svg @@ -1,4 +1,4 @@ - + diff --git a/assets/ananke/socials/medium.svg b/assets/ananke/socials/medium.svg index 33b3315..88336e4 100644 --- a/assets/ananke/socials/medium.svg +++ b/assets/ananke/socials/medium.svg @@ -1,3 +1,3 @@ - + diff --git a/assets/ananke/socials/twitter.svg b/assets/ananke/socials/twitter.svg index 3fdf872..e025327 100644 --- a/assets/ananke/socials/twitter.svg +++ b/assets/ananke/socials/twitter.svg @@ -1 +1 @@ - + diff --git a/assets/ananke/socials/youtube.svg b/assets/ananke/socials/youtube.svg index df0c89c..c06ec04 100644 --- a/assets/ananke/socials/youtube.svg +++ b/assets/ananke/socials/youtube.svg @@ -1 +1 @@ - + diff --git a/exampleSite/content/en/about/_index.md b/exampleSite/content/en/about/index.md similarity index 100% rename from exampleSite/content/en/about/_index.md rename to exampleSite/content/en/about/index.md diff --git a/i18n/de.toml b/i18n/de.toml index d54cf08..1109b97 100644 --- a/i18n/de.toml +++ b/i18n/de.toml @@ -32,7 +32,7 @@ other = "Eine Email Adresse wird benötigt." other = "Senden" [taxonomyPageList] -other = "Below you will find pages that utilize the taxonomy term “{{ .Title }}”" +other = "Beiträge zum Thema “{{ .Title }}”" [readingTime] one = "Eine Minute" diff --git a/i18n/fi.toml b/i18n/fi.toml new file mode 100644 index 0000000..f951069 --- /dev/null +++ b/i18n/fi.toml @@ -0,0 +1,46 @@ +[more] +other = "Lisää" + +[allTitle] +other = "Kaikki kirjoitukset" + +[recentTitle] +other = "Viimeisimmät kirjoitukset" + +[readMore] +other = "lue lisää" + +[whatsInThis] +other = "Sisältö" + +[related] +other = "Samankaltaisia kirjoituksia" + +[yourName] +other = "sinun nimesi" + +[emailAddress] +other = "sähköpostiosoite" + +[message] +other = "viesti" + +[emailRequiredNote] +other = "Sähköpostiosoite on pakollinen tieto." + +[send] +other = "Lähetä" + +[taxonomyPageList] +other = "Alla ovat sivut, jotka liittyvät hakusanaasi: “{{ .Title }}”" + +[readingTime] +one = "Minuutin lukuaika" +other = "{{ .Count }} minuutin lukuaika" + +[wordCount] +one = "Yksi sana" +other = "{{ .Count }} sanaa" + +[pageTitle] +other = "{{ .Name }} sivu" diff --git a/i18n/zh-tw.toml b/i18n/zh-tw.toml index a47ff35..6becd5d 100644 --- a/i18n/zh-tw.toml +++ b/i18n/zh-tw.toml @@ -11,7 +11,7 @@ other = "最近 {{.Title }}" other = "繼續閱讀" [whatsInThis] -other = "更多關於 {{ .Type }}" +other = "這個{{ .Type }}中有" [related] other = "相關內容" diff --git a/i18n/zh.toml b/i18n/zh.toml index aba56de..ce4f66e 100644 --- a/i18n/zh.toml +++ b/i18n/zh.toml @@ -11,7 +11,7 @@ other = "最近 {{.Title }}" other = "继续阅读" [whatsInThis] -other = "这是什么 {{ .Type }}" +other = "这个{{ .Type }}中有" [related] other = "相关內容" diff --git a/layouts/_default/list.html b/layouts/_default/list.html index ade9b6a..961bc5c 100755 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -6,7 +6,7 @@
{{ range .Paginator.Pages }}
- {{- partial "summary.html" . -}} + {{ .Render "summary" }}
{{ end }}
diff --git a/layouts/_default/summary-with-image.html b/layouts/_default/summary-with-image.html new file mode 100644 index 0000000..94666db --- /dev/null +++ b/layouts/_default/summary-with-image.html @@ -0,0 +1,29 @@ +{{ $featured_image := partial "func/GetFeaturedImage.html" . }} +
+
+
+ {{ if $featured_image }} + {{/* Trimming the slash and adding absURL make sure the image works no matter where our site lives */}} + {{ $featured_image := (trim $featured_image "/") | absURL }} +
+ + image from {{ .Title }} + +
+ {{ end }} +
+

+ + {{ .Title }} + +

+ + {{ $.Param "read_more_copy" | default (i18n "readMore") }} + {{/* TODO: add author +

By {{ .Author }}

*/}} +
+
+
+
diff --git a/layouts/_default/summary.html b/layouts/_default/summary.html new file mode 100644 index 0000000..fb77404 --- /dev/null +++ b/layouts/_default/summary.html @@ -0,0 +1,13 @@ +
+
+ {{ humanize .Section }} +

+ + {{ .Title }} + +

+ +
+
diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html index 050c427..ab512e6 100644 --- a/layouts/_default/taxonomy.html +++ b/layouts/_default/taxonomy.html @@ -1,14 +1,14 @@ {{ define "main" }}
-
+
{{ range .Pages }}
- {{ partial "summary.html" . }} + {{ .Render "summary" }}
{{ end }}
diff --git a/layouts/_default/terms.html b/layouts/_default/terms.html index 48c58ab..de03410 100644 --- a/layouts/_default/terms.html +++ b/layouts/_default/terms.html @@ -14,7 +14,7 @@ {{ range $value.Pages }} - {{ partial "summary.html" . }} + {{ .Render "summary" }} {{ end }} {{ end }} diff --git a/layouts/index.html b/layouts/index.html index 2fbe6cd..2e51d10 100755 --- a/layouts/index.html +++ b/layouts/index.html @@ -26,7 +26,7 @@ {{/* Range through the first $n_posts items of the section */}} {{ range (first $n_posts $section) }}
- {{ partial "summary-with-image.html" . }} + {{ .Render "summary-with-image" }}
{{ end }} diff --git a/layouts/partials/func/GetFeaturedImage.html b/layouts/partials/func/GetFeaturedImage.html index 12ffe1c..b33eaa3 100644 --- a/layouts/partials/func/GetFeaturedImage.html +++ b/layouts/partials/func/GetFeaturedImage.html @@ -34,6 +34,13 @@ {{ end }} {{ end }} +{{ if not $linkToCover }} + {{/* Use the value from the site config parameter if present */}} + {{ with .Site.Params.featured_image }} + {{ $linkToCover = . }} + {{ end }} +{{ end }} + {{/* return either a permalink, or an empty string. Note that partials can only have a single return statement, so this needs to be at the end of the partial (and not in the if block) */}} {{ return $linkToCover }} diff --git a/layouts/partials/func/warn.html b/layouts/partials/func/warn.html new file mode 100644 index 0000000..b269906 --- /dev/null +++ b/layouts/partials/func/warn.html @@ -0,0 +1,15 @@ +{{/* + warn + Emits a warning using the theme's Header. + + @author @regisphilibert + + @context String + + @access private + + @example - Go Template + {{ partial "func/warn" $message }} +*/}} +{{ $header := "Ananke Theme Warning" }} +{{ warnf "\n%s:\n%s" $header . }} \ No newline at end of file diff --git a/layouts/partials/site-header.html b/layouts/partials/site-header.html index 10a682f..aad8749 100755 --- a/layouts/partials/site-header.html +++ b/layouts/partials/site-header.html @@ -1,4 +1,4 @@ -{{ $featured_image := .Param "featured_image"}} +{{ $featured_image := partial "func/GetFeaturedImage.html" . }} {{ if $featured_image }} {{/* Trimming the slash and adding absURL make sure the image works no matter where our site lives */}} {{ $featured_image := (trim $featured_image "/") | absURL }} diff --git a/layouts/partials/summary-with-image.html b/layouts/partials/summary-with-image.html index 94666db..b73f698 100644 --- a/layouts/partials/summary-with-image.html +++ b/layouts/partials/summary-with-image.html @@ -1,3 +1,6 @@ +{{ partial "func/warn" `You are currently using 'partial "summary-with-image"' in your project templates. +You should replace it with '.Render "summary-with-image"' as the use of this partial will be deprecated in future releases. +More info here: https://github.com/theNewDynamic/gohugo-theme-ananke/releases/tag/v2.8.1` }} {{ $featured_image := partial "func/GetFeaturedImage.html" . }}
diff --git a/layouts/partials/summary.html b/layouts/partials/summary.html index d9cd9c6..0c1a0d6 100644 --- a/layouts/partials/summary.html +++ b/layouts/partials/summary.html @@ -1,3 +1,6 @@ +{{ partial "func/warn" `You are currently using 'partial "summary"' in your project templates. +You should replace it with '.Render "summary"' as the use of this partial will be deprecated in future releases. +More info here: https://github.com/theNewDynamic/gohugo-theme-ananke/releases/tag/v2.8.1` }}
{{ humanize .Section }} diff --git a/layouts/partials/svg/new-window.svg b/layouts/partials/svg/new-window.svg index ebb37b8..0bc5e76 100644 --- a/layouts/partials/svg/new-window.svg +++ b/layouts/partials/svg/new-window.svg @@ -1,3 +1,3 @@ - + diff --git a/layouts/partials/tags.html b/layouts/partials/tags.html index 4fce241..976a9a2 100644 --- a/layouts/partials/tags.html +++ b/layouts/partials/tags.html @@ -1,6 +1,6 @@
    {{ range .Params.tags }} -
  • +
  • {{- . -}} diff --git a/layouts/post/list.html b/layouts/post/list.html index 0abb941..27ff4c0 100644 --- a/layouts/post/list.html +++ b/layouts/post/list.html @@ -9,9 +9,6 @@