Skip to content

Problems with absLangURL #145

@yugr

Description

@yugr

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

<a href="{{ absLangURL "/" }}">{{ .Site.Title }}</a>

rather than just

<a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>

?

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.

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions