Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PageFind Plugin (Re-PR) #2568

Draft
wants to merge 42 commits into
base: master
Choose a base branch
from

Conversation

gerteck
Copy link
Contributor

@gerteck gerteck commented Aug 12, 2024

What is the purpose of this pull request?

  • Documentation update
  • Bug fix
  • Feature addition or enhancement
  • Code maintenance
  • DevOps
  • Improve developer experience
  • Others, please explain:

Overview of changes:

This PR introduces the PageFind plugin to the project, enabling full-text search capabilities for static sites.

This PR builds on #2477

See PageFind

Anything you'd like to highlight/discuss:

In brief, PageFind plugin indexes all files during the build process and generates the necessary search data. This data is then bundled into static assets that are served alongside the site. The assets are saved directly into the output directory (/_site/pagefind), and the plugin script is designed to load these assets dynamically.

  • Currently facing difficulties trying to access the generated pagefind assets within the plugin script, not sure how to do so, investigating. Current workaround to showcase an MVP is to directly save and load these assets into MarkBind first, but not a practical solution.
  • Using PageFind's default UI, which doesn't seem to fit into the theme of MarkBind.
  • Am currently conflicted on how to proceed, whether to create a new custom Vue component.

Will continue to update this when I make progress.

Additional Tasks:

  • Update Documentation
  • Update Testing

Testing instructions:

  1. Add pagefind plugin into site.json
...
"plugins": [
  "pagefind"
]
  1. In any page, add the searchbar component: <searchbar pagefind></searchbar>

Proposed commit message: (wrap lines at 72 characters)

Add PageFind Plugin


Checklist: ☑️

  • Updated the documentation for feature additions and enhancements
  • Added tests for bug fixes or features
  • Linked all related issues
  • No unrelated changes

Reviewer checklist:

Indicate the SEMVER impact of the PR:

  • Major (when you make incompatible API changes)
  • Minor (when you add functionality in a backward compatible manner)
  • Patch (when you make backward compatible bug fixes)

At the end of the review, please label the PR with the appropriate label: r.Major, r.Minor, r.Patch.

Breaking change release note preparation (if applicable):

  • To be included in the release note for any feature that is made obsolete/breaking

Give a brief explanation note about:

  • what was the old feature that was made obsolete
  • any replacement feature (if any), and
  • how the author should modify his website to migrate from the old feature to the replacement feature (if possible).

jingting1412 and others added 30 commits March 27, 2024 00:42
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.

3 participants