tschi
tschi

Reputation: 26

Docsy edit link are generate with local absolute path

I have install hugo v0.128.2 and Docsy example as a template (last version) on windows 11. In doc section the edit link is refered the github repo + the local absolute path instead of related path in the project: like

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

instead of

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

I got this issue on a update docsy example, so I try to run the vanilla docsy example but I get the same issue. Others links seems to be ok, only

Is it a bug or there is somehow a configuration to solve that ?

Upvotes: 0

Views: 74

Answers (1)

Mike Heinen
Mike Heinen

Reputation: 11

I saw same behavior you describe after I upgraded recently. It 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). After further investigation, it seems like this broke with this commit https://github.com/google/docsy/commit/435b2e0678694f3812a285a67dfac43f1c8ddd25 which means it broke in Docsy 0.9.0. The change here adds a forwardslash to hugo.WorkingDir when building the paths for the files which most likely works on Linux but introduced the breaking behavior on Windows. I submitted an issue for it here https://github.com/google/docsy/issues/2126

Quickest solution without a fix for Docsy is to do hugo and hugo serve commands in Linux environment, though Docsy should fix their stuff so that the build works on Windows like it did to before.

Upvotes: 1

Related Questions