A static site generator designed for lightweight sites
Project description
Hot Chocolate is a static site generator that uses Markdown files as input, and is designed for building very lightweight sites.
Installation
Install with pip:
$ pip install hotchocolate
Hot Chocolate requires Python 3.5 or later.
Commands
Create a site:
cocoa init
Build articles:
cocoa build
Run a preview server (requires Docker):
cocoa serve
Site structure
Each Markdown file starts with YAML-like front matter, followed by content:
title: The cacao bean
slug: /cacao-beans/
The *cacao bean* is the seed of the cacao tree, and is used to make
cocoa solids and cocoa butter. This is the basis of chocolate, among
other foods.
You can read more about cacao [on Wikipedia][wiki].
[wiki]: https://en.wikipedia.org/wiki/Cocoa_bean
For posts, the slug will be prepended with a /YYYY/MM slug when built. For pages, the slug is relative to the root of the web server.
The following directory structure is used (and generated by cocoa init):
(source folder)/ pages/ (you can organise this folder however you like) about.md contact.md ... posts/ (likewise, you can organise this however you like) (Hot Chocolate will find any Markdown files in the tree) an-interesting-story.md another-interesting-story.md the-final-part-of-the-story.md ... static/ (this directory structure is copied directly into the build root) aztec-sculpture.jpg cacao-beans.png personal/ contact-photo.tiff ... style/ (a custom.scss file in this directory will override the base styles) custom.scss templates/ (templates in this directory replace the base templates) base.html ...
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
hotchocolate-2.0.2.tar.gz
(18.4 kB
view hashes)
Built Distributions
Close
Hashes for hotchocolate-2.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39901ddfe2b76499d249dd0852020be679e88360e593f98ef12a85726bcfb8ad |
|
MD5 | 74b61c72f3d0722d49d02d9e9be24c54 |
|
BLAKE2b-256 | 3847480c449daf82fa9af904b49ccc5f705684b2e3bc1d2a77ff4d44e604e3be |
Close
Hashes for hotchocolate-2.0.2-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0faf84f7559583a1c894629af6d6bd79a3f57b4393a3fefb6656750a282e986 |
|
MD5 | c6a5e8d7b888ae05aa0e58e5f0706af6 |
|
BLAKE2b-256 | 81fa0c6c6d219ef8537e4c1ddf85996c8e2fd43cccee0b1ac947253c088a854f |