dotnet / dotnet/dotnet-docker

Consider dynamically defining URL links based on markdown host

Open
#6,100 0 comments 0 reactions 0 assignees View on GitHub
area-documentation
Dominant language
Dockerfile
Stars
4.9k
Forks
2k
Avg merge
1d 14h
Merged PRs (30d)
26

Description

There are many links to other markdown files from the set of repo README files. Example: https://github.com/dotnet/dotnet-docker/blob/812265c4736effa36d57f012e596edac1d486d2c/README.sdk.md?plain=1#L37

These are absolute URLs. Ideally they would be relative because it would provide the following benefits:
* Linter will recognize that it's another reference within the repo.
* Prevents branch hopping. If a user in the nightly branch clicks the link, they'll get moved to the main branch and may not realize it.

The issue is that these README files are also hosted on other sites (MAR and Docker Hub) which do require absolute URLs. So there needs to be some dynamic behavior here, similar to what is done with https://github.com/dotnet/dotnet-docker/blob/main/eng/readme-templates/Url.md. That template is specifically meant for reference repo READMEs but we'd want one that is general purpose for referencing any markdown file, not just a repo README.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.