First document at root should not have special meaning when routing #18016
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.
Prerequisites
Description
The first root document has been given special meaning when routing content. I can't find any background for this, nor any reasoning why it should have.
Specifics
Given this document structure:
All the blog posts are routable both at their expected path
/[blog post URL segment]/
, but also at/posts/[blog post URL segment]/
. The latter should not be the case - at least not by default (more on that below).For comparison, the authors are not routable at
/authors/[author URL segment]/
- only at/[author URL segment]/
, as expected.HideTopLevelNodeFromPath
The
HideTopLevelNodeFromPath
config setting (see docs) is by defaulttrue
... setting it tofalse
should include the root document URL segment in the blog post and author paths - and this does work for both blog posts and authors:Testing this PR
Verify that V15 routes documents like V13 - with and without
HideTopLevelNodeFromPath
enabled.Note: root documents are always routable by their URL segment even with
HideTopLevelNodeFromPath
- this is consistent with the V13 behaviour.