Plainly is a deliberately simple static site builder CLI (written in Python) that lets you use templates to reuse common HTML. It handles the basics: rendering templates, building pages, and copying static files, all while staying out of the way.
Plainly isn't intended to replace heavyweight SSGs like Hugo or Jekyll. It's for simple sites where you want reusable templates without the additional complexity and features of a full-featured static site generator.
Install plainly with pip
pip install git+https://github.com/bcostantino/plainly.gitTo build a site from directory ./src to directory ./dist.
plainlyA more complex example: To build a site from directory ./site to directory ./out, in verbose mode, clearing output directory for each build and running the development server with automatic reload if changes are detected inside source directory.
plainly ./site -v --clean --run -o ./outThe following command line arguments are available to configure the functionality of the static site builder.
-h, --help show this help message and exit
--version print version and exit
-v, --verbose print verbose output logs
-o OUTPUT, --output OUTPUT
set build output directory (default: dist)
-c, --clean if set, delete files from output directory before building
--run if set, run basic http development server and change reloader thread
--sitemap-base SITEMAP_BASE
set base url for generated sitemap
--rss RSS_FEED_URL set url to download RSS feed
Shown below is the project structure that plainly works with.
my-project/
└── src/
├── pages/
│ ├── index.html
│ └── about.html
├── templates/
│ ├── contact-form.html
│ └── base.html
└── static/
├── css/
├── js/
└── img/
Inside of the source directory are three directories:
pages- The main content of the website. Each file will be replicated in the output directory.templates- Reusable HTML files (e.g., layouts, widgets, forms, etc.) that can be extended or embedded within pages.static- Static files (i.e., CSS, JavaScript, images, etc.) referenced within the pages or templates.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.