You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Docsify does not preserve alias when importing an image #1870
YOu can see why here - the assets folder is not found - either it can't find the assets folder, or it is looking in the root, or it is looking in the right folder locally, and not on the aliased site.
I think it should search the relative path of the alias to construct the URL.
What is current behaviour
If you load a markdown file using an alias images listed in that file cannot be imported.
What is the expected behaviour
If you import a file via an alias its images should be displayed
The had a horrible hack to hard code what site they are on into the URL. I'd be OK with that if you could get the information for your current context dynamically maybe, but I'd still hope this bug would be fixed.
[ x] Bug does still occur when all/other plugins are disabled?
But I think it is reasonable for a user to assume that docsify will do this for relative links on the remote content. And of course someone who is better at javascript could write a better method.
@impr0t Yes it would. This project is odd - truly innovative, and yet a few core things don't work, and never get fixed. The other one is relative/absolute paths - which break for the sidebar.
Activity
hamishwillee commentedon Aug 31, 2022
Note, you can work around this with a hook, a bit like:
But I think it is reasonable for a user to assume that docsify will do this for relative links on the remote content. And of course someone who is better at javascript could write a better method.
fluxion-dev commentedon Feb 14, 2023
@hamishwillee We're currently trying to integrate remote documentation and preserve aliasing in our project. This would be a great feature to have.
hamishwillee commentedon Feb 14, 2023
@impr0t Yes it would. This project is odd - truly innovative, and yet a few core things don't work, and never get fixed. The other one is relative/absolute paths - which break for the sidebar.
PS, I haven't finished, but if you're interested in seeing some of the things I've tried there is a branch here: https://github.com/hamishwillee/multidocsify_test/tree/px4test_docsify that renders to this https://hamishwillee.github.io/multidocsify_test/#/main/en/
Same requirement - multiple remote sources accessed via aliasing - with translation and versioning.
This uses https://evilmartians.com/chronicles/easy-multi-language-multi-version-documentation-with-docsify-git-and-github-actions to handle dynamically updating the sidebar links and hooks for the images.
Note that the only changes I needed to make for this to work with my old gitbook build was to make the SUMMARY.md links to start with
/