coltrane


Namecoltrane JSON
Version 0.32.1 PyPI version JSON
download
home_pagehttps://github.com/adamghill/coltrane/
SummaryA Dynamic Site Generator that harnesses the power of Django without the hassle 🎵.
upload_time2024-03-01 00:45:34
maintainer
docs_urlNone
authoradamghill
requires_python>=3.7,<4.0
licenseMIT
keywords django python static markdown
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
  <a href="https://coltrane.readthedocs.io"><h1 align="center">coltrane</h1></a>
</p>
<p align="center">A Dynamic Site Generator that harnesses the power of Django without the hassle 🎵</p>

![PyPI](https://img.shields.io/pypi/v/coltrane?color=blue&style=flat-square)
![PyPI - Downloads](https://img.shields.io/pypi/dm/coltrane?color=blue&style=flat-square)
![GitHub Sponsors](https://img.shields.io/github/sponsors/adamghill?color=blue&style=flat-square)
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)
<!-- ALL-CONTRIBUTORS-BADGE:END -->

📖 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](https://twitter.com/adamghill/status/1487522925393715205) 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](https://djangopackages.org) for additional functionality
- Optional command to generate static HTML files
- Able to be integrated into a regular `Django` project as a standard third-party `Django` app

## ⚡ Quick start

1. `mkdir new-site && cd new-site` to create a new folder
1. `poetry init --no-interaction --dependency 'coltrane:<1' && poetry install` to create a new virtual environment and install the `coltrane` package
1. Optional: `brew install watchman` on MacOS for less resource-intensive local development server
1. `poetry run coltrane create` to create the folder structure for a new site
1. `poetry run coltrane play` to start local development server
1. Go to http://localhost:8000 to see the original markdown rendered into HTML
1. Update `content/index.md`
1. Go to http://localhost:8000 to see the updated markdown rendered into HTML
1. Optional: run `poetry run coltrane record` to build static HTML files

### Generated `coltrane` file structure

```bash
.
├── .env
├── .gitignore
├── .watchmanconfig
├── __init__.py
├── app.py
├── content
│   └── index.md
├── data
├── Dockerfile
├── gunicorn.conf.py
├── templates
├── 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`

## 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](https://allcontributors.org/docs/en/emoji-key)):

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
  <tbody>
    <tr>
      <td align="center"><a href="https://github.com/Tobi-De"><img src="https://avatars.githubusercontent.com/u/40334729?v=4?s=100" width="100px;" alt="Tobi DEGNON"/><br /><sub><b>Tobi DEGNON</b></sub></a><br /><a href="https://github.com/adamghill/coltrane/commits?author=Tobi-De" title="Tests">⚠️</a> <a href="https://github.com/adamghill/coltrane/commits?author=Tobi-De" title="Code">💻</a></td>
    </tr>
  </tbody>
  <tfoot>
    
  </tfoot>
</table>

<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->

<!-- ALL-CONTRIBUTORS-LIST:END -->

This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/adamghill/coltrane/",
    "name": "coltrane",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7,<4.0",
    "maintainer_email": "",
    "keywords": "django,python,static,markdown",
    "author": "adamghill",
    "author_email": "adam@adamghill.com",
    "download_url": "https://files.pythonhosted.org/packages/2d/f0/4107aa90a31280928f4a9131b8060e7a1083ee8f5c3fa674961ad9b5d6a8/coltrane-0.32.1.tar.gz",
    "platform": null,
    "description": "<p align=\"center\">\n  <a href=\"https://coltrane.readthedocs.io\"><h1 align=\"center\">coltrane</h1></a>\n</p>\n<p align=\"center\">A Dynamic Site Generator that harnesses the power of Django without the hassle \ud83c\udfb5</p>\n\n![PyPI](https://img.shields.io/pypi/v/coltrane?color=blue&style=flat-square)\n![PyPI - Downloads](https://img.shields.io/pypi/dm/coltrane?color=blue&style=flat-square)\n![GitHub Sponsors](https://img.shields.io/github/sponsors/adamghill?color=blue&style=flat-square)\n<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->\n![All Contributors](https://img.shields.io/badge/all_contributors-1-orange.svg?style=flat-square)\n<!-- ALL-CONTRIBUTORS-BADGE:END -->\n\n\ud83d\udcd6 Complete documentation at https://coltrane.readthedocs.io.\n\n\ud83d\udce6 Package located at https://pypi.org/project/coltrane/.\n\n## \u2b50 Features\n\n- Render `markdown` files as HTML with automatic URL routing based on the filesystem\n- Use JSON files as data sources in HTML templates or `markdown`\n- Automatic generation of `sitemap.xml` and `rss.xml` files\n- Can serve non-markdown files like `robots.txt`\n- Local development server which includes [live re-rendering of markdown and data](https://twitter.com/adamghill/status/1487522925393715205) via https://github.com/adamchainz/django-browser-reload\n- Deployment best practices with `whitenoise` and `gunicorn` already configured\n- Leverage the power of built-in `Django` templates, template tags, and filters inside `markdown` files\n- Any custom template tags and filters are enabled automatically for use in `markdown` or HTML templates\n- Include any third-party [`Django` app](https://djangopackages.org) for additional functionality\n- Optional command to generate static HTML files\n- Able to be integrated into a regular `Django` project as a standard third-party `Django` app\n\n## \u26a1 Quick start\n\n1. `mkdir new-site && cd new-site` to create a new folder\n1. `poetry init --no-interaction --dependency 'coltrane:<1' && poetry install` to create a new virtual environment and install the `coltrane` package\n1. Optional: `brew install watchman` on MacOS for less resource-intensive local development server\n1. `poetry run coltrane create` to create the folder structure for a new site\n1. `poetry run coltrane play` to start local development server\n1. Go to http://localhost:8000 to see the original markdown rendered into HTML\n1. Update `content/index.md`\n1. Go to http://localhost:8000 to see the updated markdown rendered into HTML\n1. Optional: run `poetry run coltrane record` to build static HTML files\n\n### Generated `coltrane` file structure\n\n```bash\n.\n\u251c\u2500\u2500 .env\n\u251c\u2500\u2500 .gitignore\n\u251c\u2500\u2500 .watchmanconfig\n\u251c\u2500\u2500 __init__.py\n\u251c\u2500\u2500 app.py\n\u251c\u2500\u2500 content\n\u2502\u00a0\u00a0 \u2514\u2500\u2500 index.md\n\u251c\u2500\u2500 data\n\u251c\u2500\u2500 Dockerfile\n\u251c\u2500\u2500 gunicorn.conf.py\n\u251c\u2500\u2500 templates\n\u251c\u2500\u2500 poetry.lock\n\u2514\u2500\u2500 pyproject.toml\n```\n\n## \ud83d\udcdd Content\n\nAdd `markdown` files or sub-directories to the `content` directory and rendered HTML will be accessible via auto-generated routes.\n\n- `/` would render the `markdown` in `content/index.md`\n- `/about/` would render the `markdown` in `content/about.md`\n- `/articles/this-is-the-first-article/` would render the content from `/content/articles/this-is-the-first-article.md`\n- `/not-there/` will 404\n\nHTML will also be served automatically if a `markdown` file can not be found.\n\n- `/app/` would render the HTML from `/templates/app.html` or `/templates/app/index.html`\n- `/app/some-user` would render the HTML from `/templates/app/*.html`\n\n## Deployment\n\nExample `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`.\n\n# \ud83d\udcd6 Documentation\n\nRead all of the documentation at https://coltrane.readthedocs.io.\n\n## Contributors \u2728\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->\n<!-- prettier-ignore-start -->\n<!-- markdownlint-disable -->\n<table>\n  <tbody>\n    <tr>\n      <td align=\"center\"><a href=\"https://github.com/Tobi-De\"><img src=\"https://avatars.githubusercontent.com/u/40334729?v=4?s=100\" width=\"100px;\" alt=\"Tobi DEGNON\"/><br /><sub><b>Tobi DEGNON</b></sub></a><br /><a href=\"https://github.com/adamghill/coltrane/commits?author=Tobi-De\" title=\"Tests\">\u26a0\ufe0f</a> <a href=\"https://github.com/adamghill/coltrane/commits?author=Tobi-De\" title=\"Code\">\ud83d\udcbb</a></td>\n    </tr>\n  </tbody>\n  <tfoot>\n    \n  </tfoot>\n</table>\n\n<!-- markdownlint-restore -->\n<!-- prettier-ignore-end -->\n\n<!-- ALL-CONTRIBUTORS-LIST:END -->\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A Dynamic Site Generator that harnesses the power of Django without the hassle \ud83c\udfb5.",
    "version": "0.32.1",
    "project_urls": {
        "Documentation": "https://coltrane.readthedocs.io/",
        "Funding": "https://github.com/sponsors/adamghill",
        "Homepage": "https://github.com/adamghill/coltrane/",
        "Repository": "https://github.com/adamghill/coltrane/"
    },
    "split_keywords": [
        "django",
        "python",
        "static",
        "markdown"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4c1fc32e01dc0e592574cd498bce67858bf95622e3162740c8215479d1cef2a9",
                "md5": "57fcf4f79ed01b7b658a86957e051e2c",
                "sha256": "603e2cf5b3378519abd9268b1ce16e84ea31b4c2915d035e61dda7439ae78ecc"
            },
            "downloads": -1,
            "filename": "coltrane-0.32.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "57fcf4f79ed01b7b658a86957e051e2c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7,<4.0",
            "size": 35876,
            "upload_time": "2024-03-01T00:45:33",
            "upload_time_iso_8601": "2024-03-01T00:45:33.278347Z",
            "url": "https://files.pythonhosted.org/packages/4c/1f/c32e01dc0e592574cd498bce67858bf95622e3162740c8215479d1cef2a9/coltrane-0.32.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2df04107aa90a31280928f4a9131b8060e7a1083ee8f5c3fa674961ad9b5d6a8",
                "md5": "0c8aa97590b69eeb2b0cd067703c1945",
                "sha256": "4b6ec7732638128250e71c1d6923c3c06b641a38a0fccde8c8fb4b0734c5858b"
            },
            "downloads": -1,
            "filename": "coltrane-0.32.1.tar.gz",
            "has_sig": false,
            "md5_digest": "0c8aa97590b69eeb2b0cd067703c1945",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7,<4.0",
            "size": 31375,
            "upload_time": "2024-03-01T00:45:34",
            "upload_time_iso_8601": "2024-03-01T00:45:34.874440Z",
            "url": "https://files.pythonhosted.org/packages/2d/f0/4107aa90a31280928f4a9131b8060e7a1083ee8f5c3fa674961ad9b5d6a8/coltrane-0.32.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-01 00:45:34",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "adamghill",
    "github_project": "coltrane",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "coltrane"
}
        
Elapsed time: 0.19500s