New feature: Indexing Fragment Pages

,

Yet another feature release day! This time, we are introducing a feature called “Fragment Pages” which allows creation of multiple search results from a single page.

The fragment is essentially a piece of an HTML document. It also refers to the part of the URL after the hash (#). Every Fragment Page indexed to Findkit will always have the fragment in the URL. The page where the fragment was extracted from should also have an element with an id-attribute with a matching value. This allows browsers to automatically scroll to the fragment on when the search result is clicked. For example, check out this link to our pricing:

https://www.findkit.com/#pricing

It links to the front page but since it contains the pricing fragment and because the front-page has an element with id="pricing" the browser automatically scrolls to it.

Let’s take a look at some use cases for Fragment Pages:

Landing Pages

Landing pages such as ours often have distinct sections that make sense to appear directly in the search results. Having findkit.com/ in the search results is not very useful but findkit.com/#pricing and findkit.com/#features are.

Staff Directory Pages

A common request we receive is staff listings that are implemented as a single page but they want each employee to appear in the search results when their name is searched for. Fragments can also have custom fields so it is possible to display the employee title, email etc. directly on the search results when needed!

Long Documentation Pages

This is the most important use case for us and our customers at Findkit. Our documentation site has a bunch of pages with long lists of options, methods, properties etc. It is very convenient to have direct links to the options when they are searched. Otherwise users would have to use in-page search (ctrl-f / cmd-f) on the page after finding it on the site search to get the correct scroll position!

Powered by Findkit Workers

Since there are basically unlimited ways to generate the fragment pages we provide this feature using Findkit Workers. This means customers can have full control how the fragments are generated using the JavaScript DOM API. Check out the documentation to get started:

https://docs.findkit.com/workers/fragments

Ensure you have the latest Findkit CLI installed when working with the new feature.