KO
|
EN
gitlite — search
Search
#react
#nodejs
#hacktoberfest
#cli
#golang
#csharp
#github-actions
#javascript
#flask
#python
#docker
#typescript
caddy-search
★ 36
Open GitHub ↗
search middleware for Caddy
Download README (.md)
Explore Similar Repositories
as3shebang
:
as3shebang – The ActionScript 3.0 Interpreter
J2EE_practice
:
J2EE 学生信息管理系统初(jian)级(lou)版。by-lyf
ThinkPHPSQL0day
:
ThinkPHP3.0~3.3 betweenSQL注入的sqlmap Tamper!
FSVoiceBubble
:
A light-weight chatting voice bubble
RakNet-C-Sharp-binding-project
:
No description available.
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
caddy-search
?
Download (.md)
# search Middleware for [Caddy](https://caddyserver.com). **search** indexes your static and/or dynamic documents then serves a HTTP search endpoint. ### Syntax ``` search [directory|regexp] [endpoint "search/"] ``` * **directory** is the path, relative to site root, to a directory (static content) * **regexp** is the URL [regular expression] of documents that must be indexed (static and dynamic content) * **endpoint** is the path, relative to site's root url, of the search endpoint For more options, use the following syntax: ``` search { engine (default: bleve) datadir (default: /tmp/caddyIndex) endpoint (default: /search) template (default: nil) expire (default: 60) +path regexp -path regexp } ``` * **engine** is the engine for indexing and searching * **datadir** is the absolute path to where the indexer should store all data * **template** is the path to the search's HTML result's template * **expire** is the duration (in seconds) until a indexed document validation expires (should be updated) * **+path** include a path to be indexed (can be added multiple times) * **-path** exclude a path from being index (can be added multiple times) Each property in the block is optional. ### Supported Engines * [BleveSearch](http://github.com/blevesearch/bleve) ### Examples Index every static content in root folder (single line configuration) ``` search / ``` Index every content (single line configuration) ``` search ^/ ``` Indexing every dynamic content with a different endpoint (single line configuration) ``` search /(.*) /mySearch ``` Ignoring specific type of file ``` search { -path \.pdf$ } ``` Multiple static and dynamic paths ``` search ^/blog/ { +path /static/docs/ -path ^/blog/admin/ -path robots.txt } ``` Different directory for storing the index ``` search { datadir /tmp/index } ```