Problems with absLangURL
- Dominant language
- CSS
- Stars
- 1.4k
- Forks
- 381
- PR merge metrics
- No merged PRs in 30d
Description
_Hugo newbie here so sorry if question is silly and all. If my approach below is totally wrong I'd appreciate suggestions on how it could be fixed_
Is there a particular reason why layouts/partials/head.html uses
```
{{ .Site.Title }}
```
rather than just
```
{{ .Site.Title }}
```
?
The background for the question: I'd like my GitHub pages (at https://yugr.github.io) to provide several websites (currently it's just https://yugr.github.io/recovering-teamlead but I'd like to be able to add say https://yugr.github.io/pink-ponies-for-everyone in future). For this I have a separate subdirectory for each blog with custom `baseURL` attribute (I believe this approach is relatively common). E.g. for https://yugr.github.io/recovering-teamlead I set
```
baseURL = 'https://yugr.github.io/recovering-teamlead/'
```
in my [hugo.toml](https://github.com/yugr/yugr.github.io/blob/main/recovering-teamlead/hugo.toml).
Unfortunately `absLangURL "/"` evaluates to `https://yugr.github.io` (rather than `https://yugr.github.io/recovering-teamlead/` as I would expect) which gives reader 404.
I believe same issue will apply to other calls to `absURL`.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in layouts/partials/head.html and inspect how absLangURL "/" is resolved against the site configuration. Reproduce the build with the recovering-teamlead hugo.toml and its subdirectory baseURL, then compare the generated link with .Site.BaseURL. Done means the site-title link preserves /recovering-teamlead/ and does not lead to a 404.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100