Skip to content

Github View/Edit links broken if defaultContentLanguageInSubdir = false #1420

@fekete-robert

Description

@fekete-robert

Hi, I am working on a site that uses Docsy 0.6.0 and might have hit a bug related to the following settings:

contentDir = "content"
defaultContentLanguage = "en"
defaultContentLanguageInSubdir = false

The site is only available in English, so we don't use the content/en/ subdir. The site builds fine, but the github links "View/edit this page" are broken, because they do contain the "/en/" part.

I wanted to create a PR to omit the language from https://github.com/google/docsy/blob/main/layouts/partials/page-meta-links.html if "defaultContentLanguageInSubdir = false", but since this parameter is not under the [params] tag of the config file, it's not accessible from the partial (unless I'm missing something).

Does anyone have a solution or workaround to the problem? It's not a big issue, if there is no neat solution I'll just hide the links. An ugly workaround would be to duplicate the "defaultContentLanguageInSubdir = false" under [params] as well, but that's a really ugly hack.

The site is https://kube-logging.github.io/docs/ , its source is available at https://github.com/kube-logging/kube-logging.github.io/blob/master/config/_default/config.toml

Thanks!
Robert

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions