Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static markdown file #1845

Closed
kele14x opened this issue Oct 14, 2015 · 7 comments
Closed

Static markdown file #1845

kele14x opened this issue Oct 14, 2015 · 7 comments

Comments

@kele14x
Copy link

kele14x commented Oct 14, 2015

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?

@justinmayer
Copy link
Member

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

@kele14x
Copy link
Author

kele14x commented Oct 14, 2015

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

@ingwinlu
Copy link
Contributor

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

@justinmayer
Copy link
Member

Thanks for the correction, Winlu.

@kele14x
Copy link
Author

kele14x commented Oct 16, 2015

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

@ingwinlu
Copy link
Contributor

because the ArticlesGenerator runs before the StaticGenerator

@kele14x
Copy link
Author

kele14x commented Oct 16, 2015

@ingwinlu Thanks! Closing...

@kele14x kele14x closed this as completed Oct 16, 2015
ingwinlu added a commit to ingwinlu/pelican that referenced this issue Oct 17, 2015
Since getpelican#1509 got merged this pops up again and again (latest getpelican#1845). This
PR addresses the issue by adding a FAQ about it that explains why it is
necessary to add `*_EXCLUDES`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants