Skip to content

Commit

Permalink
Use the first section of any level (not just level 2)
Browse files Browse the repository at this point in the history
Fixes #8011
  • Loading branch information
dragonstyle committed Dec 22, 2023
1 parent 2da03b4 commit ef09563
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions news/changelog-1.4.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@
- ([#5630](https://github.com/quarto-dev/quarto-cli/issues/5630)): Properly form sharing URL for books
- ([#6708](https://github.com/quarto-dev/quarto-cli/issues/6708)): Prevent duplication of footnotes within the abstract or description within websites and books.
- ([#7206](https://github.com/quarto-dev/quarto-cli/issues/7206)): Properly enabled `issue-url` for books
- ([#8011](https://github.com/quarto-dev/quarto-cli/issues/8011)): Improve support for unsectioned chapters in search.

## Publishing

Expand Down
2 changes: 1 addition & 1 deletion src/project/types/website/website-search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ export async function updateSearchIndex(
);
if (sections.length > 0) {
const mainSelector = projectIsBook(context)
? "section.level1"
? "main > section:first-of-type"
: "main.content";

const mainEl = doc.querySelector(mainSelector);
Expand Down

0 comments on commit ef09563

Please sign in to comment.