punch
punch copied to clipboard
Enable Images to Live under a contents subdirectory
Would make the system much easier to use and require much less markdown refactoring if you enable people to create an images directory as so:
contents _mysitearea images
Under templates, it's not as useful and can result in massive amount of image mingling or rework of all MD pages for image paths.....
I touched on this in another issue Lakshan's response:
@laktek "Also, I do agree content images doesn't really belong inside the templates directory. I'll try to introduce better content image fetching support in a future version."
It's good to have it as a separate feature request issue though.
There's a definite difference between 'design' images like logos and those linked from css, and 'content' images. I was really surprised when I found they all had to go in templates. It's not even markdown related, my plain html input still ends up with longer image paths because I've ended up replicating the folder structure of content/ under templates/content/.
One really horrible workaround I thought of would be base64 encoding images and including them directly in the content markup…
Yes. I do agree on separating content images from the template.
They should be ideally stored in the extended directories under content. However, I think I would make it a custom content handler plugin, rather than a core feature.
We're performing our own workaround by adding a feature in a parser to convert the images paths in our markdown to ones under templates/area_name/images......
Let us know how this request progresses.....
hello,
I had the same problem, so I built an alternative content handler, that can be used with punch: https://github.com/ghost23/punch-files-handler
It does the same as the original punch content handler, but additionally can copy folders with files from the content directory hierarchy.
Feedback is appreciated.