Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
nickvigilante committed Oct 24, 2024
1 parent e928dd8 commit 55d59fe
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/project/types/website/website-search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,14 @@ export async function updateSearchIndex(
}
});

// Remove all page elements that should be excluded from the search index
const exclusions = doc.querySelectorAll(".exclude-from-search");
for (const exclusion of exclusions) {
exclusion.remove();
}



// We always take the first child of the main region (whether that is a p or section)
// and create an index entry for the page itself (with no hash). If there is other
// 'unsectioned' content on the page, we include that as well.
Expand Down

0 comments on commit 55d59fe

Please sign in to comment.