Docsify does not preserve alias when importing an image
維護者通常 8 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 42/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- javascript
研究方向
從連結的 CodeSandbox 及其 README.md 開始,然後使用 serialization.md 中的圖片範例重現別名情況。追蹤 Docsify 對帶別名圖片 URL 的處理,並針對全部四種圖片形式驗證修正,包括預期的帶別名輸出。
由索引模型根據 Issue 內容生成。
描述
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
- 主要語言
- JavaScript
- 星號
- 31.6k
- 分支
- 5.8k
- 平均合併
- 7 天 18 小時
- 30 天內合併 PR
- 9
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
docsifyjs/docsify 的其他 Issue
-
Query parameter values are truncated at a second equals sign可能已有人在做 @xu91102 於 27 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 88/100
維護者通常 8 天內回覆
-
bug Triage
難度 3/5 1-2 天 新手友好度 66/100
docsifyjs/docsify#2839 · 1 則留言 ·
維護者通常 8 天內回覆
-
Cached AJAX responses lose status metadata exposed through vm.route.response可能已有人在做 @xu91102 於 27 天前認領。 未關閉
難度 3/5 1-2 天 新手友好度 68/100
維護者通常 8 天內回覆
-
In the Edge browser, the character `{docsify-updated}` is not replaced可能重新可做 @AmanUllah687 於 80 天前認領,目前沒有進行中的 PR。 未關閉wait for information
難度 4/5 3-5 天 新手友好度 35/100
docsifyjs/docsify#2681 · 11 則留言 ·
維護者通常 8 天內回覆
-
feature request Triage
難度 4/5 3-5 天 新手友好度 38/100
docsifyjs/docsify#2643 · 5 則留言 ·
維護者通常 8 天內回覆
查看 docsifyjs/docsify 的全部 Issue
相似的 Issue
-
frontend
難度 2/5 1-3 小時 新手友好度 69/100
uoftblueprint/canada-basketball#79 ·
維護者通常 1 天內回覆
-
New App Request
難度 1/5 1 小時以內 新手友好度 76/100
ThatGuySam/doesitarm#1126 · 1 則留言 ·
-
難度 2/5 1-3 小時 新手友好度 66/100
lyswhut/lx-music-desktop#3026 ·
-
good first issue server
難度 2/5 1-3 小時 新手友好度 85/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 67/100
openstreetmap/iD#13054 ·
維護者通常 1 天內回覆