Custom search behavior
16/05/2025

Welcome! This guide explains how to change search behavior for matching results
Tessera uses the file /search.json
:
---
layout: null
---
[
{% for post in site.posts %}
{
"title": "{{ post.title | escape }}",
"url": "{{ site.baseurl }}{{ post.url }}",
"content": "{{ post.content | strip_html | strip_newlines | escape }}",
"tags": "{{ post.tags }}"
}{% unless forloop.last %},{% endunless %}
{% endfor %}
]
Search looks for title, content and tags, for exaple, if you want to exclude content, you can set
"content": "",
or if you want to set another Jekyll variable, you can do:
"content": " ",
Internal behavior
If you have JavaScript knowledge, you can put your modified version of search logic in your siteās /assets/js/search.js
