Pelican: Static markdown file

Created on 14 Oct 2015  路  7Comments  路  Source: getpelican/pelican

Hi, I have a static file in content/static named README.md. I want pelican directly copy it to output root folder, so I have:

STATIC_PATHS = [
    'static/README.md',
]
EXTRA_PATH_METADATA = {
    'static/readme.md': {'path': 'README.md'},
}

in my pelicanconf.py file. Bug when I run pelican, I got:

ERROR: Skipping static/README.md: could not find information about 'NameError: title'

With -D, I got:

DEBUG: Read file static/README.md -> Article
ERROR: Skipping static/README.md: could not find information about 'NameError: title'

Anyone have ideas how to tell pelican do not render this file?

All 7 comments

Try: Docs > Settings > IGNORE_FILES, applying it to your entire static folder.

Thanks for your reply @justinmayer , but IGNORE_FILES cause pelican completely ignore my README.md, it was not copied or rendered to output.

IGNORE_FILES is global and applies to all generators.

if you don't want it to be treated as an article, set ARTICLE_PATHS to suite your needs or utilize ARTICLE_EXCLUDES

Thanks for the correction, Winlu.

@ingwinlu ARTICLE_EXCLUDES = ['static'] solved my problem, thanks you! But I'm doubting why STATIC PATHS isn't here to meet this requirement.

because the ArticlesGenerator runs before the StaticGenerator

@ingwinlu Thanks! Closing...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Lucas-C picture Lucas-C  路  4Comments

iKevinY picture iKevinY  路  5Comments

quack1 picture quack1  路  6Comments

jkarimi91 picture jkarimi91  路  6Comments

junjiecai picture junjiecai  路  8Comments