Optional leftpane

Avatar

Tutorial

Custom search behavior

Custom search behavior

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


Avatar

ItsZariep

Cool DuckriptionšŸ¦†ļø

About me

Comment section will be here

See _includes/comments.html


© 2025 Tessera

© Powered by Tessera for Jekyll