1
0
Fork 0
forked from github/pelican

Add FAQ about static files parsed as content

Since #1509 got merged this pops up again and again (latest #1845). This
PR addresses the issue by adding a FAQ about it that explains why it is
necessary to add `*_EXCLUDES`.
This commit is contained in:
derwinlu 2015-10-17 16:49:11 +02:00
commit 65f0f31b7b

View file

@ -264,3 +264,15 @@ to iterate over ``pages`` instead of ``PAGES``. Just replace::
with something like::
{% for pg in pages %}
How can I stop Pelican from trying to parse my static files as content?
=======================================================================
Pelican's article and page generators run before it's static generator. That
means if you use a setup similar to the default configuration, where a static
source directory is defined inside a ``*_PATHS`` setting, all files that have a
valid content file ending (``.html``, ``.rst``, ``.md``, ...) will be treated as
articles or pages before they get treated as static files.
To circumvent this issue either use the appropriate ``*_EXCLUDES`` setting or
disable the offending reader via ``READERS`` if you don't need it.