Skip to content

TOC/breadcrumbs function incorrectly when using parent pages within collections #492

@jtebert

Description

@jtebert

Describe the bug
When using the collections organization, I still have parent/child pages within the collection, (using has_children: true on the parent and parent: Page Name in the child page). This appears as expect in the menu. However, for every collection except the last collection (by menu/config order), the table of contents on the parent page is empty (though it still displays the TOC title) and the breadcrumbs on the child pages do not correctly link to the parent page (they appear to have no href set).

To Reproduce
Steps to reproduce the behavior:

  1. Create 2+ collections in the config. eg:
collections:
programming:
  permalink: "/:collection/:path/"
  output: true
projects:
  permalink: "/:collection/:path/"
  output: true

just_the_docs:
collections:
  programming:
    name: Programming
  projects:
    name: Projects
  1. Within the first collection folder (_programming in this example), create 2 files.

index.md

---
layout: page
title: Parent Test
has_children: true
---

Should have a TOC that includes the child page, but it's empty.

child.md

---
layout: page
title: Child Test
parent: Parent Test
---

Breadcrumbs on this page should link to the parent page but don't.
  1. When loaded, these pages will have the TOC/breadcrumb issues I describe. But if you move these two files to the last collection (as ordered in just_the_docs in the config file), they TOC/breadcrumbs will behave properly.

Expected behavior
There should be a TOC/proper breadcrumbs for child/parent pairs in all of the collections.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Pop OS 20.10
  • Using latest just-the-docs release (0.3.3) and Jekyll 3.8.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions