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

Potential issues with internal links without proper mkdocs support #2

Open
bitsondatadev opened this issue Mar 7, 2024 · 0 comments

Comments

@bitsondatadev
Copy link

bitsondatadev commented Mar 7, 2024

First off, thanks @foosel for this plugin!

A few concerns I have as I want to adopt this. I've seen some links breaking in this scenario where we do not use the supported MkDocs where you do relative linking to the markdown file.

For example:

[Not MkDocs supported](site:contribute/)
[MkDocs supported](site:contribute.md)

Assuming site_url: http://localhost:8000, this would render to:

<!-- this works as expected -->
<a href="http://localhost:8000/contribute/">Not MkDocs supported</a>

<!-- this breaks since the page is compiled to contribute/index.html -->
<a href="http://localhost:8000/contribute.md">MkDocs supported</a>

I'm fine technically going against the spec as this plugin basically addresses everything as an external link. I can't think of a case where this would be an issue as we're basically removing all internal linking, but I just wanted to raise this and get some discussion/feedback for anyone else who shares this concern.

Edit:

This plugin will also break offline mode for those currently using mkdocs-materials plugins.

I almost wonder if there would be a similar way you could detect configurable set of file endings (e.g. .md), that don't get processed. I'm happy to look into this, but would like to know if you know of a better approach.

Few links I don't want to lose:

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