smark
is the tool to serve markdown as the API server.
This tool provides API to get markdown documents from files based on tantivy (A full-text search engine in Rust) and lindera (A morphological analysis library in Rust).
Please see API Documetation for more details. smark
also provides openapi schema.
You can use release binary from release page.
You can make template markdown with required frontmatters by template
subcommand.
```bash smark template
```
You need to prepare index to register your markdown posts. Please specify input markdown direcotry and output index direcotry.
smark
detect posts/**/*.md
files.
bash
smark prep --index-dir index --input posts
You completed all steps! Let's run server!
bash
smark run --index-dir index --static-dir images
You can use cross to build.
bash
git clone https://github.com/illumination-k/smark.git
cross build --target x86_64-unknown-linux-musl --release
chmod 777 target/x86_64-unknown-linux-musl/release/smark