Sourcecode images next to the .rst files instead of in dedicated folder?

12 views
Skip to first unread message

Daniel Habermayr

unread,
Jul 25, 2022, 6:27:54 AM7/25/22
to nikola-...@googlegroups.com
Hello everyone!


In the documentation regarding images, a dedicated folder for images is
assumed.

However, i am working on a project where images for pages / blogs should
lie directly next to the .rst files like this:

/project

    /blog

        foo.rst

        foo.meta

        foo.png

Is there something you can do in the config file to make this kind of
source structure "buildable"?

If not, can you point me to where i would have to edit the source code?


Many thanks in advance,

Daniel

Roberto Alsina

unread,
Jul 25, 2022, 7:44:45 AM7/25/22
to Nikola—Discuss
Sure!

You need to mirror your POSTS setting in your IMAGE_FOLDERS setting.

So, suppose you have this in POSTS:

POSTS = (( "posts/*md", "/posts", " post.tmpl") 

Adding

IMAGE_FOLDERS = {"posts": "posts"}

would do it.

--
You received this message because you are subscribed to the Google Groups "nikola-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nikola-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nikola-discuss/b13ea110-4bcb-fa9e-af1b-95af408b6dc9%40gmx.de.
Reply all
Reply to author
Forward
0 new messages