adamghill / coltrane

A minimal app framework for content sites.
https://coltrane.readthedocs.io/en/stable/
MIT License
88 stars 4 forks source link
django markdown python static-site-generator

coltrane

A minimal app framework for content sites 🎡

PyPI PyPI - Downloads GitHub Sponsors

All Contributors

πŸ“– Complete documentation at https://coltrane.readthedocs.io.

πŸ“¦ Package located at https://pypi.org/project/coltrane/.

⭐ Features

⚑ Quick start

  1. mkdir new-site && cd new-site to create a new folder
  2. python3 -m venv .venv && source .venv/bin/activate && pip install coltrane to install the coltrane package
  3. coltrane create to create the folder structure for a new site
  4. coltrane play to start local development server
  5. Go to http://localhost:8000 to see the original markdown rendered into HTML
  6. Update content/index.md
  7. Refresh http://localhost:8000 to see the updated markdown rendered into HTML
  8. Optional: run coltrane record to build static HTML files

Generated coltrane file structure

.
β”œβ”€β”€ .gitignore
β”œβ”€β”€ Dockerfile
β”œβ”€β”€ README.md
β”œβ”€β”€ pyproject.toml
└── site
    β”œβ”€β”€ .env
    β”œβ”€β”€ .watchmanconfig
    β”œβ”€β”€ __init__.py
    β”œβ”€β”€ app.py
    β”œβ”€β”€ content
    β”‚Β Β  └── index.md
    β”œβ”€β”€ data
    β”œβ”€β”€ gunicorn.conf.py
    β”œβ”€β”€ static
    └── templates

πŸ“ Content

Add markdown files or sub-directories to the content directory and rendered HTML will be accessible via auto-generated routes.

HTML will also be served automatically if a markdown file can not be found.

Deployment

Example Dockerfile and gunicorn.conf.py files are created when an app is created, and optional dependencies can be installed for efficient static serving with whitenoise.

πŸ“– Documentation

Read all of the documentation at https://coltrane.readthedocs.io.

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Tobi DEGNON
Tobi DEGNON

⚠️ πŸ’»

This project follows the all-contributors specification. Contributions of any kind welcome!