Why does the previewimage header metadata field require an images folder relative to the post?

3 views
Skip to first unread message

Christopher Patti

unread,
Aug 3, 2022, 12:18:37 PM8/3/22
to nikola-...@googlegroups.com
Hi all.

Trying to understand why the per post previewimage feature works the way it does.

If I understand correctly, by default in Nikola, images are stored in the images folder off the nikola root.

However the previewimage metadata header field wants images to live in a folder relative to the post.

Since I use the default folder layout with separate images/ and posts/ folders, I'm unsure how to use this feature correctly without cluttering up posts/ with separate images/ folders per post (Which I don't understand how that would work either :)

Thanks in advance, Nikola is amazing and I really love it! :)

-Chris

Chris Warrick

unread,
Aug 3, 2022, 12:57:39 PM8/3/22
to nikola-...@googlegroups.com
It is not required to use the `images/` folder for anything.
`previewimage` supports images from anywhere, not necessarily
`images/`, therefore `previewimage` behaves the same way `<a>` or
`<img>` would in the post. The best way to link to things is to use
root-relative (`/foo`) links.

--
Chris Warrick <https://chriswarrick.com/>
PGP: 5EAAEA16
Reply all
Reply to author
Forward
0 new messages