A simple content site framework that harnesses the power of Django without the hassle.
Project description
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.xml
andrss.xml
files - 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-site
to create a new folderpoetry init --no-interaction --dependency 'coltrane:<1' && poetry install
to create a new virtual environment and install thecoltrane
packagepoetry run coltrane create
to create the folder structure for a new site- Update
content/index.md
poetry run coltrane play
for a local development server- Go to http://localhost:8000 to see the updated markdown rendered into HTML
poetry run coltrane record
to output the rendered HTML files
Optional installation
- Enable
watchman
for 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.md
filehttp://localhost:8000/about/
which serves HTML generated from the/content/about.md
filehttp://localhost:8000/articles/this-is-the-first-article/
which serves HTML generated from the/content/articles/this-is-the-first-article.md
filehttp://localhost:8000/not-there/
will 404
poetry run coltrane record
will create these HTML files for a static site
output/index.html
output/about/index.html
output/articles/this-is-the-first-article/index.html
Read all of the documentation at https://coltrane.readthedocs.io.
Contributors ✨
Thanks goes to these wonderful people (emoji key):
Tobi DEGNON ⚠️ 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!
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 coltrane-0.20.0.tar.gz
.
File metadata
- Download URL: coltrane-0.20.0.tar.gz
- Upload date:
- Size: 22.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.10.2 Darwin/22.1.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b727132aef335bc4f3102eaebd61c1db910ab7e35dd5a3a7f92f3c65f0633102 |
|
MD5 | 132df3ae6c1a5fe68d3f09e5edb35e3f |
|
BLAKE2b-256 | 2758170ce4abd9f4c1da95593b2a3ed70c388bd0b6be2bf6c75e43f798e17958 |
File details
Details for the file coltrane-0.20.0-py3-none-any.whl
.
File metadata
- Download URL: coltrane-0.20.0-py3-none-any.whl
- Upload date:
- Size: 25.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.10.2 Darwin/22.1.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74e44f211e60362af783de506b7d17162494486200d7f1cd43cd1874b572c33f |
|
MD5 | 79f89bace1330164e66d03f9f6f1bf20 |
|
BLAKE2b-256 | 1f9c2c8c220db1d577ed06db0c0d41e6893282b3947f84b8872dcc62b968e2c9 |