Matchers used to tag pages.
tags field is an array field under the
targets array in the
findkit.toml file which can be used to match content to different tags.
The config looks like this
host = "example.com"
pathname_regex = "regex" # the matcher
on_match = "tag" # the tag to apply
The tag in the
on_match field will be applied when the matcher matches.
Add the tag when the css selector matches to at least one element
css = ".foo"
on_match = "foo"
When page has an element like
<div class="foo"> a
foo tag is added.
Match pathnames with the URLPattern syntax.
Not implemented yet.
Match the regex to the page's pathname.
pathname_regex = '^\/author\/'
on_match = "author"
This would add the
author tag to all pages under
Eg. on page
https://example.com/author/john-doe the regex is matched againts
Always use single quotes with
pathname_regex to avoid having to escape the backslash characters (
You can use the regex capture groups when creating the tag. Apply the group with
$1 where number corredponds with the group index starting from 1.
With input url
https://docs.findkit.com/ui/filtering and following config
# Match string starting with '/' and capture non '/' chars after that
pathname_regex = '^\/([^\\/]+)'
on_match = "$1"
ui tag will be added.