Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repo page links on right nav broken for Windows builds #2126

Open
6 of 12 tasks
mbheinen opened this issue Nov 18, 2024 · 0 comments
Open
6 of 12 tasks

Repo page links on right nav broken for Windows builds #2126

mbheinen opened this issue Nov 18, 2024 · 0 comments
Assignees
Labels
bug Something isn't working needs-triage

Comments

@mbheinen
Copy link

mbheinen commented Nov 18, 2024

Environment

  • Version of Docsy you are using: broken in 0.9.0 and also 0.11.0
  • How are you using Docsy? As a:
    • Hugo module
    • NPM module
    • Git submodule
    • Other:
  • Version of Hugo you are using (output of hugo version): 0.115.3 (but also seems to be broken on 0.138.0)
  • OS:
    • Linux
    • macOS
    • Windows
    • Other:

Problem

This issue is described here https://stackoverflow.com/questions/78754682/docsy-edit-link-are-generate-with-local-absolute-path. Basically, the "View page source", "Edit this page", and "Create child page" hyperlinks are broken when doing hugo build on Windows. I think this may have broke with this commit 435b2e0 released in Docsy 0.9.0 because it adds a forwardslash to hugo.WorkingDir when creating the trimmed path for the file in the page-meta-links.html template. This was working fine on Hugo v0.115.3 and Docsy v0.7.1 but I noticed it broke when I tried to update to current latest (Hugo v0.138.0 and Docsy v0.11.0)

Easily reproducible by cloning https://github.com/google/docsy-example on Windows and running hugo or hugo serve. You'll notice the hyperlinks for "View page source", "Edit this page", and "Create child page" are paths like

https://github.com/google/docsy-example/edit/main/C:%5csources%5csite%5cdocsy-example%5ccontent%5cen%5cdocs%5c_index.md

Rather than the expected

https://github.com/google/docsy-example/edit/main/_index.md

@mbheinen mbheinen added bug Something isn't working needs-triage labels Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage
Projects
None yet
Development

No branches or pull requests

2 participants