You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm writing a set of documentation pages organized on 3 levels, and often I need to rename titles or move pages from a top level to some nested level, and viceversa.
There are a few operations that are quite tedious and error prone:
when changing a page title in one file, all children and grandchildren are affected, e.g. all links are broken and require editing an entire tree of pages
when moving a page from top level under another page, all children/grandchildren are affected and need editing (plus there's a limit of 3 levels, so it's not always possible)
Overall, the main issue I think is relying on Page Title for organizing content, while it could be much easier having a dedicated Page ID and linking pages by ID. That's also how most CMS work and it would bring some benefits:
No need for grand_parent
Editing pages and Linking pages operations would not affecting each other
Allow to reuse Page ID values from a DB (e.g. GUIDs), e.g. if the content is managed with some software
Unlimited levels without the need to introduce something like grand_grand_grand_...._parent
No need for has_children (this could already be removed IMO)
permalinks could be auto-generated using the ID, e.g. /pages/<page ID>
Example with 3 pages
Current:
---title: Homehas_children: truepermalink: /------
title: About
parent: Home
has_children: true
permalink: /about
------
title: Contact US
parent: About
grand_parent: Home
permalink: /about/contact-us
---
There are a few operations that are quite tedious and error prone:
Right.
Overall, the main issue I think is relying on Page Title for organizing content, while it could be much easier having a dedicated Page ID and linking pages by ID. That's also how most CMS work and it would bring some benefits:
Switching to use page IDs for linking pages also has some significant drawbacks:
Requiring the use of page IDs would probably break almost all existing sites that use the theme.
Migrating a large site to use manually-chosen page IDs would surely be extremely tedious.
Ensuring site-wide uniqueness of page IDs could be problematic.
This theme generally tries to minimise breaking changes, so that existing sites can easily be upgraded to new releases and take advantage of the new features. Switching to require page IDs for linking pages would be a major breaking change.
Moreover, the source files of many websites may be organised systematically in much the same way as the navigation: the source files of pages with different parent pages are naturally stored in different directories. For such websites, the path to a source file is inherently a unique ID, and links between pages could be based directly on their paths – eliminating the need for parent, has_children, and grand_parent fields, as well as supporting unlimited navigation levels (see my comment in a discussion).
I'm writing a set of documentation pages organized on 3 levels, and often I need to rename titles or move pages from a top level to some nested level, and viceversa.
There are a few operations that are quite tedious and error prone:
Overall, the main issue I think is relying on Page Title for organizing content, while it could be much easier having a dedicated Page ID and linking pages by ID. That's also how most CMS work and it would bring some benefits:
grand_parent
grand_grand_grand_...._parent
has_children
(this could already be removed IMO)Example with 3 pages
Current:
Proposal:
The text was updated successfully, but these errors were encountered: