Skip to content

Fix broken themes link and make reference parameters searchable#9

Merged
OrangeX4 merged 2 commits intomainfrom
copilot/fix-broken-links-themes
Mar 9, 2026
Merged

Fix broken themes link and make reference parameters searchable#9
OrangeX4 merged 2 commits intomainfrom
copilot/fix-broken-links-themes

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 9, 2026

Two issues: the Themes page linked to a non-existent /docs/build-your-own-theme, and searching for hyphenated parameter names like horizontal-line-to-pagebreak returned completely unrelated results instead of navigating to the correct anchor.

Broken link (src/pages/themes.js)

/docs/build-your-own-theme/docs/tutorials/build-your-own-theme, matching the actual path from the touying submodule (docs/en/tutorials/build-your-own-theme.md).

Parameters not searchable (scripts/generate-docs.py)

docusaurus-lunr-search only creates individually-addressable search entries for h2/h3 headings. Parameters were generated as h4, so they were indexed as undifferentiated body text — Lunr would tokenize horizontal-line-to-pagebreak into ["horizontal", "line", "to", "pagebreak"] and return noise matches.

Changed parameter headings from #### to ###:

- f"#### {display_name}{type_part}{default_part} {{#{anchor_id}}}"
+ f"### {display_name}{type_part}{default_part} {{#{anchor_id}}}"

Each parameter is now a separate indexed section pointing to e.g. /docs/reference/configs/config-common#horizontal-line-to-pagebreak. Parameters also appear in the right-side TOC, enabling direct in-page navigation.


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

…3 headings

Co-authored-by: OrangeX4 <34951714+OrangeX4@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix broken links for themes documentation Fix broken themes link and make reference parameters searchable Mar 9, 2026
@OrangeX4 OrangeX4 marked this pull request as ready for review March 9, 2026 15:00
Copilot AI review requested due to automatic review settings March 9, 2026 15:00
@OrangeX4 OrangeX4 merged commit 5640875 into main Mar 9, 2026
2 checks passed
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 9, 2026

PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-03-09 15:01 UTC

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes two documentation UX issues in the Docusaurus site: a broken “build your own” link on the Themes page and poor search/navigation for hyphenated reference parameter names by making each parameter a searchable heading.

Changes:

  • Update the Themes page link to point at the correct tutorial route.
  • Generate parameter sections as ### headings (instead of ####) so they become individually indexable/searchable entries and appear in the page TOC.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/pages/themes.js Fixes the Themes page “build your own” docs link to the correct tutorial path.
scripts/generate-docs.py Promotes generated parameter headings to H3 so search/TOC can target each parameter anchor directly.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants