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

[Bug] Invalid Edit-this-page URL after update to docfx v2.72.0 #9337

Closed
bkoelman opened this issue Oct 24, 2023 · 2 comments · Fixed by #9338 or #9399
Closed

[Bug] Invalid Edit-this-page URL after update to docfx v2.72.0 #9337

bkoelman opened this issue Oct 24, 2023 · 2 comments · Fixed by #9338 or #9399
Labels
bug A bug to fix
Milestone

Comments

@bkoelman
Copy link

bkoelman commented Oct 24, 2023

Comparing the generated website with the output from 2.71.1:

  1. Incorrect remote URL: "json-api-dotnet" changed to "verdie-g" (which is a fork of the project that I cloned a while ago)
  2. Backslashes instead of forward slashes: "/api/index.md/#L1" changed to "\api\index.md/#L1"

Before update:

<meta name="docfx:docurl" content="https://github.com/json-api-dotnet/JsonApiDotNetCore/blob/master/docs/api/index.md/#L1">
...
<a href="https://github.com/json-api-dotnet/JsonApiDotNetCore/blob/master/docs/api/index.md/#L1" class="edit-link">Edit this page</a>

After update:

<meta name="docfx:docurl" content="https://github.com/verdie-g/JsonApiDotNetCore/blob/master/docs\api\index.md/#L1">
...
<a href="https://github.com/verdie-g/JsonApiDotNetCore/blob/master/docs\api\index.md/#L1" class="edit-link">Edit this page</a>

Context:

  • OS: Windows
  • Docfx version: 2.71.1

Output from git remote -v:

github-desktop-verdie-g https://github.com/verdie-g/JsonApiDotNetCore.git (fetch)
github-desktop-verdie-g https://github.com/verdie-g/JsonApiDotNetCore.git (push)
origin  https://github.com/json-api-dotnet/JsonApiDotNetCore.git (fetch)
origin  https://github.com/json-api-dotnet/JsonApiDotNetCore.git (push)

Output from git config --get remote.origin.url:

https://github.com/json-api-dotnet/JsonApiDotNetCore.git
@yufeih
Copy link
Contributor

yufeih commented Oct 24, 2023

Seems to be a bug in GitReader.

@filzrev
Copy link
Contributor

filzrev commented Nov 7, 2023

  1. Backslashes instead of forward slashes: "/api/index.md/#L1" changed to "\api\index.md/#L1"

Mixed path separator char problems on Windows environment is still occurred on latest docfx version. (2.73.1)
It's seems not related to GitReader library.
But caused by following path strings concatenation.

Path = Path.GetRelativePath(repo.path, filePath),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug to fix
Projects
None yet
3 participants