Anchor to search result

Hi @dimitreliasb,

The solution you’re looking for will indeed rely on javascript.

The buil-in search engine returns, along with each search result, the snippet of text best corresponding to the search input. (cf. documentation).

You could imagine adding the snippet as a query parameter on each of your search results.
And then have a javascript function running on page load that will do a search for the queried content, add an anchor and scroll automatically.

There’s quite a bit of work, and on both pages (search results AND your regular page templates), but it is definitely doable.

Hope this helps,

Ludwig