Commit dfd98af
committed
Exclude topic and descendants if
Some branches are intended not exposed publicly. This could be because they're intended for internal use, such as `Configuration`. Or it could be because they're exposed to the website, but are not publicly accessibly, such as `Administration`. In these cases, these branches should not be included in the `SitemapController` results.
This was previously supported by adding the `NoIndex` any page or container (#38). This was due to a bug, however, and resulted in publicly available pages being excluded from the `SitemapController` if an ascendant topic was marked as `NoIndex`.
The recursive `NoIndex` is still supported for `Container` content types, but that's a special condition since `Container` is already excluded from the `SitemapController`, and thus its `NoIndex` attribute _must_ apply to its descendents. That's not intuitive behavior, however, and should be considered deprecated.
The `IsPrivateBranch` offers a solution that addresses both of these scenarios. As the name suggests, it is not intended to be used for publicly available pages, and thus won't affect the `NoIndex` treatment on individual pages—and, for that reason, it doesn't need to be added to e.g. the `TopicViewModel`. But it will accomplish what the recursive `NoIndex` was (unintendedly) used for: to exclude otherwise unavailable pages from the `SitemapController` both to avoid crawl errors and, potentially, to maintain data privacy.
This satisfies the needs of #72.IsPrivateBranch
1 parent 9b710d2 commit dfd98af
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
198 | 198 | | |
199 | 199 | | |
200 | 200 | | |
| 201 | + | |
201 | 202 | | |
202 | 203 | | |
203 | 204 | | |
| |||
0 commit comments