Skip to main content

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 hierarchy 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.

Usage:
$ corvid [OPTIONS]

For help:
$ corvid --help

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>
    </head>
    <body>
        {{ content }}
    </body>
</html>

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>
</html>

Using templates

Custom templates can be set by specifying the path to the template (inside the templates directory) as the template frontmatter in an individual page. See bar.md for an example.

See /example for the full input -> template -> output folder structure.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

corvid-1.1.1.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

corvid-1.1.1-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file corvid-1.1.1.tar.gz.

File metadata

  • Download URL: corvid-1.1.1.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for corvid-1.1.1.tar.gz
Algorithm Hash digest
SHA256 921b13dbbef24dc9c6c6c1f1c483eeef8b432837ea594c5ac5bf88da57589939
MD5 5836c5d873b7b36a0bce97b25b3aadf4
BLAKE2b-256 077a87025f9bcadd1e43ac581bbca40735597d7046f02fdb0405c52575ccc579

See more details on using hashes here.

File details

Details for the file corvid-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: corvid-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for corvid-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9860f7e6d780dd5a85d3ad3b56b24458debb075df33f42616b66bdaab4853eaf
MD5 713d520507830356aa9e9cd6b6c48e30
BLAKE2b-256 7ca2712a2e060c18678135b487fb9c8a2c3adf26a4b8c7f0c530aa3018c8c1bd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page