MacDownApp / MacDownApp/macdown
"Base URL" for resolving inline image relative references
- Dominant language
- Rich Text Format
- Stars
- 9.8k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
I've got a bunch of Wiki pages on GitLab which include images. Images on their system are referenced using paths **_relative to the wiki root_**, without any protocol/host name. E.g.:
```md

```
This is fine, and works great. (I can paste the images right into the editor!) BUT, when I check out the wiki git repo and load it into _Macdown_ I get a **_broken image_**.

To fix it, I have to edit the image reference to include the host path before the image path:
```md

```
Here's my request: **_Is it possible to have a document-specific Base URL for images?_**
I'm not sure how this would best be implemented, but I'm thinking maybe some hidden pragma in the document? Such as:
```md
[macdown_base_image_url]: # (https://foo.bar.bat/path/to/base/)
```
FYI, The idea for that syntax comes from:
https://stackoverflow.com/questions/4823468/comments-in-markdown
Thoughts? I realize this may open a can of worms (setting variables in a MD document).
Contributor guide
Research direction
No files, tests, or entry points are named in the issue. Start by locating MacDown's Markdown image-resolution path and reviewing how document-level metadata is handled; done means a document-specific base URL resolves relative image references without breaking existing Markdown behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, markdown
- Domain
- desktop
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100