dendron icon indicating copy to clipboard operation
dendron copied to clipboard

Use image paths that are consistent with pandoc

Open zeyuz35 opened this issue 4 years ago • 4 comments
trafficstars

Please select if your request is either something new or an enhancement

  • [x ] Enhancement of an existing Feature.
  • [ ] Request of a new feature.

Please select the area your request applies to. (Multiple selections are possible)

  • [ ] Onboard. Initial vault setup and import/export pods
  • [ ] Create. Note creation, lookup, snippets and templates
  • [ ] Retrieve. Backlinks, references, graph view
  • [ ] Structure. Refactoring, multi-vault and schemas
  • [x ] Publish. Sharing your repo with the world
  • [x ] Misc (Choose this if your not sure)

Is your feature request related to a problem? Please describe

Currently, dendron (built websites) uses /assets/images/image.png as the required path for images. This is annoyingly different to pandoc, which uses ./assets/images/image.png OR assets/images/image.png for images to be sourced and displayed correctly. The same .md files cannot have working images in both the built website and pandoc.

Describe the solution you'd like

A change to the way images are sourced in dendron websites to be line with that of pandoc.

Describe alternatives you've considered

Additional context

Inspecting the html code of the dendron website and manually changing the image path fixes it, so it should be simple.

zeyuz35 avatar Nov 16 '21 22:11 zeyuz35

Thanks for pointing this out. We'll keep this tracked in our backlog and let you know when we get to it in this thread 🙏🏼

hikchoi avatar Nov 18 '21 14:11 hikchoi

Image path options, per vault, to consider based on this issue:

assets/images/*
/assets/images/*
./assets/images/*

Dendron uses /assets/images/* within each vault.

Seems like the idea would be ./assets/images/* (explicit relative) or assets/images/* (implicit relative) instead of /assets/images/* (explicit absolute, from root of workspace or even filesystem?), since the last format can be confusing tools working within the root of a workspace: tools may think /workspace-root/assets/ is /assets/ instead of /workspace-root/vault-target/assets/).

I feel like the explicit relative would be most ideal, with the ./assets/images/* format. Though, I haven't tested with a wide enough array of tooling to know what approach would be considered more standard.

ScriptAutomate avatar Dec 23 '21 18:12 ScriptAutomate

Adding my own vote and my own screenshot

image

simkimsia avatar Jan 18 '22 05:01 simkimsia

Also related: However this is done, it will likely require an update to https://github.com/dendronhq/dendron-paste-image

ScriptAutomate avatar Jan 18 '22 16:01 ScriptAutomate