-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
move {ARTICLE,PAGE}_DIR -> {ARTICLE,PAGE}_PATHS and correlate with {ARTICLE,PAGE}_EXCLUDES #1322
move {ARTICLE,PAGE}_DIR -> {ARTICLE,PAGE}_PATHS and correlate with {ARTICLE,PAGE}_EXCLUDES #1322
Conversation
I get some weird errors with these tests:
Not sure what to make of it. When I test this PR on my normal site, it works fine. |
@@ -462,7 +463,7 @@ def generate_context(self): | |||
all_articles = [] | |||
all_drafts = [] | |||
for f in self.get_files( | |||
self.settings['ARTICLE_DIR'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should still support ARTICLE_DIR and deprecate it instead of removing it so soon. So we don't break peoples config without deprecating the settings.
ARTICLE_DIR should be added to ARTICLE_PATHS for now.
Thank you @kylef for reminding me, added some backward compatibility code. |
Running the tests on this PR on my development environment (Mac OS X 10.9.2) results in a hung state — the tests never complete. Any updates on this effort, Ondrej? |
I still have no idea what is wrong, it seemed simple enough. |
Instead of one path a list can be given. This is due to popular request. Should help people not wanting to use Pelican for blogging. Maintain backward compatibility though. fix for getpelican#1322
if user still uses old path format, this will wrap the string into a list an process normally
if old path settings is used, it gets wrapped into a list and processed normally
if old path settings is used, it gets wrapped into a list and processed normally
change how STATIC_PATHS get processed to work with the new get_files function
@smartass101: We do now — see #1344. |
As discussed on https://botbot.me/freenode/pelican/msg/14590798/ , as part of this unification with other |
Instead of one path a list can be given. This is due to popular request. Should help people not wanting to use Pelican for blogging. Maintain backward compatibility though. Thanks to @ingwinlu for pointing out the change in StaticGenerator.
Pelican uses *_PATHS names for settings that represent a list of paths.
This makes it easier for someone to change PAGE_PATHS without the need to change ARTICLE_EXCLUDES accordingly.
Great work, Ondrej. One minor thing to correct, methinks:
I believe you added the first warning, which should be kept, while the (now-redundant) second warning was part of the initial implementation by @nikhilkalige. |
As per discussion on IRC, @smartass101 mentioned that both warnings have their value and should remain. Thanks for all your work on this, Ondrej! |
move {ARTICLE,PAGE}_DIR -> {ARTICLE,PAGE}_PATHS and correlate with {ARTICLE,PAGE}_EXCLUDES
Instead of one path a list can be given. This due to popular request.
Should help people not wanting to use Pelican for blogging.