Crates.io | smark |
lib.rs | smark |
version | 0.1.9 |
source | src |
created_at | 2022-04-09 06:20:47.089658 |
updated_at | 2022-04-17 07:41:45.958725 |
description | The tool provides API to get markdown documents from files |
homepage | |
repository | |
max_upload_size | |
id | 564656 |
size | 289,311 |
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 or cargo install smark
You can make template markdown with required frontmatters by template
subcommand.
smark template
# ---
# uuid: db71b71a-c7f2-47c4-ab87-81bd1bb6d58a
# title: ""
# description: ""
# lang: ja
# category: ""
# ---
You need to prepare index to register your markdown posts. Please specify input markdown direcotry and output index direcotry.
smark
detect posts/**/*.md
files.
smark prep --index-dir index --input posts
You completed all steps! Let's run server!
smark run --index-dir index --static-dir images
You can use cross to build.
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