Meta Tag
The meta tag is way to pass instructions to the crawler on per page basis.
It is a script
tag with "findkit"
id and type of application/json
:
<script id="findkit" type="application/json">
{
"title": "Page title",
"tags": ["custom-tag1", "custom-tag2"]
}
</script>
The tag should be placed inside the <head>
tag.
You must sanitize the strings in the JSON if it comes from an untrusted souce. See this.
If you are using WordPress you should use our WordPress Plugin to generate this tag.
Fields
title: string
The crawler reads the title from the <title>
tag but this field can used
provide different title.
titleSelector: string
Title can be selected with passed CSS selector.
titleSelectorRegex: string
Title can cleaned up with with a regex. The first caputre group will be used as the title.
Example
<script id="findkit" type="application/json">
{
"title": "Page Title - Unwanted",
"titleSelectorRegex": "(.+) -.*"
}
</script>
will pick Page Title
as the title.
contentSelector: string
Use custom CSS selector to select the content on this page. This will be
combined with the content_selector
TOML
option.
tags: string[]
List of additional tags to index the page with.
showInSearch: boolean
When set to false the crawler won't index the page.
created: string
Page creation date as ISO 8601 string
modified: string
Page modification date as ISO 8601 string
superwords: string[]
Add "superwords" to the indexed document. When a search keyword matches a superword the matching search result score will get a boost that will be always bigger than normal results. This can be used to implement "Pinned Results" that are always shown before other results. Superwords are not included in search highlights.
customFields: object
Add custom fields to the indexed document which will be returned within the search results. See Custom Fields in Slot Overrides.
Following types are available:
keyword
: Plain stringnumber
: A numberdate
: ISO 8601 formated date string
In TypeScript terms the customFields
format is
type CustomFields = {
[customField: string]:
| { type: "date"; value: string }
| { type: "keyword"; value: string }
| { type: "number"; value: number };
};
Example
<script id="findkit" type="application/json">
{
"customFields": {
"thumbnail": {
"type": "keyword",
"value": "https://example.com/image.jpg"
},
"price": {
"type": "number",
"value": 10
},
"eventStarts": {
"type": "date",
"value": "2022-10-03T12:18:52.233Z"
}
}
}
</script>