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

What is the best way to link local docs so that links that work both in .md and in .html formats? #133

Open
nucflash opened this issue Aug 4, 2024 · 0 comments

Comments

@nucflash
Copy link

nucflash commented Aug 4, 2024

What is the best way to create links to documents that work in both the Markdown Preview and the standalone HTML version?

Say that I'm typing fileB.md and I want to link to fileA.md that I wrote earlier. To make the link work in standalone HTML I write:

# fileB.md
[something related](fileA.html)

and after compilation it looks like this:

# fileB.html
<a href="fileA.html">something related</a>

This allows me to follow the link in the HTML version but it is broken in the Markdown version.

I'd like to refer to the file in it's Markdown source and have the compiler to convert it to .html so that the link works in HTML standalone mode too:

# fileB.md
[something related](fileA.md)

# fileB.html (after compilation)
<a href="fileA.html">something related</a>

Is there a way to achieve that? Thanks!

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