Docsify does not preserve alias when importing an image
Les mainteneurs répondent en général sous 8 jours
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 42/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- javascript
- Domaine
- documentation
Piste de recherche
Commencez par le CodeSandbox lié et son README.md, puis reproduisez le cas d’alias à l’aide des exemples d’images de serialization.md. Suivez la gestion par Docsify des URL d’images aliasées et vérifiez le correctif pour les quatre formes d’images, y compris la sortie aliasée attendue.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Bug Report
Steps to reproduce
This page https://github.com/hamishwillee/mavlink-devguide/blob/demo_for_but/en/guide/serialization.md displays four images.
- The first two display an image in an /assets/ folder using absolute and relative paths.
- The second two display the same image in the same folder.
1.

2.

3.

4.
<img src="packet_mavlink_v2.jpg" title="MAVLink v2 packet">
If I display this page using an alias none of the images are displayed;
'/en/(.*)':
'https://raw.githubusercontent.com/hamishwillee/mavlink-devguide/docsify_test/en/$1'
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
Other relevant information
I think this is the same thing reported in https://github.com/docsifyjs/docsify/issues/1436#issuecomment-737107674
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?
-
Your OS: Windows 11
-
Node.js version: v16.15.0
-
npm/yarn version: yarn 1.22.5
-
Browser version: Latest Firefox and Chrome
-
Docsify version: 4.x
-
Docsify plugins: None
Please create a reproducible sandbox
[](https://codesandbox.io/s/late-dawn-tvrd7w?file=/README.md)
- click the link to display a test page that loads images
Mention the docsify version in which this bug was not present (if any)
All
- Langage dominant
- JavaScript
- Étoiles
- 31.5k
- Forks
- 5.8k
- Merge moyen
- 7 j 18 h
- PR mergées (30 j)
- 9
Préparer son environnement
- Fournit un Dockerfile ou un fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de docsifyjs/docsify
-
Query parameter values are truncated at a second equals signPeut-être pris @xu91102 l’a pris il y a 23 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
Les mainteneurs répondent en général sous 8 jours
-
Bullet points beginning with inline math: subsequent text formatting not recognised correctlyOuvertebug Triage
Difficulté 3/5 1-2 jours Accessibilité débutants 66/100
Les mainteneurs répondent en général sous 8 jours
-
Cached AJAX responses lose status metadata exposed through vm.route.responsePeut-être pris @xu91102 l’a pris il y a 23 jours. Ouverte
Difficulté 3/5 1-2 jours Accessibilité débutants 68/100
Les mainteneurs répondent en général sous 8 jours
-
In the Edge browser, the character `{docsify-updated}` is not replacedPeut-être à nouveau libre @AmanUllah687 l’a pris il y a 77 jours, et aucune pull request n’est ouverte. Ouvertewait for information
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
docsifyjs/docsify#2681 · 11 commentaires ·
Les mainteneurs répondent en général sous 8 jours
-
Nested/Recursive includesOuvertefeature request Triage
Difficulté 4/5 3-5 jours Accessibilité débutants 38/100
docsifyjs/docsify#2643 · 5 commentaires ·
Les mainteneurs répondent en général sous 8 jours
Toutes les issues de docsifyjs/docsify
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
apache/rocketmq-dashboard#7242 ·
Les mainteneurs répondent en général sous 3 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 77/100
mihai-vlc/sublime-jsfmt#56 ·
-
Bug v3
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
swc-project/swc#12576 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 77/100
Les mainteneurs répondent en général sous 1 jour