coltrane
A simple content site framework that harnesses the power of Django without the hassle 🎵
📖 Complete documentation: https://coltrane.readthedocs.io
📦 Package located at https://pypi.org/project/coltrane/
⭐ Features
- Can either generate a static HTML site, be deployed as a standalone Django site, or integrated into an existing Django site
- Reads markdown content and renders it in HTML
- Can use data from JSON files in templates and markdown content
- Automatic generation of
sitemap.xmlandrss.xmlfiles - Live re-rendering of markdown and data when markdown or JSON data files are saved with the magic of https://github.com/adamchainz/django-browser-reload
- All the power of Django templates, template tags, and filters inside markdown files
- Can include other Django apps for additional functionality
- Custom Template tags are supported and are enabled automatically for use in markdown content
- Opinionated standalone Django project setup where deployment (including static files) just works "out of the box"
⚡ Quick start for a new static site
mkdir new-site && cd new-siteto create a new folderpoetry init --no-interaction --dependency 'coltrane:<1' && poetry installto create a new virtual environment and install thecoltranepackagepoetry run coltrane createto create the folder structure for a new site- Update
content/index.md poetry run coltrane playfor a local development server- Go to http://localhost:8000 to see the updated markdown rendered into HTML
poetry run coltrane recordto output the rendered HTML files
Optional installation
- Enable
watchmanfor less resource-intensive autoreload on MacOS:brew install watchman
➕ How to add new content
Add markdown files or sub-directories with markdown files to the content directory and they will automatically have routes created that can be requested.
Example markdown files
content/index.md
content/about.md
content/articles/this-is-the-first-article.md
poetry run coltrane play will serve these URLs
http://localhost:8000/which serves HTML generated from the/content/index.mdfilehttp://localhost:8000/about/which serves HTML generated from the/content/about.mdfilehttp://localhost:8000/articles/this-is-the-first-article/which serves HTML generated from the/content/articles/this-is-the-first-article.mdfilehttp://localhost:8000/not-there/will 404
poetry run coltrane record will create these HTML files for a static site
output/index.htmloutput/about/index.htmloutput/articles/this-is-the-first-article/index.html
Read all of the documentation at https://coltrane.readthedocs.io.
Metadata
Release files for coltrane 0.19.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| coltrane-0.19.0.tar.gz | 21.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| coltrane-0.19.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 45.9 kB
Release files / coltrane-0.19.0.tar.gz
| Download URL | coltrane-0.19.0.tar.gz |
|---|---|
| Size | 21.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3774b71f2523426ab9a7166df8b349a7bb92b22fe96c5bd0527fc03ff2eea9e1
|
|
BLAKE2b-256 checksum How to use checksums |
53ca101996be6e51169934fe2ed534cf87bf9aedfaa9df8781c9b3d1b49e477a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.10.2 Darwin/21.6.0
|
Release files / coltrane-0.19.0-py3-none-any.whl
| Download URL | coltrane-0.19.0-py3-none-any.whl |
|---|---|
| Size | 24.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c6f1524b602b19d4ec02a6634b452789fb2ec329c9841cb01325d0e0c690f94f
|
|
BLAKE2b-256 checksum How to use checksums |
d726ffc0953c1707b3856b6e121f01238d47fc74326342e087e16c17f165362f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.10.2 Darwin/21.6.0
|