main link does not switch back to default language if in another language (#202)
no need to configure the language path in the different pages
This commit is contained in:
parent
7ed7d3c51e
commit
dea81ca434
|
@ -41,3 +41,4 @@
|
||||||
- [Jia "Jay" Tan](https://github.com/j7an)
|
- [Jia "Jay" Tan](https://github.com/j7an)
|
||||||
- [Ryan](https://github.com/alrayyes)
|
- [Ryan](https://github.com/alrayyes)
|
||||||
- [Naim A.](https://github.com/naim94a)
|
- [Naim A.](https://github.com/naim94a)
|
||||||
|
- [Alexander Rohde](https://github.com/a1x42)
|
||||||
|
|
|
@ -84,22 +84,22 @@ disqusShortname = "yourdiscussshortname"
|
||||||
[[languages.en.menu.main]]
|
[[languages.en.menu.main]]
|
||||||
name = "About"
|
name = "About"
|
||||||
weight = 1
|
weight = 1
|
||||||
url = "/about/"
|
url = "about/"
|
||||||
|
|
||||||
[[languages.en.menu.main]]
|
[[languages.en.menu.main]]
|
||||||
name = "Blog"
|
name = "Blog"
|
||||||
weight = 2
|
weight = 2
|
||||||
url = "/posts/"
|
url = "posts/"
|
||||||
|
|
||||||
[[languages.en.menu.main]]
|
[[languages.en.menu.main]]
|
||||||
name = "Projects"
|
name = "Projects"
|
||||||
weight = 3
|
weight = 3
|
||||||
url = "/projects/"
|
url = "projects/"
|
||||||
|
|
||||||
[[languages.en.menu.main]]
|
[[languages.en.menu.main]]
|
||||||
name = "Contact me"
|
name = "Contact me"
|
||||||
weight = 5
|
weight = 5
|
||||||
url = "/contact/"
|
url = "contact/"
|
||||||
|
|
||||||
|
|
||||||
[languages.pt-br]
|
[languages.pt-br]
|
||||||
|
@ -118,19 +118,19 @@ disqusShortname = "yourdiscussshortname"
|
||||||
[[languages.pt-br.menu.main]]
|
[[languages.pt-br.menu.main]]
|
||||||
name = "Sobre"
|
name = "Sobre"
|
||||||
weight = 1
|
weight = 1
|
||||||
url = "/pt-br/about/"
|
url = "about/"
|
||||||
|
|
||||||
[[languages.pt-br.menu.main]]
|
[[languages.pt-br.menu.main]]
|
||||||
name = "Blog"
|
name = "Blog"
|
||||||
weight = 2
|
weight = 2
|
||||||
url = "/pt-br/posts/"
|
url = "posts/"
|
||||||
|
|
||||||
[[languages.pt-br.menu.main]]
|
[[languages.pt-br.menu.main]]
|
||||||
name = "Projetos"
|
name = "Projetos"
|
||||||
weight = 3
|
weight = 3
|
||||||
url = "/pt-br/projects/"
|
url = "projects/"
|
||||||
|
|
||||||
[[languages.pt-br.menu.main]]
|
[[languages.pt-br.menu.main]]
|
||||||
name = "Contato"
|
name = "Contato"
|
||||||
weight = 5
|
weight = 5
|
||||||
url = "/pt-br/contact/"
|
url = "contact/"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<nav class="navigation">
|
<nav class="navigation">
|
||||||
<section class="container">
|
<section class="container">
|
||||||
<a class="navigation-title" href="{{ .Site.BaseURL | absLangURL }}">
|
<a class="navigation-title" href="{{ .Site.BaseURL | relLangURL }}">
|
||||||
{{ .Site.Title }}
|
{{ .Site.Title }}
|
||||||
</a>
|
</a>
|
||||||
<input type="checkbox" id="menu-toggle" />
|
<input type="checkbox" id="menu-toggle" />
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
{{ with .Site.Menus.main}}
|
{{ with .Site.Menus.main}}
|
||||||
{{ range sort . }}
|
{{ range sort . }}
|
||||||
<li class="navigation-item">
|
<li class="navigation-item">
|
||||||
<a class="navigation-link" href="{{ .URL | safeURL }}">{{ .Name }}</a>
|
<a class="navigation-link" href="{{ .URL | absLangURL }}">{{ .Name }}</a>
|
||||||
</li>
|
</li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
Loading…
Reference in New Issue