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

Merge categories and sections (nuke sections) #3071

Merged
merged 15 commits into from May 5, 2018
Merged

Conversation

Kwpolska
Copy link
Member

@Kwpolska Kwpolska commented May 3, 2018

This fixes #2833. Sections are gone, categories can now do everything sections used to do.

Still to do: write a blog post to help people transition. Everything else works, including on Windows.

Close #3023, close #2486 (subdirectories are supported, and blog/foo/bar can be interpreted as foo/bar)
Close #2067 (categories appear in the usual place)
Close #2484, although categories don’t seem to be displayed either? (easy fix)
Close #2538 (sections are gone)

The section_prevnext needs a rewrite/adjustments/rename. done (v8/category_prevnext)

Sample site I used for testing: section_replacement.zip

Kwpolska added 13 commits May 2, 2018 23:04
…CRIPTIONS}`

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
… where their posts are

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 added this to the v8.0.0 milestone May 3, 2018
@Kwpolska Kwpolska added this to To Do in Version 8 via automation May 3, 2018
@Kwpolska Kwpolska moved this from To Do to In Progress in Version 8 May 3, 2018
Copy link
Contributor

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From just reading the code, LGTM. I'll try this out with my current blogs (all of which use neither sections nor categories; I'm using my own category taxonomy plugin) to see if it has some unwanted side-effects.

docs/manual.rst Outdated
Configuring tags, categories and sections
`````````````````````````````````````````
Configuring tags and categories
```````````````````````````````

There are multiple configuration variables dedicated to each of the three taxonomies. You can set:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

three -> two


for section_config_suffix, cat_config_suffix in (
('DESCRIPTIONS', 'DESCRIPTIONS'),
('TITLE', 'TITLES'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay to the special cases...

nikola/nikola.py Outdated
utils.LOGGER.info("Setting CATEGORY_DESTPATH_AS_DEFAULT = " + str(self.config['CATEGORY_DESTPATH_AS_DEFAULT']))

if self.config.get('CATEGORY_PAGES_FOLLOW_DESTPATH') and (not self.config.get('CATEGORY_ALLOW_HIERARCHIES') or self.config.get('CATEGORY_OUTPUT_FLAT_HIERARCHY')):
utils.LOGGER.warn('CATEGORY_PAGES_FOLLOW_DESTPATH requires CATEGORY_ALLOW_HIERARCHIES = True, CATEGORY_OUTPUT_FLAT_HIERARCHY = False.')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not make this an error and exit? Or explicitly state that the user-supplied values of CATEGORY_ALLOW_HIERARCHIES and CATEGORY_OUTPUT_FLAT_HIERARCHY are ignored?

@felixfontein
Copy link
Contributor

My blogs still compile as before. Everything's fine.

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
… match category renames

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
@Kwpolska Kwpolska merged commit 9ce7d2c into master May 5, 2018
Version 8 automation moved this from In Progress to Done May 5, 2018
@Kwpolska Kwpolska deleted the nuke-sections branch May 5, 2018 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Version 8
  
Done
2 participants