A Dynamic Site Generator that harnesses the power of Django without the hassle 🎵.
Project description
coltrane
A Dynamic Site Generator that harnesses the power of Django without the hassle 🎵
📖 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
- Deployment best practices with
whitenoise
andgunicorn
already configured - Leverage the power of built-in
Django
templates, template tags, and filters inside markdown 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 static site generator to output HTML files
- Able to be integrated into a regular
Django
project as a third-partyDjango
app
⚡ Quick start
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
package- Optional:
brew install watchman
on MacOS for less resource-intensive local development server poetry run coltrane create
to create the folder structure for a new sitepoetry run coltrane play
to start local development server- Go to http://localhost:8000 to see the original markdown rendered into HTML
- Update
content/index.md
- Go to http://localhost:8000 to see the updated markdown rendered into HTML
- Optional: run
poetry run coltrane record
to build static HTML files
Generated coltrane
file structure
.
├── __init__.py
├── app.py
├── content
│ └── index.md
├── data
├── poetry.lock
└── pyproject.toml
📝 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
📖 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.29.0.tar.gz
.
File metadata
- Download URL: coltrane-0.29.0.tar.gz
- Upload date:
- Size: 29.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.10.8 Darwin/22.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 413cb6a1d22c5397974e474853c6cbaf41bface1232a777c2cf304c1f3d6fa2e |
|
MD5 | 02d5efebfd0470685bc4bf412c82e2c5 |
|
BLAKE2b-256 | fbfba4e10e6bf80211f7c228d85f1ab5bf188d22b720f30d61d72480e1542352 |
File details
Details for the file coltrane-0.29.0-py3-none-any.whl
.
File metadata
- Download URL: coltrane-0.29.0-py3-none-any.whl
- Upload date:
- Size: 32.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.10.8 Darwin/22.5.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce1f5fa9af0c31e2326acb581fc014d4725d62d71e6aa11b47cd39fcc1e9cfad |
|
MD5 | 62a81f7dee18215ccd43ad4a50340af5 |
|
BLAKE2b-256 | 0901eb429deb0783e3707c073438667fcc6d9804d6600fe754390c96227dfa6a |