From f3daa66e7e6ddc055342a22a522bd55f1210e327 Mon Sep 17 00:00:00 2001 From: Melora Hugues Date: Tue, 19 Dec 2023 18:43:45 +0100 Subject: [PATCH] Update hugo and theme --- config.toml | 15 +- themes/hello-friend-ng/README.md | 5 +- .../hello-friend-ng/assets/scss/_fonts.scss | 36 +-- themes/hello-friend-ng/data/langFlags.yaml | 1 + themes/hello-friend-ng/docs/svgs.md | 3 + .../hello-friend-ng/exampleSite/config.toml | 77 ++++- themes/hello-friend-ng/i18n/da.toml | 39 +++ themes/hello-friend-ng/i18n/de.toml | 5 + themes/hello-friend-ng/i18n/en.toml | 5 + themes/hello-friend-ng/i18n/es.toml | 5 + themes/hello-friend-ng/i18n/fr.toml | 5 + themes/hello-friend-ng/i18n/gl.toml | 5 + themes/hello-friend-ng/i18n/id.toml | 7 +- themes/hello-friend-ng/i18n/it.toml | 7 +- themes/hello-friend-ng/i18n/ja.toml | 5 + themes/hello-friend-ng/i18n/lmo.toml | 2 +- themes/hello-friend-ng/i18n/pt-br.toml | 7 +- themes/hello-friend-ng/i18n/ro.toml | 5 + themes/hello-friend-ng/i18n/ru.toml | 5 + themes/hello-friend-ng/i18n/tr.toml | 7 +- themes/hello-friend-ng/i18n/uk.toml | 5 + themes/hello-friend-ng/i18n/zh-cn.toml | 5 + .../_markup/render-codeblock-mermaid.html | 4 +- .../layouts/_default/baseof.html | 38 ++- .../layouts/partials/footer.html | 2 +- .../layouts/partials/javascript.html | 26 ++ .../layouts/partials/menu.html | 2 +- .../layouts/partials/pagination-list.html | 4 +- .../hello-friend-ng/layouts/partials/svg.html | 8 +- .../hello-friend-ng/layouts/posts/single.html | 276 +++++++++--------- 30 files changed, 404 insertions(+), 212 deletions(-) create mode 100644 themes/hello-friend-ng/i18n/da.toml diff --git a/config.toml b/config.toml index 4b4c414..7dd75e1 100644 --- a/config.toml +++ b/config.toml @@ -46,11 +46,14 @@ plausibleDataDomain = 'faercol.me' plausibleScriptSource = 'https://plausible.faercol.me/js/script.js' [params.footer] -trademark = true +trademark = 2023 rss = true copyright = false author = true +[params.author] +name = "Melora Hugues" + [params.logo] logoText = "Hello there!" logoHomeLink = "/" @@ -89,11 +92,11 @@ logoText = "Hello there!" logoHomeLink = "/fr/" [menu] - # [[menu.main]] - # identifier = "blog" - # name = "Blog" - # url = "/posts" - # weight = 1 +# [[menu.main]] +# identifier = "blog" +# name = "Blog" +# url = "/posts" +# weight = 1 [[menu.main]] identifier = "about_me" diff --git a/themes/hello-friend-ng/README.md b/themes/hello-friend-ng/README.md index 1081818..a1dd38b 100644 --- a/themes/hello-friend-ng/README.md +++ b/themes/hello-friend-ng/README.md @@ -41,6 +41,7 @@ This theme was highly inspired by the [hello-friend](https://github.com/panr/hug - Support for sharing buttons - Support for [Commento](https://commento.io) - Support for [Plausible](https://plausible.io) (thanks to [@Joffcom](https://github.com/Joffcom)) +- Support for [utterances](https://utteranc.es/) comment system ## How to start @@ -102,11 +103,13 @@ paginate = 10 [languages] [languages.en] title = "Hello Friend NG" - subtitle = "A simple theme for Hugo" keywords = "" copyright = 'CC BY-NC 4.0' readOtherPosts = "Read other posts" + [languages.en.params] + subtitle = "A simple theme for Hugo" + [languages.en.params.logo] logoText = "hello friend ng" logoHomeLink = "/" diff --git a/themes/hello-friend-ng/assets/scss/_fonts.scss b/themes/hello-friend-ng/assets/scss/_fonts.scss index a5d945e..2be737e 100644 --- a/themes/hello-friend-ng/assets/scss/_fonts.scss +++ b/themes/hello-friend-ng/assets/scss/_fonts.scss @@ -1,50 +1,50 @@ @font-face { - font-family: 'Inter'; + font-family: "Inter"; font-style: normal; font-display: auto; font-weight: 400; - src: url("../fonts/Inter-Regular.woff2") format("woff2"), - url("../fonts/Inter-Regular.woff") format("woff"); + src: url("fonts/Inter-Regular.woff2") format("woff2"), + url("fonts/Inter-Regular.woff") format("woff"); } @font-face { - font-family: 'Inter'; + font-family: "Inter"; font-style: italic; font-display: auto; font-weight: 400; - src: url("../fonts/Inter-Italic.woff2") format("woff2"), - url("../fonts/Inter-Italic.woff") format("woff"); + src: url("fonts/Inter-Italic.woff2") format("woff2"), + url("fonts/Inter-Italic.woff") format("woff"); } @font-face { - font-family: 'Inter'; + font-family: "Inter"; font-style: normal; font-display: auto; font-weight: 600; - src: url("../fonts/Inter-Medium.woff2") format("woff2"), - url("../fonts/Inter-Medium.woff") format("woff"); + src: url("fonts/Inter-Medium.woff2") format("woff2"), + url("fonts/Inter-Medium.woff") format("woff"); } @font-face { - font-family: 'Inter'; + font-family: "Inter"; font-style: italic; font-display: auto; font-weight: 600; - src: url("../fonts/Inter-MediumItalic.woff2") format("woff2"), - url("../fonts/Inter-MediumItalic.woff") format("woff"); + src: url("fonts/Inter-MediumItalic.woff2") format("woff2"), + url("fonts/Inter-MediumItalic.woff") format("woff"); } @font-face { - font-family: 'Inter'; + font-family: "Inter"; font-style: normal; font-display: auto; font-weight: 800; - src: url("../fonts/Inter-Bold.woff2") format("woff2"), - url("../fonts/Inter-Bold.woff") format("woff"); + src: url("fonts/Inter-Bold.woff2") format("woff2"), + url("fonts/Inter-Bold.woff") format("woff"); } @font-face { - font-family: 'Inter'; + font-family: "Inter"; font-style: italic; font-display: auto; font-weight: 800; - src: url("../fonts/Inter-BoldItalic.woff2") format("woff2"), - url("../fonts/Inter-BoldItalic.woff") format("woff"); + src: url("fonts/Inter-BoldItalic.woff2") format("woff2"), + url("fonts/Inter-BoldItalic.woff") format("woff"); } diff --git a/themes/hello-friend-ng/data/langFlags.yaml b/themes/hello-friend-ng/data/langFlags.yaml index 2c1e1ec..987e736 100644 --- a/themes/hello-friend-ng/data/langFlags.yaml +++ b/themes/hello-friend-ng/data/langFlags.yaml @@ -1,3 +1,4 @@ +da: dk de: de en: gb es: es diff --git a/themes/hello-friend-ng/docs/svgs.md b/themes/hello-friend-ng/docs/svgs.md index 151e701..514f8f6 100644 --- a/themes/hello-friend-ng/docs/svgs.md +++ b/themes/hello-friend-ng/docs/svgs.md @@ -10,6 +10,7 @@ - [codechef](https://simpleicons.org/?q=codechef) - [codepen](https://simpleicons.org/?q=codepen) - [cs:go](https://simpleicons.org/?q=counterstrike) +- [cyberdefenders](https://simpleicons.org/?q=cyberdefenders) - dev - [deviantart](https://simpleicons.org/?q=deviantart) - [discogs](https://simpleicons.org/?q=discogs) @@ -58,6 +59,7 @@ - [peertube](https://simpleicons.org/?q=peertube) - [pinterest](https://simpleicons.org/?q=pinterest) - [pixelfed](https://github.com/pixelfed/pixelfed/blob/dev/public/img/pixelfed-icon-black.svg) +- [pleroma](https://simpleicons.org/?q=pleroma) - [podcasts-apple](https://simpleicons.org/?q=podcast) - [podcasts-google](https://simpleicons.org/?q=podcast) - [polywork](https://simpleicons.org/?q=polywork) @@ -67,6 +69,7 @@ - [signal](https://simpleicons.org/?q=signal) - [slack](https://simpleicons.org/?q=slack) - [soundcloud](https://simpleicons.org/?q=soundcloud) +- [sourcehut](https://simpleicons.org/?q=sourcehut) - [spotify](https://simpleicons.org/?q=spotify) - [stackoverflow](https://simpleicons.org/?q=stackoverflow) - [steam](https://simpleicons.org/?q=Steam) diff --git a/themes/hello-friend-ng/exampleSite/config.toml b/themes/hello-friend-ng/exampleSite/config.toml index 0eb6fcb..28e2d82 100644 --- a/themes/hello-friend-ng/exampleSite/config.toml +++ b/themes/hello-friend-ng/exampleSite/config.toml @@ -36,9 +36,6 @@ disableHugoGeneratorInject = false [permalinks] posts = "/posts/:year/:month/:title/" -[author] - name = "Jane Doe" - [blackfriday] hrefTargetBlank = true @@ -48,6 +45,9 @@ disableHugoGeneratorInject = false series = "series" [params] + [params.author] + name = "Jane Doe" + dateform = "Jan 2, 2006" dateformShort = "Jan 2" dateformNum = "2006-01-02" @@ -78,7 +78,7 @@ disableHugoGeneratorInject = false # # This options enables the theme toggle for the theme. # Per default, this option is off. - # The theme is respecting the prefers-color-scheme of the operating systeme. + # The theme is respecting the prefers-color-scheme of the operating system. # With this option on, the page user is able to set the scheme he wants. enableThemeToggle = false @@ -114,7 +114,7 @@ disableHugoGeneratorInject = false # If you want, you can easily override the default footer with your own content. # [params.footer] - trademark = true + trademark = 2023 rss = true copyright = true author = true @@ -145,6 +145,19 @@ disableHugoGeneratorInject = false # Append the current url pathname to logoText # logoCursorPathname = true + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + # Addon: Startpage portrait + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + # Uncomment this if you want a portrait on your start page + # + # [params.portrait] + # path = "/img/image.jpg" + # alt = "Portrait" + # maxWidth = "50px" + + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + # Addon: Commento + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # Commento is more than just a comments widget you can embed — # it’s a return to the roots of the internet. # An internet without the tracking and invasions of privacy. @@ -156,14 +169,50 @@ disableHugoGeneratorInject = false # [params.commento] # url = "" - # Uncomment this if you want a portrait on your start page + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + # Addon: Utteranc.es + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + # Utteranc.es is a lightweight comments widget built on GitHub issues. + # See https://utteranc.es/ for documentation + # Uncomment this to enable Utteranc.es. # - # [params.portrait] - # path = "/img/image.jpg" - # alt = "Portrait" - # maxWidth = "50px" + # [params.utterances] + # Your GitHub repository + # + # repository = "" + # + # label used for GitHub issues + # + # label = "" + # + # Blog Post <-> Issue mapping. This parameter is optional. Possible values are: + # - pathname + # - url + # - title + # - og:title + # - issue number + # - specific term + # + # issueTerm = "" + # + # Theme used: possible values are: + # - github-light + # - github-dark + # - preferred-color-scheme + # - github-dark-orange + # - icy-dark + # - dark-blue + # - photon-dark + # - boxy-light + # - gruvbox-dark + # + # theme = "" + # - # Social icons + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + # Addon: Social icons + # # # # # # # # # # # # # # # # # # # # # # # # # # # # # + # [[params.social]] name = "twitter" url = "https://twitter.com/" @@ -186,14 +235,16 @@ disableHugoGeneratorInject = false [languages] [languages.en] - subtitle = "Hello Friend NG Theme" weight = 1 copyright = 'CC BY-NC 4.0' + [languages.en.params] + subtitle = "Hello Friend NG Theme" [languages.fr] - subtitle = "Hello Friend NG Theme" weight = 2 copyright = 'CC BY-NC 4.0' + [languages.fr.params] + subtitle = "Hello Friend NG Theme" [menu] [[menu.main]] diff --git a/themes/hello-friend-ng/i18n/da.toml b/themes/hello-friend-ng/i18n/da.toml new file mode 100644 index 0000000..15c1152 --- /dev/null +++ b/themes/hello-friend-ng/i18n/da.toml @@ -0,0 +1,39 @@ +# Translations for Danish +# https://gohugo.io/content-management/multilingual/#translation-of-strings + +# Generic +# +[translations] +other = "Oversættelser" + +[postAvailable] +other = "Også tilgængelig på" + + +# 404.html +# +[archives] +other = "Arkiver" + +[home] +other = "Hjem" + +[notFound] +other = "Ups, siden blev ikke fundet…" + + +# posts/single.html +# +[readingTime] +one = "Ét minut" +other = "{{ .Count }} minutter" + +[tableOfContents] +other = "Indholdsfortegnelse" + +[wordCount] +one = "Ét Ord" +other = "{{ .Count }} Ord" + +[lastModified] +other = "Sidst opdateret" diff --git a/themes/hello-friend-ng/i18n/de.toml b/themes/hello-friend-ng/i18n/de.toml index 7ef99a2..dfcfc14 100644 --- a/themes/hello-friend-ng/i18n/de.toml +++ b/themes/hello-friend-ng/i18n/de.toml @@ -37,3 +37,8 @@ other = "{{ .Count }} Wörter" [lastModified] other = "Letzte Aktualisierung" + +# partials/pagination-list.html +[pagination] +newerPosts = "Neuere Beiträge" +olderPosts = "Ältere Beiträge" diff --git a/themes/hello-friend-ng/i18n/en.toml b/themes/hello-friend-ng/i18n/en.toml index 03c0444..9783c83 100644 --- a/themes/hello-friend-ng/i18n/en.toml +++ b/themes/hello-friend-ng/i18n/en.toml @@ -37,3 +37,8 @@ other = "{{ .Count }} Words" [lastModified] other = "Last updated" + +# partials/pagination-list.html +[pagination] +newerPosts = "Newer posts" +olderPosts = "Older posts" diff --git a/themes/hello-friend-ng/i18n/es.toml b/themes/hello-friend-ng/i18n/es.toml index 1dce9bb..98faacc 100644 --- a/themes/hello-friend-ng/i18n/es.toml +++ b/themes/hello-friend-ng/i18n/es.toml @@ -37,3 +37,8 @@ other = "{{ .Count }} Palabras" [lastModified] other = "Ultima actualización" + +# partials/pagination-list.html +[pagination] +newerPosts = "Entradas más recientes" +olderPosts = "Entradas antiguas" diff --git a/themes/hello-friend-ng/i18n/fr.toml b/themes/hello-friend-ng/i18n/fr.toml index 1ba6fe9..ead83f5 100644 --- a/themes/hello-friend-ng/i18n/fr.toml +++ b/themes/hello-friend-ng/i18n/fr.toml @@ -37,3 +37,8 @@ other = "{{ .Count }} Mots" [lastModified] other = "Mise à jour" + +# partials/pagination-list.html +[pagination] +newerPosts = "Articles plus récents" +olderPosts = "Articles plus anciens" diff --git a/themes/hello-friend-ng/i18n/gl.toml b/themes/hello-friend-ng/i18n/gl.toml index 21e0e89..e805f0d 100644 --- a/themes/hello-friend-ng/i18n/gl.toml +++ b/themes/hello-friend-ng/i18n/gl.toml @@ -34,3 +34,8 @@ other = "Táboa de contidos" [wordCount] one = "Unha Palabra" other = "{{ .Count }} Palabras" + +# partials/pagination-list.html +[pagination] +newerPosts = "Entradas más recientes" +olderPosts = "Entradas antiguas" diff --git a/themes/hello-friend-ng/i18n/id.toml b/themes/hello-friend-ng/i18n/id.toml index cf5f7ee..c817730 100644 --- a/themes/hello-friend-ng/i18n/id.toml +++ b/themes/hello-friend-ng/i18n/id.toml @@ -36,4 +36,9 @@ one = "Satu Kata" other = "{{ .Count }} Kata" [lastModified] -other = "Terakhir diupdate" \ No newline at end of file +other = "Terakhir diupdate" + +# partials/pagination-list.html +[pagination] +newerPosts = "Postingan yang lebih baru" +olderPosts = "Postingan yang lebih lama" diff --git a/themes/hello-friend-ng/i18n/it.toml b/themes/hello-friend-ng/i18n/it.toml index f78a5a0..3f89d6f 100644 --- a/themes/hello-friend-ng/i18n/it.toml +++ b/themes/hello-friend-ng/i18n/it.toml @@ -1,4 +1,4 @@ -# Translations for English +# Translations for Italian # https://gohugo.io/content-management/multilingual/#translation-of-strings # Generic @@ -37,3 +37,8 @@ other = "{{ .Count }} parole" [lastModified] other = "Ultimo aggiornamento" + +# partials/pagination-list.html +[pagination] +newerPosts = "Voci più recenti" +olderPosts = "Voci più vecchie" diff --git a/themes/hello-friend-ng/i18n/ja.toml b/themes/hello-friend-ng/i18n/ja.toml index 7350c23..8e949f2 100644 --- a/themes/hello-friend-ng/i18n/ja.toml +++ b/themes/hello-friend-ng/i18n/ja.toml @@ -37,3 +37,8 @@ other = "{{ .Count }}文字" [lastModified] other = "最終更新" + +# partials/pagination-list.html +[pagination] +newerPosts = "新しいエントリー" +olderPosts = "古いエントリー" diff --git a/themes/hello-friend-ng/i18n/lmo.toml b/themes/hello-friend-ng/i18n/lmo.toml index 7616dda..4cfbbaa 100644 --- a/themes/hello-friend-ng/i18n/lmo.toml +++ b/themes/hello-friend-ng/i18n/lmo.toml @@ -1,4 +1,4 @@ -# Translations for English +# Translations for Lombardian # https://gohugo.io/content-management/multilingual/#translation-of-strings # Generic diff --git a/themes/hello-friend-ng/i18n/pt-br.toml b/themes/hello-friend-ng/i18n/pt-br.toml index b53cbcc..16db33f 100644 --- a/themes/hello-friend-ng/i18n/pt-br.toml +++ b/themes/hello-friend-ng/i18n/pt-br.toml @@ -1,4 +1,4 @@ -# Translations for Portuguese +# Translations for Portuguese (Brasilian) # https://gohugo.io/content-management/multilingual/#translation-of-strings # Generic @@ -37,3 +37,8 @@ other = "{{ .Count }} Palavras" [lastModified] other = "Última actualização" + +# partials/pagination-list.html +[pagination] +newerPosts = "Entradas mais recentes" +olderPosts = "Entradas mais antigas" diff --git a/themes/hello-friend-ng/i18n/ro.toml b/themes/hello-friend-ng/i18n/ro.toml index af97a55..8b9ece4 100644 --- a/themes/hello-friend-ng/i18n/ro.toml +++ b/themes/hello-friend-ng/i18n/ro.toml @@ -37,3 +37,8 @@ other = "{{ .Count }} de cuvinte" [lastModified] other = "Ultima modificare" + +# partials/pagination-list.html +[pagination] +newerPosts = "Intrări mai noi" +olderPosts = "Intrări mai vechi" diff --git a/themes/hello-friend-ng/i18n/ru.toml b/themes/hello-friend-ng/i18n/ru.toml index 2f16ec4..d7df61a 100644 --- a/themes/hello-friend-ng/i18n/ru.toml +++ b/themes/hello-friend-ng/i18n/ru.toml @@ -41,3 +41,8 @@ other = "{{ .Count }} слов" [lastModified] other = "Последнее обновление" + +# partials/pagination-list.html +[pagination] +newerPosts = "Более новые записи" +olderPosts = "Старые записи" diff --git a/themes/hello-friend-ng/i18n/tr.toml b/themes/hello-friend-ng/i18n/tr.toml index df7af32..70d20ab 100644 --- a/themes/hello-friend-ng/i18n/tr.toml +++ b/themes/hello-friend-ng/i18n/tr.toml @@ -1,4 +1,4 @@ -# Translations for English +# Translations for Turkish # https://gohugo.io/content-management/multilingual/#translation-of-strings # Generic @@ -37,3 +37,8 @@ other = "{{ .Count }} Kelime" [lastModified] other = "Son güncelleme" + +# partials/pagination-list.html +[pagination] +newerPosts = "Daha yeni girişler" +olderPosts = "Eski girişler" diff --git a/themes/hello-friend-ng/i18n/uk.toml b/themes/hello-friend-ng/i18n/uk.toml index 890a618..c0669f4 100644 --- a/themes/hello-friend-ng/i18n/uk.toml +++ b/themes/hello-friend-ng/i18n/uk.toml @@ -41,3 +41,8 @@ other = "{{ .Count }} слів" [lastModified] other = "Останнє оновлення" + +# partials/pagination-list.html +[pagination] +newerPosts = "Нові записи" +olderPosts = "Старіші записи" diff --git a/themes/hello-friend-ng/i18n/zh-cn.toml b/themes/hello-friend-ng/i18n/zh-cn.toml index 7ed72a0..2f106a0 100644 --- a/themes/hello-friend-ng/i18n/zh-cn.toml +++ b/themes/hello-friend-ng/i18n/zh-cn.toml @@ -37,3 +37,8 @@ other = "{{ .Count }}字" [lastModified] other = "最后修改" + +# partials/pagination-list.html +[pagination] +newerPosts = "较新条目" +olderPosts = "旧条目" diff --git a/themes/hello-friend-ng/layouts/_default/_markup/render-codeblock-mermaid.html b/themes/hello-friend-ng/layouts/_default/_markup/render-codeblock-mermaid.html index abb31f8..bb7bf42 100644 --- a/themes/hello-friend-ng/layouts/_default/_markup/render-codeblock-mermaid.html +++ b/themes/hello-friend-ng/layouts/_default/_markup/render-codeblock-mermaid.html @@ -1,4 +1,4 @@
-    {{- .Inner | safeHTML }}
-  
+ {{- .Inner | safeHTML }} + {{ .Page.Store.Set "hasMermaid" true }} \ No newline at end of file diff --git a/themes/hello-friend-ng/layouts/_default/baseof.html b/themes/hello-friend-ng/layouts/_default/baseof.html index 4cf9ca4..2c80de9 100644 --- a/themes/hello-friend-ng/layouts/_default/baseof.html +++ b/themes/hello-friend-ng/layouts/_default/baseof.html @@ -1,29 +1,25 @@ + + {{ partial "head.html" . }} + - - {{ partial "head.html" . }} - - - -{{ block "body" . }} - - + {{ block "body" . }} + {{ end }} + +
+ {{ partial "header.html" . }} -
- {{ partial "header.html" . }} +
+ {{ block "main" . }}{{ end }} +
-
- {{ block "main" . }}{{ end }} + {{ block "footer" . }} + {{ partial "footer.html" . }} + {{ end }}
- {{ block "footer" . }} - {{ partial "footer.html" . }} - {{ end }} -
- - {{ partial "javascript.html" . }} - - - \ No newline at end of file + {{ partial "javascript.html" . }} + + diff --git a/themes/hello-friend-ng/layouts/partials/footer.html b/themes/hello-friend-ng/layouts/partials/footer.html index 41b83cb..f1e9299 100644 --- a/themes/hello-friend-ng/layouts/partials/footer.html +++ b/themes/hello-friend-ng/layouts/partials/footer.html @@ -2,7 +2,7 @@ {{if or (.Site.Params.footer.trademark) (.Site.Params.footer.author) (.Site.Params.footer.copyright) (.Site.Params.footer.rss) (.Site.Params.footer.topText) }}