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

How to use absolute links in README file that don't break on fork / merge? #18

Open
diarmidmackenzie opened this issue Nov 15, 2022 · 1 comment

Comments

@diarmidmackenzie
Copy link
Member

From #17

One other point worth commenting on:

note: links aren't relative, so clicking https://diarmidmackenzie.github.io/aframe-physics-system and then clicking through to examples leads to the c-frame master examples instead of your local ones. may want to update those while you're here.

I don't know how to solve this. There's a good reason the links aren't relative - they wouldn't work in both the README view in GitHub and also on GitHub pages.

But if they are absolute, they need to updated every time you fork / merge. Which would quite likely lead to broken links in master (whic IMO is worse than broken links in a preview of a PR).

The problem seems to be documented here:
https://stackoverflow.com/questions/40196198/automatic-link-to-github-pages-url-from-readme-md

It's possible that this GitHub Action could provide a solution. There don't seem to be any other solutions available.
https://github.com/marketplace/actions/dynamic-readme

Originally posted by @diarmidmackenzie in #17 (comment)

@diarmidmackenzie
Copy link
Member Author

This GitHub Action isn't a great solution:

"There is a GitHub Action here that fills this need, but it has to be run any time there is a change, and also needs to make a new commit: https://github.com/marketplace/actions/dynamic-readme"

(from this GH Feature Request on the topic : https://github.com/orgs/community/discussions/37122)

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

1 participant