Open mbheinen opened 3 days ago
hugo version
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 https://github.com/google/docsy/commit/435b2e0678694f3812a285a67dfac43f1c8ddd25 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)
hugo
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
hugo serve
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
Environment
hugo version
): 0.115.3 (but also seems to be broken on 0.138.0)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 https://github.com/google/docsy/commit/435b2e0678694f3812a285a67dfac43f1c8ddd25 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
orhugo serve
. You'll notice the hyperlinks for "View page source", "Edit this page", and "Create child page" are paths likehttps://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