No description
| content | ||
| inc | ||
| src | ||
| static | ||
| tpl | ||
| .astylerc | ||
| Makefile | ||
| README.md | ||
rcb
Radi0dev's CookBook
A minimalist cookbook web server. Reads .md files from a specified directory, renders them to HTML, and serves them via HTTP. Features a fuzzy recipe search.
routes
| route | description |
|---|---|
/ |
main page with recipe list and search |
/p/<slug> |
recipe page (slug = filename without .md) |
/q/<запрос> |
search results |
/static/<файл> |
images from the static/ dir |
/tpl/style.css |
stylesheet from the templates directory |
recipes
The recipe is an .md file in the content/ directory. The filename becomes the page slug: borsch.md -> /p/borsch.
The first heading, # H1, is used as the recipe title in the list and page title. Images are included using standard Markdown syntax; the file is searched for in the static/ directory:

Accepted formats: jpg/jpeg, png, webp, gif, svg.
dependency installation
system packages:
# Debian/Ubuntu:
apt install libmd4c0 libmd4c-html0 libmd4c-dev libmd4c-html0-dev libasio-dev
# Fedora/RHEL/CentOS:
dnf install md4c-devel asio-devel
# Arch:
pacman -S md4c asio
header-only libraries:
# Crow:
git clone --depth=1 --branch v1.2.0 https://github.com/CrowCpp/Crow.git && cp -r Crow/include/* /usr/local/include/ && rm -rf Crow
# rapidfuzz-cpp:
git clone --depth=1 https://github.com/rapidfuzz/rapidfuzz-cpp.git && cp -r rapidfuzz-cpp/rapidfuzz /usr/local/include/ && rm -rf rapidfuzz-cpp
build
make
usage
./rcb -c <content> -s <static> [-t <templates>] [-p <port>]
| parameter | description | default |
|---|---|---|
-c / --content |
dir with .md recipes (required) |
|
-s / --static |
dir with images (required) | |
-t / -templates |
dir with html tamplates & style.css |
/usr/lib/rcb |
-p / --port |
port | 8080 |
example:
rcb -c ./content -s ./static -t ./tpl -p 8080