An opinionated simple static site generator
Project description
corvid
corvid is an opinionated simple static site generator.
It processes Markdown files, static assets and directories producing a 1:1 heiarchy of compiled content.
It includes a reloadable local development server, supports custom markdown frontmatter and Jinja templates.
Installation
$ pip install corvid
Running
By default corvid expects to be run in a directory with an input
directory. With no parameters, corvid will process all files in this directory into the output
directory, and exit.
$ corvid --help
Usage: corvid [OPTIONS]
Options:
-l, --listen Enable live reloading
-b, --bind TEXT Host to bind to
-p, --port INTEGER Port to run on
-i, --input TEXT Input directory
-o, --output TEXT Output directory
-t, --templates TEXT Templates directory
--help Show this message and exit.
Example
Given the following directory layout:
├── input
│ └── index.md
└── templates
└── default.html
With the following file contents:
input/index.md
---
title: This is the Index
---
Welcome
templates/default.html
<html>
<head>
<title>{{ title }}</title>
<body>
{{ content }}
</body>
</body>
Running corvid
will produce the additional output
directory:
.
├── input
│ └── index.md
├── output
│ └── index.html
└── templates
└── default.html
And the contents of the file will be:
output/index.html
<html>
<head>
<title>This is the Index</title>
<head>
<body>
<p>Welcome</p>
</body>
</body>
Using templates
Custom templates can be set by specifying the path to the template inside the templates
directory as the template
frontmatter.
See /example
for a full example.
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
Built Distribution
File details
Details for the file corvid-1.1.0.tar.gz
.
File metadata
- Download URL: corvid-1.1.0.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba447e51a9e2a6fa749cdc5910a79b14698a74848d442bc311fef5ecfc31e290 |
|
MD5 | 35a8a49801a6c222728c349f55903d8f |
|
BLAKE2b-256 | 9793f5c786409e533ded5b0ae4fc1414aeb5590a95a256bb8a7568c2c95715e3 |
File details
Details for the file corvid-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: corvid-1.1.0-py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | df7705a1ef74cace7468bc0ed2095d1b6425a1ae830de016e16e5a26c9a28ed8 |
|
MD5 | f12714751d457f1fee30911aecb8e599 |
|
BLAKE2b-256 | 8cac63e80e1c7a4b5ec2c536965955606e91d1d99379f6411f7c4c5655700eda |