-
-
Notifications
You must be signed in to change notification settings - Fork 481
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
Co-locating images together with a blog post in a folder #2428
Comments
Thanks! I did get the first part working after my PR got merged (co-locating images), but I don't think auto-converting Markdown images to 11ty images is currently possible. I got very close, but I ultimately ran into the gotcha noted here for I think it would be cool if 11ty exposed some kind of post-processing API that allows you to query all files matching a format/extension (like
|
A little late to the comments, but YES this is exactly what I had in mind. 🙏🏻 |
This is exactly what I would like too 🙏🏻 makes it soo much easier to manager pages that have a lot of images, e.g. tutorials that have screenshots. |
this seems close but not using standard markdown https://gfscott.com/blog/eleventy-img-without-central-image-directory/ and here is a seemingly simple solution https://scottwhittaker.net/posts/colocate-images-with-post-using-eleventy |
Just wanted to add a big vote in support of doing this. I think it would be one of the main barriers preventing my workplace moving from hugo to eleventy. We do a bunch of stuff with community groups and digital autonomy, one of the things we've found when helping set up a static site for a group and on boarding them is that the idea of a single piece of work being split up and spread across different directories (and those directories contain pieces of other bits of work!?) is really not intuitive and can be quite overwhelming. |
@aaaaargZombies I accomplished the images in a posts directory here. |
@zachleat Am I correct in understanding that this issue will be resolved with the new |
@AleksandrHovhannisyan I tried that plugin and it did not work out very well for me. It DOES result in images co-located with the page in the output, but it rewrites the images and changes their file names and running it on my 20 year old blog it was throwing lots of errors, complaining about images which work fine but which it did not like for some reason. think it's changing the resolution and size of the images as well, which might be useful in some situations, but all I was after and what brought me to this issue was that I wanted to just copy source images from the input to the output. In the end I added a hacky thing to my 11tyconfig to copy stuff - complete with a catch block that does no error reporting.
|
Via:
Just want to make sure this captures the workflow y’all would like to see!
The text was updated successfully, but these errors were encountered: