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

[WIP] Better support for relative links (e.g. download links) for non-markdown files #2300

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

MartenBE
Copy link

@MartenBE MartenBE commented Nov 6, 2023

Summary

Currently, using relative links to non-markdown files are broken and give a 404. This PR addresses this and should fix cases such as described in #1929 and others.

Related issue, if any:

#1929

What kind of change does this PR introduce?

  • Bugfix
  • Refactor

For any code change,

  • Related documentation has been updated, if needed -> Not needed
  • Related tests have been added or updated, if needed

Does this PR introduce a breaking change?

No, although there has been some refactoring.

Tested in the following browsers:

  • Chrome
  • Firefox
  • Safari
  • Edge

Notes

Relative linked files without extension are still seen as markdown files: I don't know if this is intentional or not, but seems counterintuitive. Better would be to require to link to .md-files with an explicit mention of the .md-extension (e.g. [test](test.md) of [test](./test.md).

Copy link

vercel bot commented Nov 6, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docsify-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 23, 2023 9:07pm

@MartenBE MartenBE changed the title Better support for relative links (e.g. download links) for non-markdown files [WIP] Better support for relative links (e.g. download links) for non-markdown files Nov 16, 2023
@trusktr
Copy link
Member

trusktr commented Nov 23, 2023

@MartenBE Hey can you add some non-.md files to the Docsify site so that we can manually test as well? (We can view the deployment for the PR for manual test). Once the PR is ready then we can delete them.

@MartenBE
Copy link
Author

I've added some test files, but the latest commits feel "off". It is rather unstable and sometimes seems to cause reload loops and weird behavior. Unfortunately, I am out of my league here as my understanding of docsify is rather superficial. I think the original commit (e594e39) was (although not as architectal "proper" as we would like) more robust, and also uses the same workings as image links.

@MartenBE
Copy link
Author

MartenBE commented Apr 9, 2024

In the previous months, we have decided to go with MkDocs instead of Docsify due to this bug and other reasons. So I'll probably won't work on this any further.

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

Successfully merging this pull request may close these issues.

2 participants