Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This implements the ability to have multiple category hierarchies attached to a single post (#848).
By default, everything works the way it currently does; a list of categories will be assembled for a single category hierarchy. The change implemented here is that, if a category is a list,
setCategories()
will switch into multiple category mode, and each top-level item in the list will be a category hierarchy itself.This will result in four different categories assigned to the post, with three different hierarchies (
example-1
,example-2
, andexample-3/subexample-3.1
). The category generator already created index pages for intermediate categories, so[url]/category/example-3/
is a good URL, and would contain this post.I have just forked/cloned the
site
repo, and will get the documentation for this change there. Additionally, I plan to look at the WordPress export format; if it exports the categories in their hierarchy, I'll see if I can PR a change to that migrator to bring the hierarchies over intact.