Crates.io | nib-cli |
lib.rs | nib-cli |
version | 0.0.3 |
source | src |
created_at | 2020-05-24 19:33:21.772497 |
updated_at | 2021-06-23 17:44:04.503814 |
description | A cli for a yet another static site generator Nib |
homepage | https://gitlab.com/grauwoelfchen/nib |
repository | https://gitlab.com/grauwoelfchen/nib |
max_upload_size | |
id | 245336 |
size | 35,162 |
nib-cli
is a command line utility to a yet another static site generator Nib.
% cargo install nib-cli
# e.g.
% cat config.toml
[website]
title = "An awesome blog"
description = """
"""
lang = "en" # language_code
url = "http://127.0.0.1:3000"
# the top most directory (e.g. blog) will be omitted in url
include = [
"blog/**/*.rst"
]
license = "CC-BY-NC-SA-4.0"
# this or [[website.metadata.authors]] either is required
# authors = [
# "Yasuhiro Яша Asaka <yasuhiro.asaka@grauwoelfchen.net>",
# ]
[build]
target-dir = "dst"
[[website.metadata.authors]]
name = "Yasuhiro Яша Asaka"
nick = "grauwoelfchen"
bio = """
A Programmer. I'm hacking on Gentoo/Funtoo Linux. I love greens and vegetables.
"""
email = "yasuhiro.asaka@grauwoelfchen.net"
avatar = "https://www.gravatar.com/avatar/...?s=40"
% cat blog/post/article.rst
.. title:: Nice foo
.. lang:: en # optional
.. date:: 2018-01-31 12:04:00 UTC
.. description:: This is an article about nice foo. # optional
.. slug:: foo.html # optional (default filename as is)
Foo is nice! # above blank line before content is required
Put your articles under a directory which is contained in include
section in
config file.
# e.g. blog
% tree blog
blog
├── post
│ └── article.rst
└── hello-word.rst
And then generate HTML files into a directory specified with target-dir
.
% nib
The output result looks like this:
% tree dst
dst
├── css
│ └── index.css
├── hello-world.html
├── img
├── index.html
├── js
└── post
└── foo.html
See nib-server
.
Apache-2.0
See LICENSE