Skip to content

Conversation

@3w36zj6
Copy link
Member

@3w36zj6 3w36zj6 commented May 24, 2025

close https://github.com/typst-jp/typst-jp.github.io/issues/142

確認事項

  • SP, PCサイズの画面で検索機能が利用できる

@3w36zj6 3w36zj6 changed the title chore(deps): 依存関係にpagefindを追加 feat: Webサイトに全文検索を実装 May 24, 2025
@3w36zj6 3w36zj6 requested a review from Copilot May 24, 2025 16:05
Copy link
Contributor

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

This PR implements a full-text search feature on the website through pagefind integration.

  • Adds a new SearchWindow component and exports it through the common UI index.
  • Integrates search functionality into both the Header and BaseTemplate for a consistent search modal.
  • Updates build scripts and documentation to generate the search index using pagefind.

Reviewed Changes

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

Show a summary per file
File Description
website/src/components/ui/common/index.ts Exports the new SearchWindow component.
website/src/components/ui/common/SearchWindow.tsx Implements the search window with pagefind integration.
website/src/components/ui/common/Header.tsx Adds search buttons with the new SearchIcon.
website/src/components/templates/BaseTemplate.tsx Integrates searchOpen state and modal rendering for SearchWindow.
website/src/components/icons/index.ts Exports the new SearchIcon component.
website/src/components/icons/SearchIcon.tsx Implements the search icon component.
website/package.json Updates build commands and adds the pagefind dependency.
website/README.md Documents instructions for full-text search testing.

@3w36zj6 3w36zj6 force-pushed the feature/implement-full-text-search branch from c492153 to 6802317 Compare May 24, 2025 16:07
@3w36zj6 3w36zj6 marked this pull request as ready for review May 24, 2025 16:12
Copy link
Member

@kimushun1101 kimushun1101 left a comment

Choose a reason for hiding this comment

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

SP、PCで検索機能を確認できました。

export VITE_LISTEN_ALL_ADDRESSES=true
mise run generate
# mise run dev # READMEにあるようにこれでは検索機能は使えない
mise run preview

確認ですが、ひとまずこのPRでは以下の状態でよろしいでしょうか?
私としては困っていないため大丈夫です。

  • bun run devで動かせない。
  • bun run buildで以下のメッセージがでています。
    Note: Pagefind doesn't support stemming for the language ja. 
    Search will still work, but will not match across root words.
    

Copy link
Contributor

@gomazarashi gomazarashi left a comment

Choose a reason for hiding this comment

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

検索機能が問題なく利用できることを確認しました。

@3w36zj6
Copy link
Member Author

3w36zj6 commented May 25, 2025

Note: Pagefind doesn't support stemming for the language ja.
Search will still work, but will not match across root words.

こちらの詳細はドキュメントのMultilingual searchに書かれています。

https://pagefind.app/docs/multilingual/#language-support

@3w36zj6 3w36zj6 merged commit 36c2418 into main May 25, 2025
3 checks passed
@3w36zj6 3w36zj6 deleted the feature/implement-full-text-search branch May 25, 2025 09:29
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.

Webサイトに全文検索を実装する

4 participants