marktext / marktext/marktext

Support image paths that are different on the server than the local system

Open
#3,750 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

:unicorn: feature request 🔭 area/editor
Dominant language
TypeScript
Stars
61.6k
Forks
4.6k
Avg merge
23h 49m
Merged PRs (30d)
89

Description

Describe your feature request

When you are using an engine like Hugo, it is common to have a local image path on your computer like "c:\hugo\static\images\hello.png" which then turns into an absolute image path like "/images/hello.png" when published. Marktext's current 'prefer relative image path' feature doesn't support this scenario.

A feature to 'Maintain server paths during editing and preview' would address this.

Additional context

This issue to be accompanied shortly by a PR that implements this feature.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the existing implementation of MarkText's “prefer relative image path” behavior and trace how image paths are handled during editing and preview. Done means supporting local paths such as c:\hugo\static\images\hello.png while preserving published server paths such as /images/hello.png in editing and preview.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
desktop
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.