Homepage

Search by Content

Last edit: Jul 14, 2023

You can search for a page based on its content. For example, this might be helpful for creating search for the FAQ page.
Search will work on the rendered page version, so this page can't rely on any dynamic data, ie. current_user or URL params.

Page needs to be marked as searchable: true:

---
...
searchable: true
---
...

Search query:

query search_page(
  $value: String
) {
  pages: pages(
    filter: {
      content: {
        contains: $value
      }
    }
  ) {
    total_entries
    results {
      slug
      content
    }
  }
}

Questions?

We are always happy to help with any questions you may have.

contact us