diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 46dfd54..f403ead 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -84,8 +84,7 @@ jobs: - name: Test with Nu Validator uses: Cyb3r-Jak3/html5validator-action@2a593a9f2c10593cbac84791a6fc4c47e9a106c8 with: - root: _site - blacklist: line-numbers + config: fixtures/html5validator-config.yml - name: Test with html-proofer run: bundle exec htmlproofer _site --ignore-urls "/github.com/,/web.archive.org/" env: diff --git a/CHANGELOG.md b/CHANGELOG.md index 5247830..45418dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,8 +20,14 @@ Code changes to `main` that are *not* in the latest release: ### Bugfixes - Fixed: remove href from the navigation link to the current page by [@pdmosses] in [#1356] +- Fixed: improve build time by [@pdmosses] in [#1358] + +{: .warning } +[#1358] moved `_includes/nav.html` to the `_includes/components` directory, +Users who were overriding that file will need to adjust their sites accordingly. [#1356]: https://github.com/just-the-docs/just-the-docs/pull/1356 +[#1358]: https://github.com/just-the-docs/just-the-docs/pull/1358 ## Release v0.6.2 diff --git a/_includes/components/breadcrumbs.html b/_includes/components/breadcrumbs.html index 82ad6bd..5db2342 100644 --- a/_includes/components/breadcrumbs.html +++ b/_includes/components/breadcrumbs.html @@ -3,30 +3,38 @@ Depends on: page, site. Results in: HTML for the breadcrumbs component. Overwrites: - pages_list, parent_page, grandparent_page. + node, pages_list, parent_page, grandparent_page. {%- endcomment -%} {%- if page.url != "/" and page.parent -%} - {%- assign pages_list = site[page.collection] - | default: site.html_pages - | where_exp: "item", "item.title != nil" - | where_exp: "item", "item.has_children != nil" -%} + {%- assign pages_list = site[page.collection] | default: site.html_pages -%} - {%- if page.grand_parent -%} - {%- assign parent_page = pages_list - | where: "title", page.parent - | where: "parent", page.grand_parent - | first -%} - {%- assign grandparent_page = pages_list - | where: "title", page.grand_parent - | first -%} - {%- else -%} - {%- assign parent_page = pages_list - | where: "title", page.parent - | where_exp: "item", "item.parent == nil" - | first -%} - {%- endif -%} + {%- assign parent_page = nil -%} + {%- assign grandparent_page = nil -%} + + {%- for node in pages_list -%} + + {%- if node.has_children and page.grand_parent -%} + + {%- if node.title == page.parent and node.parent == page.grand_parent -%} + {%- assign parent_page = node -%} + {%- endif -%} + {%- if node.title == page.grand_parent -%} + {%- assign grandparent_page = node -%} + {%- endif -%} + {%- if parent_page and grandparent_page -%} + {%- break -%} + {%- endif -%} + + {%- elsif node.has_children and node.title == page.parent and node.parent == nil -%} + + {%- assign parent_page = node -%} + {%- break -%} + + {%- endif -%} + + {%- endfor -%}