Skip to content

ENV-363 : Add Pagefind search functionality to documentation#687

Open
Eklinden wants to merge 4 commits into
masterfrom
ENV-363-Lagg-till-sok-i-dokumentationen
Open

ENV-363 : Add Pagefind search functionality to documentation#687
Eklinden wants to merge 4 commits into
masterfrom
ENV-363-Lagg-till-sok-i-dokumentationen

Conversation

@Eklinden

Copy link
Copy Markdown

No description provided.

@Eklinden Eklinden requested a review from henrikekelof June 15, 2026 13:16
- Run prettier --write on init-search.js, Header.astro, Themepicker.astro
- Add static/pagefind to .prettierignore and eslint.config.mjs ignores
  to prevent linting generated third-party pagefind output files

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds Pagefind-powered search to the Astro documentation site, wiring in the Pagefind UI components, styling, and build-time index generation so the published docs can be searched.

Changes:

  • Add Pagefind dependency and generate a search index during envision-docs build.
  • Introduce Pagefind UI (modal + triggers) into the docs header/layout and style it via new SCSS.
  • Adjust theme picker + mobile nav scripts/markup to support the updated header layout.

Reviewed changes

Copilot reviewed 13 out of 15 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
yarn.lock Adds pagefind@^1.5.2 and platform-specific optional binaries to the lockfile.
packages/envision-docs/package.json Runs Pagefind after Astro build and copies generated assets for serving; adds pagefind devDependency.
packages/envision-docs/src/templates/master/Master.astro Loads Pagefind UI assets, adds modal, and marks main content for indexing.
packages/envision-docs/src/templates/components/Header.astro Adds search triggers and adjusts header actions/mobile header layout.
packages/envision-docs/src/templates/components/Themepicker.astro Updates checkbox class usage for multi-instance theme pickers.
packages/envision-docs/src/assets/scripts/theme-picker.js Updates theme script to synchronize multiple theme checkboxes.
packages/envision-docs/src/assets/scripts/mobile-nav.js Updates selector to match the renamed mobile nav open button class.
packages/envision-docs/src/assets/scripts/init-search.js Adds behavior to close the Pagefind modal on navigation/result selection.
packages/envision-docs/src/assets/scss/docs.scss Includes new Pagefind SCSS partial.
packages/envision-docs/src/assets/scss/_pagefind.scss Adds Pagefind modal/UI overrides.
packages/envision-docs/src/assets/scss/_header.scss Styles new header actions and Pagefind trigger(s).
packages/envision-docs/src/assets/scss/_base.scss Defines Pagefind CSS variables for light/dark themes.
eslint.config.mjs Ignores generated static/pagefind content for linting.
.prettierignore Ignores generated packages/envision-docs/static/pagefind.
.gitignore Ignores generated packages/envision-docs/static/pagefind.

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

Comment thread packages/envision-docs/src/templates/components/Themepicker.astro Outdated
Comment thread packages/envision-docs/src/templates/master/Master.astro
Comment thread packages/envision-docs/src/templates/master/Master.astro
Comment thread packages/envision-docs/src/templates/master/Master.astro
Comment thread packages/envision-docs/package.json Outdated
Comment thread packages/envision-docs/src/templates/components/Header.astro
Comment thread packages/envision-docs/src/templates/components/Header.astro

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

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

Comment thread packages/envision-docs/src/assets/scripts/init-search.js
Comment thread packages/envision-docs/src/templates/master/Master.astro
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.

2 participants