Skip to content

Implement incremental Pagefind indexing for markbind serve #2873

@MoshiMoshiMochi

Description

@MoshiMoshiMochi

Please confirm that you have searched existing issues in the repo

Yes, I have searched the existing issues

Any related issues?

#205

What is the area that this feature belongs to?

No response

Is your feature request related to a problem? Please describe.

The Pagefind index is currently only generated during a full site build (e.g., markbind build). During markbind serve:

  1. No Index Updates: When pages are modified during development, the search index is not updated.
  2. Requires Full Restart: Users must either restart the server (markbind serve) or run a full rebuild to refresh the search index.
  3. Stale Search Results: Developers editing content see stale search results until they restart the development server.

As such, using the pagefind feature when updating a site's content can takes a notable more amount of time as they have to rebuild the site each time in order to check if their update page has been indexed correctly.

Describe the solution you'd like

Implement incremental Pagefind indexing that integrates with the existing hot-reload mechanism in markbind serve.

The solution should:

  1. Add incremental index updates: When a page is modified/added, update only that page's entry in the index rather than rebuilding the entire index.
  2. Remove stale entries: When a page is deleted, remove its entry from the index.

Describe alternatives you've considered

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions