Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maintain relative asset paths when building #33

Open
raqbit opened this issue Sep 25, 2020 · 0 comments
Open

Maintain relative asset paths when building #33

raqbit opened this issue Sep 25, 2020 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@raqbit
Copy link
Contributor

raqbit commented Sep 25, 2020

Is your feature request related to a problem? Please describe.

Currently when you specify asset files, the files will be copied to the root of the build directory, even though they might have been in a sub-directory of the project. This means that the paths specified in the markdown (images, mostly) should unintuitively be relative tot the generated result html: ./foo.png instead of relative to the source markdown: ./media/foo.png.

Describe the solution you'd like

We should keep the directory structure for the asset paths by creating the parent folder(s) of all assets copied.

Describe alternatives you've considered

We could keep this "flatten" behavior but rewrite all mentioned urls in the markdown/html documents to the new relative file paths, but this would require hooking into the markdown-renderer and any potential custom urls (in markdown plugins) would probably not be detected.

@raqbit raqbit added the enhancement New feature or request label Sep 25, 2020
@raqbit raqbit added this to the v1.0.0 milestone Sep 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant