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

Automatically transform relative file path links into URLs #78

Open
Gawdl3y opened this issue Dec 5, 2024 · 1 comment
Open

Automatically transform relative file path links into URLs #78

Gawdl3y opened this issue Dec 5, 2024 · 1 comment

Comments

@Gawdl3y
Copy link

Gawdl3y commented Dec 5, 2024

When writing markdown files to be viewed directly in a GitHub repo, you can link directly to source file views using plain file paths relative to the repo root. GitHub automatically transforms these paths into the appropriate URL to view that source file blob.

When the wiki output is built, however, the links become plain relative URLs and do not take into account the presence of source files at those paths, thus linking based off of the actual URL path on the page. It would be wonderful if it behaved like GitHub's built-in markdown viewer, transforming the file paths into URLs to view the source files.

Example

In-repo view: https://github.com/GoBLFC/Tracker/blob/main/wiki/Setup-(Docker).md#updating
Current wiki view: https://github.com/GoBLFC/Tracker/wiki/Setup-(Docker)#updating

See the link to .docker/scripts/update.sh in the Updating section of both of those.
In the repo view, it properly links to the file at that path within the repo (https://github.com/GoBLFC/Tracker/blob/main/.docker/scripts/update.sh).
In the wiki, it just links to https://github.com/GoBLFC/Tracker/.docker/scripts/update.sh, which is missing the blob/main part of the URL to actually view that file.

@Andrew-Chen-Wang
Copy link
Owner

It seems like there was a PR for it but it was reverted since it was a breaking change

jcbhmr wanted to release v5. @jcbhmr is there anything left in v5 that would help push this change out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants