Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

plainly

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.

Installation

Install plainly with pip

pip install git+https://github.com/bcostantino/plainly.git

Usage

To build a site from directory ./src to directory ./dist.

plainly

A 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 ./out

Command Line Options

The 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

Project Structure

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.

Contributing

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.

License

MIT

About

Build plainly simple static sites with Jinja2 templates

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages