A minimal app framework for content sites 🎵
Project description
coltrane
A minimal app framework for content sites 🎵
📖 Complete documentation at https://coltrane.readthedocs.io.
📦 Package located at https://pypi.org/project/coltrane/.
⭐ Features
- Render
markdown
files as HTML with automatic URL routing based on the filesystem - Use JSON files as data sources in HTML templates or
markdown
- Automatic generation of
sitemap.xml
andrss.xml
files - Can serve non-markdown files like
robots.txt
- Local development server which includes live re-rendering of markdown and data via https://github.com/adamchainz/django-browser-reload
- Site-wide redirects
- Deployment best practices with
whitenoise
andgunicorn
already configured - Leverage the power of built-in
Django
templates, template tags, and filters insidemarkdown
files - Any custom template tags and filters are enabled automatically for use in
markdown
or HTML templates - Include any third-party
Django
app for additional functionality - Optional command to generate static HTML files
- Can be integrated into a regular
Django
project as a standard third-partyDjango
app to render markdown content
⚡ Quick start
mkdir new-site && cd new-site
to create a new folderpython3 -m venv .venv && source .venv/bin/activate && pip install coltrane
to install thecoltrane
packagecoltrane create
to create the folder structure for a new sitecoltrane play
to start local development server- Go to http://localhost:8000 to see the original markdown rendered into HTML
- Update
content/index.md
- Refresh http://localhost:8000 to see the updated markdown rendered into HTML
- 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.
/
would render themarkdown
incontent/index.md
/about/
would render themarkdown
incontent/about.md
/articles/this-is-the-first-article/
would render the content from/content/articles/this-is-the-first-article.md
/not-there/
will 404
HTML will also be served automatically if a markdown
file can not be found.
/app/
would render the HTML from/templates/app.html
or/templates/app/index.html
/app/some-user
would render the HTML from/templates/app/*.html
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 ⚠️ 💻 |
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.37.0.tar.gz
.
File metadata
- Download URL: coltrane-0.37.0.tar.gz
- Upload date:
- Size: 498.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16d84c8b93486c77ee2310a807c460441a236dd0c56c75f153ee98ca63eef901 |
|
MD5 | 21de246f08374fab3a23f9dec99a7186 |
|
BLAKE2b-256 | 9a852227eadd4f4d7e944281680652e7dff456a46ba0f469bc3d6fe8544e9fc0 |
File details
Details for the file coltrane-0.37.0-py3-none-any.whl
.
File metadata
- Download URL: coltrane-0.37.0-py3-none-any.whl
- Upload date:
- Size: 40.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87d9eee059440b1ccc8a8665ef1e4cb5e37c562fefb4ade0f579f9100ac842d7 |
|
MD5 | 2c62c33dbe4bdf6d23fe9f38af447d83 |
|
BLAKE2b-256 | b8d188654f1f0fbe4a0ed240886031f8365298e097a3c76d0d265fcc196c8afd |