Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.

Idea - separate Plug.Static for image folder #33

Open
dkuku opened this issue Sep 18, 2021 · 4 comments
Open

Idea - separate Plug.Static for image folder #33

dkuku opened this issue Sep 18, 2021 · 4 comments

Comments

@dkuku
Copy link

dkuku commented Sep 18, 2021

Cool project.
What I'm currently doing in my project is to keep the static images folder inside the markdown folder and adding another Plug.Static in endpoint.exs for the images - this way I'ts compatible with external markdown editors and with phoenix because the file path is the same.

@dkuku dkuku changed the title Idea- image folder Idea - separate Slug.Static for image folder Sep 18, 2021
@dkuku dkuku changed the title Idea - separate Slug.Static for image folder Idea - separate Plug.Static for image folder Sep 18, 2021
@alfredbaudisch
Copy link
Owner

alfredbaudisch commented Sep 18, 2021

Thanks!

There's already support for static images and a Plug.Static, you can see it in the demo project, here and at 6:59 and onwards in the video tutorial.

The demo project also contains a bunch of images in the sample posts and sample folder.

Is this what you mean?

@alfredbaudisch
Copy link
Owner

alfredbaudisch commented Sep 18, 2021

It's also possible to point out which is the statics folder in the configuration.

# Name of the folder inside `root_path:`, that contains static assets,
# those files won't be parsed.

@dkuku
Copy link
Author

dkuku commented Sep 18, 2021

ok thanks. I just watched the beginning of the video and you had the images folder in separate disectery than the markdown files

@alfredbaudisch
Copy link
Owner

I'm going to create an example for this use case, so keeping it open.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants