Skip to main content

A minimal app framework for content sites 🎵

Project description

coltrane

A minimal app framework for content sites 🎵

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
  • Site-wide redirects
  • 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
  • Serve multiple domains with custom sites
  • Optional command to generate static HTML files
  • Can be integrated into a regular Django project as a standard third-party Django app to render markdown content

⚡ Quick start

  1. mkdir new-site && cd new-site to create a new folder
  2. python3 -m venv .venv && source .venv/bin/activate && pip install coltrane to install the coltrane package
  3. coltrane create to create the folder structure for a new site
  4. coltrane play to start local development server
  5. Go to http://localhost:8000 to see the original markdown rendered into HTML
  6. Update content/index.md
  7. Refresh http://localhost:8000 to see the updated markdown rendered into HTML
  8. 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 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

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
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.38.7.tar.gz (513.2 kB view details)

Uploaded Source

Built Distribution

coltrane-0.38.7-py3-none-any.whl (48.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: coltrane-0.38.7.tar.gz
  • Upload date:
  • Size: 513.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for coltrane-0.38.7.tar.gz
Algorithm Hash digest
SHA256 f473f9e254488383a9997ed0a4c5622527613c4f9c515366d4dd82e37628e676
MD5 352bc19ba949ae7aa7b4e1a753f9e819
BLAKE2b-256 7e9f97bc2113980945a5b6f7959eadd00d18893c610e477371b746a61befaf5a

See more details on using hashes here.

Provenance

The following attestation bundles were made for coltrane-0.38.7.tar.gz:

Publisher: publish.yml on adamghill/coltrane

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: coltrane-0.38.7-py3-none-any.whl
  • Upload date:
  • Size: 48.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for coltrane-0.38.7-py3-none-any.whl
Algorithm Hash digest
SHA256 a3cebde93facf194a2e60d4da1a7cb29a81f23159d74f69abbabe2b5fb6756f7
MD5 a666432f647e7d511cd6ea633b3c1df8
BLAKE2b-256 4fb6b4493e5f292e558514cd3fdff86751fb37a7305c62ede38370061448921f

See more details on using hashes here.

Provenance

The following attestation bundles were made for coltrane-0.38.7-py3-none-any.whl:

Publisher: publish.yml on adamghill/coltrane

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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