Giter VIP home page Giter VIP logo

coltrane's Introduction

coltrane

A simple content site framework that harnesses the power of Django without the hassle ๐ŸŽต

PyPI PyPI - Downloads GitHub Sponsors

All Contributors

๐Ÿ“– Complete documentation: https://coltrane.readthedocs.io

๐Ÿ“ฆ Package located at https://pypi.org/project/coltrane/

โญ 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:<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.

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!

coltrane's People

Contributors

adamghill avatar tobi-de avatar allcontributors[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.