Skip to main content

A simple content site framework that harnesses the power of Django without the hassle.

Project description

coltrane

A simple content site framework that harnesses the power of Django without the hassle 🎵

PyPI PyPI - Downloads GitHub Sponsors

📖 Complete documentation: https://coltrane.readthedocs.io

📦 Package located at https://pypi.org/project/coltrane-web/

⭐ 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 and rss.xml files
  • 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"

⚡ Quick start for a new static site

  1. mkdir new-site && cd new-site to create a new folder
  2. poetry init --no-interaction --dependency 'coltrane-web:<1' && poetry install to create a new virtual environment and install the coltrane package
  3. poetry run coltrane create to create the folder structure for a new site
  4. Update content/index.md
  5. poetry run coltrane play for a local development server
  6. Go to http://localhost:8000 to see the updated markdown rendered into HTML
  7. poetry run coltrane record to output the rendered HTML files

Optional installation

  • Enable watchman for less resource-intensive autoreload on MacOS: brew install watchman

➕ How to add new content

Add markdown files or sub-directories with markdown files to the content directory and they will automatically have routes created that can be requested.

Example markdown files

content/index.md
content/about.md
content/articles/this-is-the-first-article.md

poetry run coltrane play will serve these URLs

  • http://localhost:8000/ which serves HTML generated from the /content/index.md file
  • http://localhost:8000/about/ which serves HTML generated from the /content/about.md file
  • http://localhost:8000/articles/this-is-the-first-article/ which serves HTML generated from the /content/articles/this-is-the-first-article.md file
  • http://localhost:8000/not-there/ will 404

poetry run coltrane record will create these HTML files for a static site

  • output/index.html
  • output/about/index.html
  • output/articles/this-is-the-first-article/index.html

Read all of the documentation at https://coltrane.readthedocs.io.

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

Uploaded Source

Built Distribution

coltrane-0.18.3-py3-none-any.whl (24.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: coltrane-0.18.3.tar.gz
  • Upload date:
  • Size: 21.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.2 Darwin/21.6.0

File hashes

Hashes for coltrane-0.18.3.tar.gz
Algorithm Hash digest
SHA256 2fecb5ff7068eb831d58a084896e48bc0d49d197e6c51470b57b3e3667e57f0f
MD5 5e469f18b62efb8695d3707655a06d32
BLAKE2b-256 d3027926458a18a62b199d2407d0ab7d4405a54f0fdf59a087b3c272418672e6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: coltrane-0.18.3-py3-none-any.whl
  • Upload date:
  • Size: 24.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.10.2 Darwin/21.6.0

File hashes

Hashes for coltrane-0.18.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c66cb29ba577e03048419aebd9387708f57adfbce028e94dda6a6ac9d3a76f61
MD5 7ad34d79c11113e41d48288b0e1034b5
BLAKE2b-256 d949178cf8f2ffbf789415396b0fafbb43ded4705117b6289c5bc886aeabfb4e

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