Previously, scrollToSearchTerm always scrolled to the first DOM occurrence
of the search term. Now it checks headings first, then body text, so
navigating from a search result that matched a heading correctly scrolls
to that heading instead of an earlier body occurrence.
Title and content use innerHTML with a whitelist that only allows <span>
tags (used by the highlight function). All other HTML is stripped.
Tags use pre-escaped content from highlightTags with trusted structural markup.
Subscribe to the content-index-updated CustomEvent and incrementally add
newly-patched entries to the FlexSearch index. The existing indexInitialized
memoization is preserved -- no full rebuild, just additive inserts via
index.addAsync(), plus updates to idDataMap, contentData, and allTags.
This enables runtime extension of the search index by other plugins. The
primary consumer is @quartz-community/encrypted-pages, which patches the
resolved fetchData object with decrypted entries from its shadow content
index and dispatches content-index-updated so users can find and open
decrypted pages via search within the same browser session.
Non-fatal: the listener swallows errors from the in-place fetchData read
and continues with whatever content-index data was loaded originally.
- Set sidebar z-index to auto when search opens to break stacking context
that trapped the fixed search modal behind page content
- Rewrite scroll-to-search-term to search textContent of block-level
elements and walk text nodes to build cross-element Range, handling
terms that span multiple inline elements
Store search term in sessionStorage when clicking a result, then on
page load find the first matching text, highlight it with a fade-out
animation, and scroll it into view.
- Fix highlight() trim bug: slice tokenized text array, correct window math
- Fix memory leak: use event delegation instead of per-element listeners
- Fix XSS: escape content with escapeHTML before innerHTML insertion
- Add multi-tag search (#tag1 #tag2 query) with AND filtering
- Add tag autocomplete dropdown with keyboard navigation
- Add inline ghost text for selected tag suggestion
- Add configurable result ordering via fieldPriority option
- Add scroll-to-highlight in preview panel
- Add ARIA attributes (listbox, option, aria-expanded, aria-label)
- Add error handling in fetchContent (try/catch, !res.ok check)
- Add 150ms debounce on preview updates
- Add index initialization guard for tag dropdown
- Use parallel index filling (Promise.all)
- Remove debug console.log statements
- Restore button refocus after hiding search
- Use CSS custom property for z-index management
- Add max-height constraint for mobile results
- Update all 6 locales with ellipsis placeholder and tag search strings
- Export SearchField type
Use resolveBasePath() from @quartz-community/utils/path to prepend the
base path when navigating via search results. Fixes links resolving to
the domain root instead of the subdirectory.
Plugins run server-side during the Quartz build step, not in the
browser. Setting platform: 'node' tells esbuild to treat Node builtins
as available externals and avoids CJS-in-ESM require() failures for
any bundled dependencies that use Node APIs.
Move non-allowlisted packages from dependencies/peerDependencies to
devDependencies so tsup bundles them into dist/ instead of leaving
them as external imports that may not resolve at runtime.
- Update types/globals.d.ts with centralized type declarations
- Use fetchData global instead of hardcoded /static/contentIndex.json
- Revert @quartz-community/types from file:../types to github:quartz-community/types
- Add .prettierignore, update .eslintrc.json with triple-slash-reference override
- Remove duplicate scripts.d.ts/styles.d.ts
flexsearch is imported by the inline script and bundled by esbuild at
build time. github-slugger and hast-util-to-jsx-runtime are transitive
dependencies of @quartz-community/utils needed by the inline script
bundler. Without these as devDependencies, the tsup build fails to
resolve imports and only emits .d.ts files (no .js output).
Pre-built output is now committed to the repository so that
Quartz can skip the build step during plugin installation.
The prepare script is removed to prevent redundant builds
when installing from npm/git.
tsup and typescript are only needed at build time — move to devDependencies
so they can be pruned after build. Dependencies already available from the
host Quartz installation are moved to peerDependencies to avoid duplication.