[Feature Request] Allow dynamic insertion (templating) of basic variables (user/org/repo/branch name) into markdown #37122
Replies: 4 comments 1 reply
-
|
This is my most upvoted question on SO! Could it be done with an enhancement to autolinking? Since |
Beta Was this translation helpful? Give feedback.
-
|
Hi there @vincerubinetti and welcome to our community! Thank you for your suggestion 🙂 |
Beta Was this translation helpful? Give feedback.
-
|
It is even more useful for template/forked repos, where for instance, badges links need to be org/user relative, eg for [Edit me on Codesandbox](https://codesandbox.io/s/github/jdoe/superfun)would make a lot of sense being able to dynamically print |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Please upvote 👍 so this has a better chance of getting some attention.
Related Stack Overflow: https://stackoverflow.com/questions/40196198/automatic-link-to-github-pages-url-from-readme-md
When you are making a repo that is meant to be forked or templated, you often want to write the readme instructions in a way that is generic so that when a user clones it, they see instructions/links/etc that match their own org and repo. One major example would be linking to a GitHub Pages site in the readme, like
Once you enable GitHub Pages, your site should be live at <user>.github.io/<repo>. But there are many other cases where this would be useful, like linking to the.deveditor, or more cleanly linking to another assumed repo in the same org.The variables I can imagine would be most useful are
org_name,repo_name,current_branch,pages_url(could begithub.ioor custom domain).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
I'm sure this has been requested before somewhere, but I could not find it.
Beta Was this translation helpful? Give feedback.
All reactions