diff --git a/exampleSite/content.pt/blog/markdown-syntax.md b/exampleSite/content.pt/blog/markdown-syntax.md index 59d8dd5..2e95a55 100644 --- a/exampleSite/content.pt/blog/markdown-syntax.md +++ b/exampleSite/content.pt/blog/markdown-syntax.md @@ -3,6 +3,7 @@ title: "Guia da sintaxe markdown" date: "2020-01-03" description: "Sample article showcasing basic Markdown syntax and formatting for HTML elements." tags: ["markdown", "syntax"] +slug: "sintaxe-markdown" --- For a quick cheatsheet, check out https://simplemde.com/markdown-guide. diff --git a/exampleSite/content/blog/not-translated.md b/exampleSite/content/blog/not-translated.md new file mode 100644 index 0000000..c7e0602 --- /dev/null +++ b/exampleSite/content/blog/not-translated.md @@ -0,0 +1,7 @@ +--- +title: "This File Was Not Translated" +date: "2023-02-03" +description: "An untranslated file" +--- + +Lorem ipsum. diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html index b7e9f79..8e2dd90 100644 --- a/layouts/partials/nav.html +++ b/layouts/partials/nav.html @@ -1,15 +1,23 @@ {{ range .Site.Menus.main.ByWeight }} - {{ .Name }} + {{ .Name }} {{ end }} -Email +Email RSS -{{ $pageLang := .Page.Lang }} -{{ if .IsTranslated }} - {{ range .Translations }} - {{ if ne $pageLang .Lang }} - {{ .Language.LanguageName }} + + +{{ $translations := dict }} +{{ range .Translations }} + {{ $translations = merge $translations (dict .Language.Lang .) }} +{{ end }} + + +{{ range where .Site.Languages "Lang" "!=" .Page.Lang }} + {{ with (index $translations .Lang) }} + {{ .Language.LanguageName }} + {{ else }} + + {{ if not .Params.hideUntranslated }} + {{ .LanguageName }} {{ end }} {{ end }} -{{ else if not .Site.Params.hideUntranslated }} - {{ .Language.LanguageName }} {{ end }}