Bhook
Bhook is a static website generator that works off a git repo containing a markdown file based wiki, like for example, the India Startup Wiki.
Since you control the source markdown, Bhook applies no restrictions on what you can put in there. Wanna embed a YouTube video in an iframe
? Sure thing!
I use this to create HTML versions of the wiki and of my essays that I can publish.
Installation
bhook
requires ruby
. If you are on OSX or Linux, it is likely to already be installed.
To install bhook
run:
$ gem install bhook
Usage
Getting help:
$ bhook --help
Bhook version 0.3.0
Usage: bhook --source /source/path --output /output/path
-s, --source=SOURCE Path to version controlled directory containing source md files
-o, --output=OUTPUT Path to directory where output files are to be generated
-w, --watch Continuously watch the source directory for changes and generate output
-v, --verbose Print detailed information about files as they are processed
-t, --theme=PATH Path to directory containing theme files to use when generating html
--generate-theme=PATH Generate a baseline theme that you can then modify to your needs
--benchmark Run a performance benchmark for the specified source
-h, --help Prints this help
1-to-1 mode
➜ essays git:(main) ✗ bhook -s . -o /tmp/out -t /tmp/out/theme -w -v
Here's an example .bhook.yml
config file for a source directory.
n-to-1 mode
This requires the destination directory to have a .bhook.yml
config file set up that describes all the sources.
➜ kaiwren.github.com git:(main) ✗ bhook -w -v
Here's an example .bhook.yml
config file for a destination directory
with multiple source directories.
Development
git clone --recursive [email protected]:kaiwren/bhook.git
- After checking out the repo, run
bundle install
to install dependencies. - Then, run
bundle exec rake
to run the specs and sorbet typechecking.
Contributing
Bug reports and pull requests are welcome on Gitlab at https://gitlab.com/kaiwren/bhook.
License
The gem is available as open source under the terms of the MIT License.