Crates.io | glessite |
lib.rs | glessite |
version | 0.2.1 |
source | src |
created_at | 2023-02-07 21:01:04.915784 |
updated_at | 2023-02-07 21:18:35.754282 |
description | A simple static site generator based on a git repository commits. |
homepage | https://github.com/Lozul/glessite |
repository | https://github.com/Lozul/glessite |
max_upload_size | |
id | 779108 |
size | 57,298 |
A simple static site generator based on commits from a git repository.
The program expect to be launched within a git repository.
If so, it will walk through the commit history and pick those whose title are
prefixed by POST:
.
For every "post" found, an entry will be added to the index page, and a simple
HTML page will be generated using the title and the body (if present) of the
commit.
All the generated files will be stored in a public
folder in the current
working directory.
Glessite offers some options:
-r, --repository <REPOSITORY> Repository to use, default to current working dir, must be a valid path to a directory containing a .git
-o, --output-dir <OUTPUT_DIR> Output directory, default to `public`
-p, --prefix <PREFIX> Prefix to filter posts from normal commits, detault to `POST: `
-n, --no-prefix If present, every commit will be used, prefix option is ignored
# Inside a git repository
git commit --allow-empty -m "POST: Title" -m "Body of the post"
glessite
firefox public/index.html
# or
python -m http.server --directory public
cargo
commandcargo install glessite
git clone https://github.com/Lozul/glessite
cd glessite
cargo build --release
cargo install --path .
cargo uninstall glessite
This projet is under the MIT License.
The logo use the font Source Code Pro released under the SIL Open Font License 1.1.
Glessite is a type of natural resin, found it on this page. The name started with G like Git and ended with site, which fitted with the project being a site generator.