Replies: 10 comments 1 reply
-
I'm using this technique. Apparently, static files inside a collection are not included in the |
Beta Was this translation helpful? Give feedback.
-
I'm also curious ? I'm looking for the same kind of structure in order to make my markdown file render well on github or in my preview, so paths must be relative from the markdown file |
Beta Was this translation helpful? Give feedback.
-
I follow a relatively simple approach - there may be a better way. in the
Then, completely separately, in the That way, the images are included by Jekyll when it collects them up. I just need to use the correct path to point to the images. |
Beta Was this translation helpful? Give feedback.
-
I have the same problem: Include images in Jekyll collection |
Beta Was this translation helpful? Give feedback.
-
It would.be a very useful feature to organize assets. |
Beta Was this translation helpful? Give feedback.
-
It will make editing easier! |
Beta Was this translation helpful? Give feedback.
-
Pleeeeease! |
Beta Was this translation helpful? Give feedback.
-
I started to include the path to the images in the frontmatter / metadata on top like this That way I can reference Images like Bit cumbersome but works me - especially after writing a little script to generate this structure just like one would do with the HuGo static site generator (e.g. |
Beta Was this translation helpful? Give feedback.
-
I feel there has got to be a better way than this, but this is what I do currently: <img
srcset="/assets/img/posts/{{ page.title | slugify }}/{{ include.url | replace: '.', '@2x.' }} 2x"
src="/assets/img/posts/{{ page.title | slugify }}/{{ include.url }}"
alt="{{ include.description }}"
/> {% include image.html url="my-photo.jpg" description="Lorem ipsum." %} The reason I don't like this is that you need to create a post & a folder structure in a separate location:
Ideally you would create one folder to place the post and related assets, then not need to reference that long path to make the image appear. |
Beta Was this translation helpful? Give feedback.
-
jekyll-postfiles might solve what you are trying to accomplish https://nhoizey.github.io/jekyll-postfiles/ |
Beta Was this translation helpful? Give feedback.
-
I very recently begun working on a blog project using Jekyll, but I have a question and I hoped the community could provide some help or guidance!
I'd like to include images and videos inside my posts, as well as giving each of them a cover picture that could appear in the post template, but also as a thumbnail when generating the list of posts.
I was thinking using a structure similar to this:
Each post would have its own folder, which could also contain the aforementioned media as well as the cover picture. Would that work? Is there anything I should watch out for when trying to integrate any of those assets in my post and index templates? Thanks in advance for your help!
Beta Was this translation helpful? Give feedback.
All reactions