diff options
author | C. Lente <7017340+clente@users.noreply.github.com> | 2023-02-09 17:17:51 -0300 |
---|---|---|
committer | C. Lente <7017340+clente@users.noreply.github.com> | 2023-02-09 17:17:51 -0300 |
commit | 7a4c8fd24bc6dd6d06898dd51f856cfa3a6c43af (patch) | |
tree | a641079f809f2382a54647c996bc8e84ba258d3f | |
parent | 4b84339a4f58fec235845e4d1e56cd4667879526 (diff) | |
download | hugo-bearcub-7a4c8fd24bc6dd6d06898dd51f856cfa3a6c43af.tar.gz hugo-bearcub-7a4c8fd24bc6dd6d06898dd51f856cfa3a6c43af.tar.bz2 |
Less menus on config
-rw-r--r-- | exampleSite/config.toml | 21 | ||||
-rw-r--r-- | i18n/en.toml | 5 | ||||
-rw-r--r-- | i18n/pt.toml | 5 | ||||
-rw-r--r-- | layouts/partials/nav.html | 7 |
4 files changed, 14 insertions, 24 deletions
diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 2c28bc1..c847a29 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -8,7 +8,6 @@ theme = "hugo-bearcub" # Basic metadata configuration for your blog. author = "Caio Lente" copyright = "Caio Lente (CC BY-SA 4.0)" -DefaultContentLanguage = "en" # highlighting without inline styles [markup] @@ -21,6 +20,7 @@ DefaultContentLanguage = "en" # There are different options to translate files # See https://gohugo.io/content-management/multilingual/#translation-by-filename # And https://gohugo.io/content-management/multilingual/#translation-by-content-directory +DefaultContentLanguage = "en" [languages] [languages.en] title = "Example Site" @@ -39,14 +39,6 @@ DefaultContentLanguage = "en" name = 'Blog' url = '/blog' weight = 2 - [[languages.en.menu.main]] - name = 'Email' - url = '/ERRORERRORERROR' - weight = 3 - [[languages.en.menu.main]] - name = 'RSS' - url = '/index.xml' - weight = 4 [languages.pt] title = "Site Exemplo" languageName = "Português 🇧🇷" @@ -64,14 +56,6 @@ DefaultContentLanguage = "en" name = 'Blog' url = '/pt/blog' weight = 2 - [[languages.pt.menu.main]] - name = 'Email' - url = '/pt/ERRORERRORERROR' - weight = 3 - [[languages.pt.menu.main]] - name = 'RSS' - url = '/pt/index.xml' - weight = 4 [params] # The "description" of your website. This is used in the meta data of your generated html. @@ -98,3 +82,6 @@ DefaultContentLanguage = "en" # /!\ This is an experimental feature, might be removed or changed at any time # (Optional, experimental, default false) Enables a drop-down menu for translations only if a translation is present. hideUntranslated = false + + # Email + email = "c@lente.dev" diff --git a/i18n/en.toml b/i18n/en.toml index df177f0..64671c0 100644 --- a/i18n/en.toml +++ b/i18n/en.toml @@ -1,2 +1,5 @@ [filtering-for] - other = 'Filtering for'
\ No newline at end of file + other = 'Filtering for' + +[email-subject] + other = 'Reply to '
\ No newline at end of file diff --git a/i18n/pt.toml b/i18n/pt.toml index 23d03fb..476df2b 100644 --- a/i18n/pt.toml +++ b/i18n/pt.toml @@ -1,2 +1,5 @@ [filtering-for] - other = 'Filtrando para'
\ No newline at end of file + other = 'Filtrando para' + +[email-subject] + other = 'Resposta a '
\ No newline at end of file diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html index 95e33bc..71f1d12 100644 --- a/layouts/partials/nav.html +++ b/layouts/partials/nav.html @@ -1,6 +1,8 @@ {{ range .Site.Menus.main }} <a href="{{ .URL | absLangURL }}">{{ .Name }}</a> {{ end }} +<a href="mailto:{{ .Site.Params.email }}?subject={{ i18n "email-subject" }}'{{ .Page.Title | default .Site.Title }}'">Email</a> +<a href="/index.xml">RSS</a> {{ $pageLang := .Page.Lang }} {{ if .IsTranslated }} {{ range .Translations }} @@ -11,8 +13,3 @@ {{ else if not .Site.Params.hideUntranslated }} <a class="disabled" href="">{{ .Language.LanguageName }}</a> {{ end }} - -<!-- <a href={{ i18n "home" | relURL }}>Home</a> -<a href={{ i18n "posts" }}>Blog</a> -<a href="mailto:c@lente.dev?subject={{ i18n "reply" }}'{{ .Page.Title | default .Site.Title }}'">Email</a> -<a href="/index.xml">RSS</a> -->
\ No newline at end of file |