Search
Contents
OnyxFolio provides full-text search at /search. Search is server-side — no index file or JavaScript search library needed.
Enabling search
Add show_search: true to the root homepage's frontmatter to add a Search link to the top navigation:
---
website: true
type: homepage
show_search: true
---
Without this flag, /search still works — it just isn't linked in the nav.
How to search
Navigate to /search and enter a query. Results update on form submission.
URL parameters:
| Parameter | Description |
|---|---|
q |
Text query string |
tag |
Tag filter (exact match, case-insensitive) |
Example: /search?q=python&tag=tutorial
What is searched
The search checks two fields per post:
- Title — case-insensitive substring match
- Content — the full rendered post text (HTML tags stripped, lowercased)
A post matches if the query appears in either field.
Tag filter
The search page shows a dropdown of all tags across published posts. Selecting a tag narrows results to posts with that tag in addition to the text query. Both filters apply simultaneously.
The tag list is pre-computed at vault load time from all published posts.
Query highlighting
Matched query terms are highlighted in the result list:
- Title — matched terms wrapped in
<mark>tags - Summary — matched terms wrapped in
<mark>tags
Search scope
Search covers only published posts (website: true). Private notes, homepage files, and listing files are excluded.
See also
- Tags — tag archive pages and the
/tagsindex - Frontmatter Reference —
show_searchfield