Introduction¶
coltrane
is a content site framework that harnesses the power of Django without the hassle. It can be used to generate a static site for easy serving of HTML files or as an opinionated Django package to render markdown.
⭐ 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
filesCan also serve non-markdown files like
robots.txt
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”
Installation¶
Because coltrane
can be used in a few different ways, the documentation is split into different sections.
Optional installation¶
Enable
watchman
for less resource-intensive autoreload on MacOS:brew install watchman
What’s with the name?¶
coltrane
is built on top of the Django web framework, which is named after Django Reinhardt. Following in that tradition, I named this static site framework after John Coltrane, another jazz musician.
Inspiration and thanks¶
https://twitter.com/willmcgugan/status/1477283879841157123 for the initial inspiration and my reaction: https://twitter.com/adamghill/status/1477414858396164096
Dependencies¶
https://github.com/trentm/python-markdown2 for doing the hard work of rendering the markdown
https://www.djangoproject.com for doing the hard work of everything else
Minimal Django projects¶
https://github.com/wsvincent/django-microframework for the
app.py
ideahttps://olifante.blogs.com/covil/2010/04/minimal-django.html
https://stackoverflow.com/questions/1297873/how-do-i-write-a-single-file-django-application