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
markdownfiles 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.xmlandrss.xmlfiles - 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
whitenoiseandgunicornalready configured - Leverage the power of built-in
Djangotemplates, template tags, and filters insidemarkdownfiles - Any custom template tags and filters are enabled automatically for use in
markdownor HTML templates - Include any third-party
Djangoapp for additional functionality - Serve multiple domains with custom sites
- Optional command to generate static HTML files
- Can be integrated into a regular
Djangoproject as a standard third-partyDjangoapp to render markdown content
⚡ Quick start
mkdir new-site && cd new-siteto create a new folderpython3 -m venv .venv && source .venv/bin/activate && pip install coltraneto install thecoltranepackagecoltrane createto create the folder structure for a new sitecoltrane playto 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 recordto 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 themarkdownincontent/index.md/about/would render themarkdownincontent/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.htmlor/templates/app/index.html/app/some-userwould 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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file coltrane-0.39.0.tar.gz.
File metadata
- Download URL: coltrane-0.39.0.tar.gz
- Upload date:
- Size: 513.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8563d04cf9330447f2701d30072acbc98118f32675070fbbde9f9ef9a8bf6437
|
|
| MD5 |
a281f15eb68bbb3932bf128440af9488
|
|
| BLAKE2b-256 |
6b47d93fbaaf7b037cf86a359b9bb9fcba2a9b2260f0915887cb6e8ffd54bb3d
|
Provenance
The following attestation bundles were made for coltrane-0.39.0.tar.gz:
Publisher:
publish.yml on adamghill/coltrane
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
coltrane-0.39.0.tar.gz -
Subject digest:
8563d04cf9330447f2701d30072acbc98118f32675070fbbde9f9ef9a8bf6437 - Sigstore transparency entry: 214830104
- Sigstore integration time:
-
Permalink:
adamghill/coltrane@a122d967df42b3e410df7e30f5080aaf62a54e01 -
Branch / Tag:
refs/tags/0.39.0 - Owner: https://github.com/adamghill
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a122d967df42b3e410df7e30f5080aaf62a54e01 -
Trigger Event:
release
-
Statement type:
File details
Details for the file coltrane-0.39.0-py3-none-any.whl.
File metadata
- Download URL: coltrane-0.39.0-py3-none-any.whl
- Upload date:
- Size: 48.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
451c5151198309858293fe57f886eef9a82ca8d70875e8010552a018c8589a3a
|
|
| MD5 |
c7d6d7e0fbf956b1f7f886a427caa069
|
|
| BLAKE2b-256 |
b257c7b1c5a586dafe5fbc0af9efc48f319954269b501fae813d8e3b41d0c4f6
|
Provenance
The following attestation bundles were made for coltrane-0.39.0-py3-none-any.whl:
Publisher:
publish.yml on adamghill/coltrane
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
coltrane-0.39.0-py3-none-any.whl -
Subject digest:
451c5151198309858293fe57f886eef9a82ca8d70875e8010552a018c8589a3a - Sigstore transparency entry: 214830105
- Sigstore integration time:
-
Permalink:
adamghill/coltrane@a122d967df42b3e410df7e30f5080aaf62a54e01 -
Branch / Tag:
refs/tags/0.39.0 - Owner: https://github.com/adamghill
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a122d967df42b3e410df7e30f5080aaf62a54e01 -
Trigger Event:
release
-
Statement type: