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

Fix #3022 -- Explain index.html conflicts better #3026

Merged
merged 3 commits into from Apr 15, 2018

Conversation

@Kwpolska
Copy link
Member

@Kwpolska Kwpolska commented Apr 14, 2018

New behavior:

$ nikola build
[2018-04-14T17:09:38Z] ERROR: Nikola: Post 'pages/index.rst': output path (output/index.html) conflicts with the blog index (output/index.html). Please change INDEX_PATH or disable index generation.
[2018-04-14T17:09:39Z] ERROR: Nikola: Post 'pages/index.rst': output path (output/es/index.html) conflicts with the blog index (output/es/index.html). Please change INDEX_PATH or disable index generation.
ERROR: Two different tasks can't have a common target.'output/index.html' is a target for render_taxonomies:output/index.html and render_pages:output/index.html.

cc @felixfontein @tbm

@Kwpolska Kwpolska added this to the v8.0.0 milestone Apr 14, 2018
@Kwpolska Kwpolska requested a review from felixfontein Apr 14, 2018
@Kwpolska Kwpolska requested a review from ralsina Apr 14, 2018
@tbm
Copy link
Contributor

@tbm tbm commented Apr 14, 2018

I just applied the patch and this is much clearer.

Thank you!

@Kwpolska Kwpolska force-pushed the fix-3022-better-index-html-conflict-errors branch from 4284929 to 90c2e4a Apr 14, 2018
Copy link
Contributor

@felixfontein felixfontein left a comment

LGTM, except two small things you might want to consider

@@ -43,9 +45,17 @@ def gen_tasks(self):
"filters": self.site.config["FILTERS"],
"show_untranslated_posts": self.site.config['SHOW_UNTRANSLATED_POSTS'],
"demote_headers": self.site.config['DEMOTE_HEADERS'],
"disable_indexes": self.site.config["DISABLE_INDEXES_PLUGIN_INDEX_AND_ATOM_FEED"],
Copy link
Contributor

@felixfontein felixfontein Apr 15, 2018

Is it a good idea to put this into kw? After all, this value is only needed at task generation time, and its use does not require a rebuild of all pages if it changes.

Copy link
Member Author

@Kwpolska Kwpolska Apr 15, 2018

Sure, it’s not really needed.

LOGGER.error(
"Post {0!r}: output path ({1}) conflicts with the blog index ({2}). "
"Please change INDEX_PATH or disable index generation.".format(
post.source_path, task['name'], index_paths[lang]))
Copy link
Contributor

@felixfontein felixfontein Apr 15, 2018

Maybe mention DISABLE_INDEXES_PLUGIN_INDEX_AND_ATOM_FEED as a way to disable index generation. That should make it easier for users to react on this message. (And they also see that this affects Atom feed generation.)

Copy link
Member Author

@Kwpolska Kwpolska Apr 15, 2018

Speaking of which, this config setting has a terrible name which should be changed in v8.

Kwpolska added 3 commits Apr 15, 2018
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
@Kwpolska Kwpolska force-pushed the fix-3022-better-index-html-conflict-errors branch from 2be84b8 to a9be3c7 Apr 15, 2018
@Kwpolska Kwpolska merged commit c5b7b96 into master Apr 15, 2018
4 of 5 checks passed
@Kwpolska Kwpolska deleted the fix-3022-better-index-html-conflict-errors branch Apr 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants