Search code examples
static-sitepelican

Why does Pelican ignore STATIC_PATHS?


I use Pelican 4.2.0 and just started a new project. I can make html, but the output/ does not contain the directory bilder/ which I specified in pelicanconf.py via STATIC_PATHS.

How can I make pelican include this folder?


Solution

  • Pelican isn't ignoring STATIC_PATHS. Move your bilder and doc folders inside content and you will see the behavior you expect.

    From the Settings documentation > STATIC_PATHS setting (emphasis mine):

    A list of directories (relative to PATH) in which to look for static files.

    Your PATH setting is (correctly) set to the default value, which is your content folder. The folder specified in the PATH setting is where all your source content should live, but you have placed the bilder and doc folders at the root of your project directory, outside the content folder. Given your current project structure, Pelican looks inside your content, and since it doesn’t see the bilder and doc folders you set in STATIC_PATHS, it doesn’t do anything. You must move bilder and doc inside content in order for them to be copied via the STATIC_PATHS setting.