How to define children in jekyll? I want a certain page to be higher (e.g. in terms of…
- User
How to define children in jekyll? I want a certain page to be higher (e.g. in terms of read the doc sidebar) than others that discuss sub topics. How to do it? I currently have the default settings (no includes), and an example I want to make into a header is
layout: default title: "General Advice" permalink: /general-advice/ nav_order: 2
- Assistant
If you are using Just the Docs (the theme used by many “Read-the-Docs-style” Jekyll sites), then hierarchical navigation is controlled entirely through front-matter keys. To make a page appear above child pages in the sidebar, you declare it as a parent, and the others declare it as their parent. Here’s how to do it.
✅ 1. Parent page (your top-level header) yamlCopiar código--- layout: default title: "General Advice" permalink: /general-advice/ nav_order: 2 has_children: true # ← This makes it a parent in the sidebar
✅ 2. Child pages (sub-topics) Each child page adds: yamlCopiar código--- layout: default title: "Some Subtopic" parent: "General Advice" # ← Must match the parent title exactly nav_order: 1 # Order among siblings
You can also nest further using: yamlCopiar códigogrand_parent: "Top Section" parent: "General Advice"
Summary GoalFront-matter keyMake a page a parenthas_children: trueAssign a page under a parentparent: "Parent Title"Control orderingnav_order:
If you're using a different theme, tell me which one and I can give the exact syntax—but for Just the Docs, the above is the correct setup.
- User
What happens if you do not specify a grant_parent? why isn't parent of a parent enough?
- Assistant
In Just the Docs, grand_parent is optional — you only need it when you want a third navigation level to appear correctly in the sidebar. Here’s why:
✅ Why parent alone is not always enough Just the Docs navigation is not recursively inferred. The theme does not automatically look up your parent page’s parent and build the hierarchy on its own. Instead, it treats each page’s own front-matter as the single source of truth. So:
If a page has only parent: "X", it knows it belongs to X.
- User
Can I move the nav_order into a separate file (e.g. navigation.html so adding and changing is easier?) does nav_order allow 1.1 format? what about 203.11.133.32 formats (if there are many corrections)
- Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.