1 unstable release
0.1.0 | Dec 11, 2023 |
---|
#636 in Template engine
15KB
315 lines
MiniPub
Publish static sites using MiniPub. It uses Jinja templates, has built-in web server for development and renders Markdown. Publishes sites using rsync. All written in Rust.
Setup
cargo install minipub
mkdir example
cd example
minipub init
minipub serve
You can now open http://localhost:8000 in a webbrowser and see the result. Refresh the page every time you make changes.
The following directories have been created by the init
command:
- assets: to store all files which should be included without any processing, such as images, CSS, favicon etc.
- templates: contains all HTML templates. At the start it contains single basic
template names
base.html
to get you started. - content: contains all the content which should be rendered using the
templates. The hierarchy of the files in here also reflects the hierarchy of
the end result. The files should be
.html
files and should extend one of you templates.
Publish
minipub build
can be used to generate all web pages in a build
directory.
To publish your site copy the contents of this directory to the destination and
also do not forget to copy all your assets.
To do both in one go and copy the files using rsync
use minipub publish
.
Dependencies
~13–24MB
~344K SLoC