Skip to content

markdown links broke from README.md outside of docs folder #2250

Answered by facelessuser
my3sons asked this question in Q&A
Discussion options

You must be logged in to vote

Snippets is just a dumb content inserter and has no knowledge of your documentation structure, nor does it have the ability to know where in that structure you've inserted that content. Only at the MkDocs level would such knowledge be known.

There are probably two ways you could handle this.

  1. In you readme, give direct links to the deployed locations you can find the links in the readme; therefore it would be correct as a GitHub landing page and as a documentation page.

  2. Create a simple MkDocs plugin that intercepts the initial index.html page (where the readme is inserted) and programmatically rewrite the links so that as a github landing page, the links make sense, and when inserted i…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@my3sons
Comment options

Answer selected by my3sons
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants