Docsify does not preserve alias when importing an image
Mantenedores costumam responder em até 2 dias
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 42/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Estagnada
- Stack de tecnologia
- javascript
- Domínio
- documentation
Direção de pesquisa
Comece pelo CodeSandbox vinculado e pelo README.md correspondente; em seguida, reproduza o caso de alias usando os exemplos de imagens de serialization.md. Rastreie como o Docsify lida com URLs de imagens com alias e verifique a correção para as quatro formas de imagem, incluindo a saída esperada com alias.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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
- Linguagem predominante
- JavaScript
- Estrelas
- 31.5k
- Forks
- 5.8k
- Merge médio
- 2d 14h
- PRs com merge (30d)
- 5
Preparar o ambiente
- Inclui um Dockerfile ou arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de docsifyjs/docsify
-
Query parameter values are truncated at a second equals signTalvez já em andamento @xu91102 assumiu há 22 dias. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 88/100
Mantenedores costumam responder em até 2 dias
-
Bullet points beginning with inline math: subsequent text formatting not recognised correctlyAbertabug Triage
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 66/100
Mantenedores costumam responder em até 2 dias
-
Cached AJAX responses lose status metadata exposed through vm.route.responseTalvez já em andamento @xu91102 assumiu há 22 dias. Aberta
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 68/100
Mantenedores costumam responder em até 2 dias
-
In the Edge browser, the character `{docsify-updated}` is not replacedTalvez livre de novo @AmanUllah687 assumiu há 75 dias e não há nenhum pull request aberto. Abertawait for information
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 35/100
docsifyjs/docsify#2681 · 11 comentários ·
Mantenedores costumam responder em até 2 dias
-
Nested/Recursive includesAbertafeature request Triage
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 38/100
docsifyjs/docsify#2643 · 5 comentários ·
Mantenedores costumam responder em até 2 dias
Todas as issues de docsifyjs/docsify
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
Mantenedores costumam responder em até 1 dia
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 65/100
521xueweihan/HelloGitHub#4025 ·
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 90/100
iib0011/omni-tools#479 ·
Mantenedores costumam responder em até 1 dia
-
triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 67/100
pixelfed/pixelfed-rn#508 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
yetone/magpie#2844 · 1 comentário ·
Mantenedores costumam responder em até 1 dia