mirror of https://github.com/luizdepra/hugo-coder.git

Michael Weiss
23.18.2023 f0baee4f8cd92da1cef33b004524dd585115f3c2
Use Relative Permalink in Language Selector (#764)

### Prerequisites

Put an `x` into the box(es) that apply:

- [x] This pull request fixes a bug.
- [ ] This pull request adds a feature.
- [ ] This pull request introduces breaking change.

### Description

Makes the language selector independent of the baseUrl config. This is
helpful if e.g. multiple domains alias to the page.

### Issues Resolved

None, afaik.

### Checklist

Put an `x` into the box(es) that apply:

#### General

- [x] Describe what changes are being made
- [x] Explain why and how the changes were necessary and implemented
respectively
- [ ] Reference issue with `#<ISSUE_NO>` if applicable

#### Resources

- [ ] If you have changed any SCSS code, run `make release` to
regenerate all CSS files

#### Contributors

- [x] Add yourself to `CONTRIBUTORS.md` if you aren't on it already
1 files modified
2 ■■■ changed files
layouts/partials/header.html 2 ●●● patch | view | raw | blame | history
layouts/partials/header.html
@@ -28,7 +28,7 @@
                {{ $node.Scratch.Set "separator" false }}
              {{ end }}
              <li class="navigation-item">
                <a href="{{ .Permalink }}">{{ .Language.LanguageName | emojify }}</a>
                <a href="{{ .RelPermalink }}">{{ .Language.LanguageName | emojify }}</a>
              </li>
            {{ end }}
          {{ end }}