smark

Crates.iosmark
lib.rssmark
version0.1.9
sourcesrc
created_at2022-04-09 06:20:47.089658
updated_at2022-04-17 07:41:45.958725
descriptionThe tool provides API to get markdown documents from files
homepage
repository
max_upload_size
id564656
size289,311
(illumination-k)

documentation

README

smark

codecov API Documetation

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.

Install

You can use release binary from release page or cargo install smark

Prepare Posts

You can make template markdown with required frontmatters by template subcommand.

smark template

# ---
# uuid: db71b71a-c7f2-47c4-ab87-81bd1bb6d58a
# title: ""
# description: ""
# lang: ja
# category: ""
# ---

Prepare index

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

Run server

You completed all steps! Let's run server!

smark run --index-dir index --static-dir images

From source

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
Commit count: 0

cargo fmt