Merge branch 'main' of github.com:HackmanClub/tapestry

This commit is contained in:
Bashy 2026-03-27 07:19:43 +01:00
commit d90f7e6b8f

View file

@ -108,17 +108,16 @@ sidebar_menu:
- Put post images in `source/images/`
- The theme generates thumbnails automatically in `source/thumbnails/`
- Use `small-` or `large-` in templates depending on your layout.
Example in a template:
```ejs
<% if (post.photos && post.photos.length) { %>
<img class="gallery" src="<%- config.root %>thumbnails/small-<%- post.photos[0].replace(/^images\//,'') %>" alt="<%- post.title %>">
<img class="gallery" src="<%- config.root %>thumbnails/<%- post.photos[0].replace(/^images\//, '') %>" alt="<%- post.title || 'Untitled' %>">
<% } %>
```
> ⚠️ Only shows image if `post.photos` exists.
> ⚠️ Only shows image if `post.photos` exists, and it will only show the first image.
---