Search ships ready to use. GoMark builds an index from your content and exposes it over HTTP — no external service, no setup, just a query away.
Endpoint#
GET /api/search
Query parameters#
q: search querylimit: optional result limit, default8, capped at25
Example request#
terminal
curl "http://localhost:8080/api/search?q=render&limit=5"Example response#
response.json
{
"query": "render",
"results": [
{
"title": "Configuration",
"path": "/guides/configuration",
"snippet": "...Configure GoMark with Site options, environment-driven behavior, and feature toggles..."
}
]
}Notes#
- Empty queries return an empty result set
- The index is built from your markdown content
- In
PreRendermode, the index is built once at startup