diff --git a/.github/workflows/deploy-gh-pages.yml b/.github/workflows/deploy-gh-pages.yml index 2d5b139c1..919a3d8a8 100644 --- a/.github/workflows/deploy-gh-pages.yml +++ b/.github/workflows/deploy-gh-pages.yml @@ -10,22 +10,23 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout (tutorials) - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: submodules: true # Fetch Hugo themes (true OR recursive) fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod - name: Checkout (theme) - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: repository: MunifTanjim/minimo - ref: v2.9.0 + # repository: falkmielke/minimo + # ref: update_202605 path: themes/minimo - name: Setup Hugo - uses: peaceiris/actions-hugo@16361eb4acea8698b220b76c0d4e84e1fd22c61d # v2 + uses: peaceiris/actions-hugo@2752ce1d29631191ea3f27c23495fa06139a5b78 # v3.2.1 with: - hugo-version: '0.88.1' + hugo-version: '0.165.0' # extended: true - name: Build @@ -39,7 +40,7 @@ jobs: run: node themes/minimo/scripts/generate-search-index-lunr.js - name: Deploy 🚀 - uses: JamesIves/github-pages-deploy-action@d92aa235d04922e8f08b40ce78cc5442fcfbfa2f # 4.8.0 + uses: JamesIves/github-pages-deploy-action@fa24774553152dd7873cd16ebd8d959b010c5445 # 4.9.0 with: branch: gh-pages folder: public diff --git a/.github/workflows/generate-artifact-pr.yml b/.github/workflows/generate-artifact-pr.yml index 421eb3da7..44d421e8f 100644 --- a/.github/workflows/generate-artifact-pr.yml +++ b/.github/workflows/generate-artifact-pr.yml @@ -8,23 +8,24 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout (tutorials) - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: ref: ${{ github.event.pull_request.head.sha }} submodules: true # Fetch Hugo themes (true OR recursive) fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod - name: Checkout (theme) - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: repository: MunifTanjim/minimo - ref: v2.9.0 + # repository: falkmielke/minimo + # ref: update_202605 path: themes/minimo - name: Setup Hugo - uses: peaceiris/actions-hugo@16361eb4acea8698b220b76c0d4e84e1fd22c61d # v2 + uses: peaceiris/actions-hugo@2752ce1d29631191ea3f27c23495fa06139a5b78 # v3.2.1 with: - hugo-version: '0.88.1' + hugo-version: '0.161.1' # extended: true - name: Build @@ -38,7 +39,7 @@ jobs: run: node themes/minimo/scripts/generate-search-index-lunr.js - name: Archive built site to an artifact - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: pr-${{ env.PR_NUMBER }}-inbo-tutorials-website path: public diff --git a/.github/workflows/remove_old_artifact.yaml b/.github/workflows/remove_old_artifact.yaml index 9587d7609..d33bf4738 100644 --- a/.github/workflows/remove_old_artifact.yaml +++ b/.github/workflows/remove_old_artifact.yaml @@ -12,7 +12,7 @@ jobs: steps: - name: Remove old artifacts - uses: c-hive/gha-remove-artifacts@44fc7acaf1b3d0987da0e8d4707a989d80e9554b # v1 + uses: c-hive/gha-remove-artifacts@62c2fbea931baa7dd4a6b73ea5a799984a818f61 # v1.8.0 with: age: '1 days' skip-recent: 5 diff --git a/.gitignore b/.gitignore index a81444158..fbad4afb7 100644 --- a/.gitignore +++ b/.gitignore @@ -69,3 +69,4 @@ data_gisclub/ /.quarto/ **/*.quarto_ipynb +/.hugo_build.lock diff --git a/README.md b/README.md index 1ebd7f1ac..e0c0f15e8 100644 --- a/README.md +++ b/README.md @@ -26,11 +26,17 @@ The technology used to create the website is [Hugo](https://gohugo.io/), a stati 1. [Install hugo](https://gohugo.io/getting-started/installing/) 2. Clone the tutorials repository -3. In the cloned tutorials directory, install the theme with `git clone https://github.com/MunifTanjim/minimo.git --branch v2.9.0 themes/minimo` -4. Build and serve the site with `hugo server` +3. In the cloned tutorials directory, install the theme[^1] with `git clone https://github.com/MunifTanjim/minimo.git themes/minimo` +4. Build and serve the site + a) with `hugo server` OR + b) for debugging, with `hugo -D` and then serving manually `python -m http.server 8887 --bind localhost --directory /public/` + +[^1]: The `minimo` theme seems unmaintained; a (temporary?) fork with fixes of hugo deprecation warnings is available [here](https://github.com/falkmielke/minimo/tree/update_202605). + For more information, see [Hugo's getting started documentation](https://gohugo.io/getting-started/usage/). + ### Customizing the theme The tutorials website makes use of the Hugo theme [minimo](https://themes.gohugo.io/minimo/). This theme is not included in the repository, but [downloaded by GitHub pages](https://github.com/inbo/tutorials/blob/262f305ef66fd4fc46ef7b2a9dce36cd2ad3e0d9/.github/workflows/deploy-gh-pages.yml#L18-L23) at build time. This avoids clutter and changes to the theme itself. To customize the theme: @@ -48,4 +54,4 @@ For more information, see the [Hugo theme customization documentation](https://g ## License -[Creative Commons Attribution](https://creativecommons.org/licenses/by/4.0/) for [content](content) / [MIT License](https://github.com/inbo/tutorials/blob/master/LICENSE) for source code. \ No newline at end of file +[Creative Commons Attribution](https://creativecommons.org/licenses/by/4.0/) for [content](content) / [MIT License](https://github.com/inbo/tutorials/blob/master/LICENSE) for source code. diff --git a/config.toml b/config.toml index ff520a925..84d992c53 100644 --- a/config.toml +++ b/config.toml @@ -1,5 +1,5 @@ theme = "minimo" -languageCode = "en-us" +locale = "en-us" title = "INBO Tutorials" ignoreFiles = ["\\.Rmd$", "\\.Rmarkdown$", "\\.qmd$", "_cache$", "\\.db$", "\\.csv$", "\\.sqlite$", "\\.geojson$"] @@ -12,7 +12,7 @@ copyright = "" disqusShortname = "" googleAnalytics = "" -Paginate = 1000 +pagination.pagerSize = 1000 preserveTaxonomyNames = true enableRobotsTXT = true # generate robots.txt @@ -146,7 +146,7 @@ hrefTargetBlank = true # edit this block for your own language [languages.en] lang = "en" -languageName = "English" +label = "English" weight = 1 [markup] diff --git a/layouts/page/search.html b/layouts/page/search.html new file mode 100644 index 000000000..daef9101e --- /dev/null +++ b/layouts/page/search.html @@ -0,0 +1,34 @@ +{{ partial "header" . }} + +{{ partial "header/header" . }} + +{{ if .Content }} +
+ {{ partial "entry/content" . }} +
+{{ end }} + +
+ {{ partial "widgets/search" . }} + + +
+ +{{- with .Site.Params.search.client -}} + {{- if eq . "lunr" -}} + + {{- else if eq . "algolia" -}} + + {{- end -}} + + {{- $scriptKey := ( print . "_search" ) -}} + {{- $scriptName := ( index hugo.Data.assets $scriptKey ).js -}} + +{{- end -}} + +{{ partial "footer" . }} diff --git a/layouts/partials/comments/staticman/list.html b/layouts/partials/comments/staticman/list.html new file mode 100644 index 000000000..571605178 --- /dev/null +++ b/layouts/partials/comments/staticman/list.html @@ -0,0 +1,19 @@ +{{- $entryId := .File.UniqueID -}} + +{{- if isset hugo.Data.comments $entryId -}} + +{{- $comments := ( index hugo.Data.comments $entryId ) -}} +

+ {{ i18n "commentsOnEntry" ( dict "Count" ( len $comments ) "Title" .Title ) }} +

+ +
    + {{- range $index, $comment := $comments -}} + {{- $.Scratch.Set "comments_depth" 1 -}} + {{- if not $comment.parent_id -}} + {{ partial "comments/staticman/comment" ( dict "Comment" $comment "Page" $ ) }} + {{- end -}} + {{- end -}} +
+ +{{- end -}} diff --git a/layouts/partials/comments/staticman/replies-list.html b/layouts/partials/comments/staticman/replies-list.html new file mode 100644 index 000000000..fb8e3927c --- /dev/null +++ b/layouts/partials/comments/staticman/replies-list.html @@ -0,0 +1,11 @@ +{{- .Page.Scratch.Add "comments_depth" 1 -}} +{{- $comments := ( index hugo.Data.comments .Page.File.UniqueID ) -}} +{{- $parentId := .ParentId -}} + +
    +{{- range $index, $comment := $comments -}} + {{- if ( eq $comment.parent_id $parentId ) -}} + {{ partial "comments/staticman/comment" ( dict "Comment" $comment "Page" $.Page ) }} + {{- end -}} +{{- end -}} +
diff --git a/layouts/partials/data/author/displayName b/layouts/partials/data/author/displayName new file mode 100644 index 000000000..d61edd5df --- /dev/null +++ b/layouts/partials/data/author/displayName @@ -0,0 +1,15 @@ +{{- $.Scratch.Set "authorID" "" -}} + +{{- if eq .Kind "term" -}} + {{- $.Scratch.Set "authorID" .Data.Term -}} +{{- else if eq .Kind "taxonomy" -}} + {{- $.Scratch.Set "authorID" .Name -}} +{{- else if eq .Kind "page" -}} + {{- $.Scratch.Set "authorID" ( index .Params.authors 0 ) -}} +{{- end -}} + +{{- $lang := ( .Params.lang | default .Lang ) -}} +{{- $author := ( index hugo.Data.authors ( $.Scratch.Get "authorID" ) ) -}} +{{- $i18nAuthor := ( index $author $lang ) -}} +{{- $name := ( or $i18nAuthor.name $author.name ) -}} +{{- $name.display -}} diff --git a/layouts/partials/entry/meta/author.html b/layouts/partials/entry/meta/author.html new file mode 100644 index 000000000..d23a3c36e --- /dev/null +++ b/layouts/partials/entry/meta/author.html @@ -0,0 +1,20 @@ +{{- with .Params.authors -}} + +{{- $lang := ( $.Params.lang | default $.Lang ) -}} + + + {{- partial "svg/icon" "author" -}} + {{ i18n "by" }} + + {{- range $i, $authorID := . -}} + {{- $author := ( index hugo.Data.authors $authorID ) -}} + {{- $i18nAuthor := ( index $author $lang ) -}} + {{- $name := ( or $i18nAuthor.name $author.name ) -}} + {{- if gt $i 0 }}, {{ end -}} + + {{- $name.display -}} + + {{- end -}} + + +{{- end -}} diff --git a/layouts/partials/entry/meta/edit-page.html b/layouts/partials/entry/meta/edit-page.html index 7ebc3e2d2..476d85f79 100644 --- a/layouts/partials/entry/meta/edit-page.html +++ b/layouts/partials/entry/meta/edit-page.html @@ -11,7 +11,7 @@ {{ end }} {{ with .Site.Params.githublink.GithubEditLink }} - {{- partial "svg/icons" "github" -}} Improve this page + {{- partial "svg/icon" "github" -}} Improve this page {{ end }} {{ end }} diff --git a/layouts/partials/footer/katex.html b/layouts/partials/footer/katex.html new file mode 100644 index 000000000..3b4198c05 --- /dev/null +++ b/layouts/partials/footer/katex.html @@ -0,0 +1,16 @@ +{{- $defaultKatex := hugo.Data.config.default.katex -}} +{{- $katex := ( or hugo.Data.config.katex $defaultKatex ) -}} + +{{- if or ( eq .Params.katex true ) ( .HasShortcode "katex" ) -}} + + + + + + + +{{- end -}} diff --git a/layouts/partials/footer/mathjax.html b/layouts/partials/footer/mathjax.html new file mode 100644 index 000000000..caab0b85d --- /dev/null +++ b/layouts/partials/footer/mathjax.html @@ -0,0 +1,14 @@ +{{- $defaultMathjax := hugo.Data.config.default.mathjax -}} +{{- $mathjax := ( or hugo.Data.config.mathjax $defaultMathjax ) -}} + +{{- if eq .Params.mathjax true -}} + + + + + +{{- end -}} diff --git a/layouts/partials/footer/mermaid.html b/layouts/partials/footer/mermaid.html new file mode 100644 index 000000000..4133b6921 --- /dev/null +++ b/layouts/partials/footer/mermaid.html @@ -0,0 +1,14 @@ +{{- $defaultMermaid := hugo.Data.config.default.mermaid -}} +{{- $mermaid := ( or hugo.Data.config.mermaid $defaultMermaid ) -}} + +{{- if eq .Params.mermaid true -}} + + + +{{- end -}} diff --git a/layouts/partials/footer/scripts.html b/layouts/partials/footer/scripts.html new file mode 100644 index 000000000..639216ad9 --- /dev/null +++ b/layouts/partials/footer/scripts.html @@ -0,0 +1,13 @@ + + + + +{{- range .Site.Params.assets.customJS -}} + +{{- end -}} + +{{ partial "footer/mathjax" . }} +{{- partial "footer/katex" . -}} +{{- partial "footer/mermaid" . -}} + +{{ partial "footer/extra" . }} diff --git a/layouts/partials/head/includes.html b/layouts/partials/head/includes.html new file mode 100644 index 000000000..ff68c42db --- /dev/null +++ b/layouts/partials/head/includes.html @@ -0,0 +1,14 @@ + + + +{{- if or ( .Site.Params.settings.rtl ) ( eq .Site.Language.Direction "rtl" ) -}} + +{{- end -}} + +{{- range .Site.Params.assets.customCSS -}} + +{{- end -}} + +{{- partial "head/css" . -}} + +{{- partial "head/analytics" . -}} diff --git a/layouts/partials/head/opengraph.html b/layouts/partials/head/opengraph.html new file mode 100644 index 000000000..7883ddf30 --- /dev/null +++ b/layouts/partials/head/opengraph.html @@ -0,0 +1,114 @@ + + + + + + +{{- with .Params.cover -}} + {{- $type := ( printf "%T" . ) -}} + {{- $isMap := ( not ( eq $type "string" ) ) -}} + + {{- $image := "" -}} + {{- if $isMap -}} + {{- $image = .image -}} + {{- else -}} + {{- $image = . -}} + {{- end -}} + + {{- $image = ( replaceRE "^\\./" $.RelPermalink $image ) -}} + + +{{- end -}} + +{{- with .Params.images -}} + {{- range first 5 . -}} + + {{- end -}} +{{- end -}} + +{{- if not ( or .Params.images .Params.cover ) -}} + {{- range $authorID := .Params.authors -}} + {{- $author := ( index hugo.Data.authors $authorID ) -}} + {{- with $author -}} + {{- if or .social.email ( and .email.username .email.host ) -}} + + {{- end -}} + {{- end -}} + {{- end -}} +{{- end -}} + +{{- with .Params.audios -}} + {{- range first 5 . -}} + + {{- end -}} +{{- end -}} + +{{- with .Params.videos -}} + {{- range first 5 . -}} + + {{- end -}} +{{- end -}} + +{{- if .IsPage -}} + {{- range $authorID := .Params.authors -}} + {{- $author := ( index hugo.Data.authors $authorID ) -}} + {{- with $author.social.facebook -}} + + {{- end -}} + {{- end -}} + + {{- with .Site.Params.opengraph.facebook.pageid -}} + + {{- end -}} + + + {{- range .Params.tags -}} + + {{- end -}} +{{- end -}} + +{{- $dateFormat := "2006-01-02T15:04:05Z07:00" -}} +{{- if .IsPage -}} + {{- if not .PublishDate.IsZero -}} + + {{- else if not .Date.IsZero -}} + + {{- end -}} + + {{- if not .Lastmod.IsZero -}} + + {{- end -}} + + {{- if not .ExpiryDate.IsZero -}} + + {{- end -}} +{{- else -}} + {{- if not .Site.Lastmod.IsZero -}} + + {{- end -}} +{{- end -}} + +{{- with .Site.Params.opengraph.facebook -}} + {{- with .appid -}} + + {{- end -}} + {{- range .admins -}} + + {{- end -}} +{{- end -}} + +{{- partial "head/opengraph/twitter" . -}} diff --git a/layouts/partials/head/opengraph/twitter.html b/layouts/partials/head/opengraph/twitter.html new file mode 100644 index 000000000..3a6f2fcf3 --- /dev/null +++ b/layouts/partials/head/opengraph/twitter.html @@ -0,0 +1,33 @@ + + +{{- with .Site.Params.opengraph.twitter.page -}} + +{{- end -}} + +{{- range $authorID := .Params.authors -}} + {{- $author := ( index hugo.Data.authors $authorID ) -}} + {{- with $author.social.twitter -}} + + {{- end -}} +{{- end -}} + +{{- with .Params.cover -}} + {{- $type := ( printf "%T" . ) -}} + {{- $isMap := ( not ( eq $type "string" ) ) -}} + + {{- $image := "" -}} + {{- if $isMap -}} + {{- $image = .image -}} + {{- else -}} + {{- $image = . -}} + {{- end -}} + + {{- $image = ( replaceRE "^\\./" $.RelPermalink $image ) -}} + + + {{- if $isMap -}} + {{- with .caption -}} + + {{- end -}} + {{- end -}} +{{- end -}} diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100644 index 000000000..b01a4f177 --- /dev/null +++ b/layouts/partials/header.html @@ -0,0 +1,36 @@ + + + +{{- partial "head/head" . -}} + + + +
+ + {{- partial "sidebar/sidebar" . -}} + +
+ + {{- partial "nav/menus/main" . -}} + + {{- $headerWidgets := .Site.Params.widgets.header -}} +
+
+ {{- partial "extras/widget_area" ( dict "Widgets" $headerWidgets "Scope" . ) -}} +
+
+ + + +
diff --git a/layouts/partials/widgets/about.html b/layouts/partials/widgets/about.html new file mode 100644 index 000000000..b1699f755 --- /dev/null +++ b/layouts/partials/widgets/about.html @@ -0,0 +1,33 @@ +{{- $defaultConfig := hugo.Data.config.default.widgets.about -}} +{{- $configData := ( or hugo.Data.config.widgets.about $defaultConfig ) -}} +{{- $lang := .Site.Language.Lang -}} +{{- $config := ( ( index $configData $lang ) | default $configData ) -}} + +
+
+ {{ with $config.logo }} + + {{ end }} +

+ + {{ with $config.title }} + {{- . -}} + {{ else }} + {{- .Site.Title -}} + {{ end }} + +

+
+ {{ with $config.description }} + {{- . | markdownify -}} + {{ else }} + {{- .Site.Params.info.description -}} + {{ end }} +
+
+ +
diff --git a/layouts/partials/widgets/breadcrumbs.html b/layouts/partials/widgets/breadcrumbs.html new file mode 100644 index 000000000..62d693236 --- /dev/null +++ b/layouts/partials/widgets/breadcrumbs.html @@ -0,0 +1,58 @@ +{{- $defaultConfig := hugo.Data.config.default.widgets.breadcrumbs -}} +{{- $configData := ( or hugo.Data.config.widgets.breadcrumbs $defaultConfig ) -}} +{{- $lang := .Site.Language.Lang -}} +{{- $config := ( ( index $configData $lang ) | default $configData ) -}} + +{{- define "breadcrumbs_add_parents" -}} + {{- .Scratch.Set "parent" .Page.Parent -}} + {{- if eq .Page.Kind "term" -}} + {{- .Scratch.Set "parent" ( .Page.Site.GetPage ( print "/" .Page.Data.Plural ) ) -}} + {{- end -}} + + {{- $parent := ( .Scratch.Get "parent" ) -}} + + {{- if $parent -}} + {{- if and ( ne $parent.Kind "home" ) ( not ( in .Config.excludeParents $parent.Type ) ) -}} + {{- .Scratch.Add "crumbs" $parent -}} + {{- end }} + {{ template "breadcrumbs_add_parents" ( dict "Config" .Config "Page" $parent "Scratch" .Scratch ) }} + {{- end -}} +{{- end -}} + +{{- define "breadcrumbs" -}} + {{- $crumbs := ( .Scratch.Get "crumbs" ) -}} + {{- $length := len $crumbs -}} + {{- $separator := .Config.separator -}} + + +
+ +
+{{- end -}} + +{{- $scratch := newScratch -}} + +{{- $scratch.Set "crumbs" ( slice . ) -}} +{{- template "breadcrumbs_add_parents" ( dict "Config" $config "Page" . "Scratch" $scratch ) -}} +{{- if ne .Kind "home" -}} + {{- $scratch.Add "crumbs" .Site.Home -}} +{{- end -}} + +{{- template "breadcrumbs" ( dict "Config" $config "Scratch" $scratch ) -}} diff --git a/layouts/partials/widgets/recent_posts.html b/layouts/partials/widgets/recent_posts.html index 686dc3506..f7780c6fb 100644 --- a/layouts/partials/widgets/recent_posts.html +++ b/layouts/partials/widgets/recent_posts.html @@ -1,5 +1,5 @@ -{{- $defaultConfig := .Site.Data.config.default.widgets.recent_posts -}} -{{- $configData := ( or .Site.Data.config.widgets.recent_posts $defaultConfig ) -}} +{{- $defaultConfig := hugo.Data.config.default.widgets.recent_posts -}} +{{- $configData := ( or hugo.Data.config.widgets.recent_posts $defaultConfig ) -}} {{- $lang := .Site.Language.Lang -}} {{- $config := ( ( index $configData $lang ) | default $configData ) -}} diff --git a/layouts/partials/widgets/search.html b/layouts/partials/widgets/search.html new file mode 100644 index 000000000..997498e26 --- /dev/null +++ b/layouts/partials/widgets/search.html @@ -0,0 +1,27 @@ +{{- $defaultConfig := hugo.Data.config.default.widgets.search -}} +{{- $configData := ( or hugo.Data.config.widgets.search $defaultConfig ) -}} +{{- $lang := .Site.Language.Lang -}} +{{- $config := ( ( index $configData $lang ) | default $configData ) -}} + + diff --git a/layouts/partials/widgets/sidebar_menu.html b/layouts/partials/widgets/sidebar_menu.html new file mode 100644 index 000000000..2f54fabf5 --- /dev/null +++ b/layouts/partials/widgets/sidebar_menu.html @@ -0,0 +1,72 @@ +{{- $defaultConfig := hugo.Data.config.default.widgets.sidebar_menu -}} +{{- $configData := ( or hugo.Data.config.widgets.sidebar_menu $defaultConfig ) -}} +{{- $lang := .Site.Language.Lang -}} +{{- $config := ( ( index $configData $lang ) | default $configData ) -}} + +{{- $menu := ( $config.mirror | default "sidebar" ) -}} + +{{- $.Scratch.Set "menu" $menu -}} + +{{- $items := ( index .Site.Menus $menu ) -}} + +{{- if $items -}} + +
+ {{- with $config.title -}} +
+

+ {{- . -}} +

+
+ {{- end -}} + + + +
+ +{{- end -}} + +{{- define "menu_item" -}} + +{{- $menu := ( .Page.Scratch.Get "menu" ) -}} + +{{- $isCurrent := ( .Page.IsMenuCurrent $menu .Item ) -}} +{{- $hasCurrent := ( .Page.HasMenuCurrent $menu .Item ) -}} +{{- $hasChildren := ( .Item.HasChildren ) -}} + +
  • + + {{- with .Item.Pre -}}{{- . -}}{{- end -}} + {{- .Item.Name -}} + {{- with .Item.Post -}}{{- . -}}{{- end -}} + + + {{- if $hasChildren -}} + + + + + {{- end -}} + +
  • + +{{- end -}} diff --git a/layouts/partials/widgets/social_menu.html b/layouts/partials/widgets/social_menu.html new file mode 100644 index 000000000..0ef177cc9 --- /dev/null +++ b/layouts/partials/widgets/social_menu.html @@ -0,0 +1,41 @@ +{{- $social := .Site.Params.social -}} + +{{- if $social -}} + +{{- $defaultConfig := hugo.Data.config.default.widgets.social_menu -}} +{{- $configData := ( or hugo.Data.config.widgets.social_menu $defaultConfig ) -}} +{{- $lang := .Site.Language.Lang -}} +{{- $config := ( ( index $configData $lang ) | default $configData ) -}} + +
    + {{- with $config.title -}} +
    +

    + {{- . -}} +

    +
    + {{- end -}} + + +
    + +{{- end -}} diff --git a/layouts/partials/widgets/taxonomy_cloud.html b/layouts/partials/widgets/taxonomy_cloud.html new file mode 100644 index 000000000..6aea3a79a --- /dev/null +++ b/layouts/partials/widgets/taxonomy_cloud.html @@ -0,0 +1,20 @@ +{{- $defaultConfig := hugo.Data.config.default.widgets.taxonomy_cloud -}} +{{- $configData := ( or hugo.Data.config.widgets.taxonomy_cloud $defaultConfig ) -}} +{{- $lang := .Site.Language.Lang -}} +{{- $config := ( ( index $configData $lang ) | default $configData ) -}} + +{{- $shuffle := ( $config.shuffle | default true ) -}} +{{- $taxonomy := ( $config.taxonomy | default "tags" ) -}} +{{- $taxonomyData := ( .Site.GetPage $taxonomy ).Data -}} +{{- $taxonomySingular := $taxonomyData.Singular -}} + +
    +
    +

    + {{- ( $config.title | default ( i18n $taxonomySingular 2 ) ) -}} +

    +
    + + {{ partial "extras/taxonomy_cloud" ( dict "Taxonomy" $taxonomy "Shuffle" $shuffle "Scope" . ) }} + +
    diff --git a/layouts/taxonomy/author.terms.html b/layouts/taxonomy/author.terms.html new file mode 100644 index 000000000..8df83c6b8 --- /dev/null +++ b/layouts/taxonomy/author.terms.html @@ -0,0 +1,25 @@ +{{- $lang := ( $.Params.lang | default $.Lang ) -}} + +{{ partial "header" . }} + +{{ partial "header/header" . }} + +
    +
      + {{ range .Data.Terms.Alphabetical }} + {{- $author := ( index hugo.Data.authors .Name ) -}} + {{- $data := ( or ( index $author $lang ) $author ) -}} + {{- $name := $data.name -}} +
    • +

      + {{- partial "svg/icon" "author" -}} + + {{- $name.display -}} + +

      +
    • + {{ end }} +
    +
    + +{{ partial "footer" . }}