Skip to main content

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 🎵

PyPI PyPI - Downloads GitHub Sponsors

All Contributors

📖 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 and rss.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 and gunicorn 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-party Django app

⚡ Quick start

  1. mkdir new-site && cd new-site to create a new folder
  2. poetry init --no-interaction --dependency 'coltrane:<1' && poetry install to create a new virtual environment and install the coltrane package
  3. Optional: brew install watchman on MacOS for less resource-intensive local development server
  4. poetry run coltrane create to create the folder structure for a new site
  5. poetry run coltrane play to start local development server
  6. Go to http://localhost:8000 to see the original markdown rendered into HTML
  7. Update content/index.md
  8. Go to http://localhost:8000 to see the updated markdown rendered into HTML
  9. 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 the markdown in content/index.md
  • /about/ would render the markdown in content/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
Tobi DEGNON

⚠️ 💻

This project follows the all-contributors specification. Contributions of any kind welcome!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

coltrane-0.26.0.tar.gz (28.2 kB view details)

Uploaded Source

Built Distribution

coltrane-0.26.0-py3-none-any.whl (31.5 kB view details)

Uploaded Python 3

File details

Details for the file coltrane-0.26.0.tar.gz.

File metadata

  • Download URL: coltrane-0.26.0.tar.gz
  • Upload date:
  • Size: 28.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.10.8 Darwin/22.5.0

File hashes

Hashes for coltrane-0.26.0.tar.gz
Algorithm Hash digest
SHA256 af8d1f07bba8e696dfe2c38ed0eab5cb8ab2a049d35a71d93a1bc5977cd2e6c4
MD5 b94e1fa139d0e29112bbcc2508f487e9
BLAKE2b-256 8e97302bbd63f481bf6951d3bddecd7fef2a5ee2c69c159fd6c8bbccb37abcc3

See more details on using hashes here.

File details

Details for the file coltrane-0.26.0-py3-none-any.whl.

File metadata

  • Download URL: coltrane-0.26.0-py3-none-any.whl
  • Upload date:
  • Size: 31.5 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

Hashes for coltrane-0.26.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6c35813559836a0577f939d0947512784890f869cd6e74eab97fa86e33f82128
MD5 14dc9bab7f534190f0f01f8149b58af2
BLAKE2b-256 8757009fd5ff3a9280c599f1b28a2dd6d51289a8ad1d6928c47e8ce12b3350a4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page