Skip to content

Consider dynamically defining URL links based on markdown host #6100

@mthalman

Description

@mthalman

There are many links to other markdown files from the set of repo README files. Example:

* [Build .NET Applications with SDK Container](https://github.com/dotnet/dotnet-docker/blob/main/samples/build-in-sdk-container.md)

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    • Status

      Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions