{"id":17974720,"url":"https://github.com/meeb/django-distill-example","last_synced_at":"2025-03-25T14:32:14.539Z","repository":{"id":41906886,"uuid":"156698794","full_name":"meeb/django-distill-example","owner":"meeb","description":"An example fully working statically generated website using Django Distill","archived":false,"fork":false,"pushed_at":"2024-08-08T05:09:52.000Z","size":175,"stargazers_count":39,"open_issues_count":0,"forks_count":12,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-20T12:51:37.923Z","etag":null,"topics":["django","django-cachekiller","django-distill","netlify"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/meeb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-08T11:47:09.000Z","updated_at":"2024-08-08T05:09:56.000Z","dependencies_parsed_at":"2024-02-06T14:07:45.181Z","dependency_job_id":"6944382c-8300-419c-93dd-d2ccddf2d463","html_url":"https://github.com/meeb/django-distill-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meeb%2Fdjango-distill-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meeb%2Fdjango-distill-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meeb%2Fdjango-distill-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/meeb%2Fdjango-distill-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/meeb","download_url":"https://codeload.github.com/meeb/django-distill-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245480553,"owners_count":20622334,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["django","django-cachekiller","django-distill","netlify"],"created_at":"2024-10-29T17:15:17.839Z","updated_at":"2025-03-25T14:32:14.247Z","avatar_url":"https://github.com/meeb.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# django-distill-example\n\nThis is a complete working example of how to build a static site with Django,\nDjango Distill and Django CacheKiller. It was built and tested under Python\n3.6, but any modern 3.x Python should work.\n\n * [Django](https://www.djangoproject.com/)\n * [Django Distill](https://github.com/meeb/django-distill)\n * [Django CacheKiller](https://github.com/meeb/django-cachekiller)\n\nThis site is fully working and a live demo if this sites output is available\nhere, hosted on Netlify:\n\nhttps://django-distill-example.meeb.org/\n\nThis example is slightly unusual in that it commits the SQLite database\nwith the content into the repository, this is fine for single developer or\nsmall teams, however larger sites with a lot of content should use a secured\nexternal database or you'll end up overwriting each others content edits with\nendless merge conflicts.\n\n\n# Usage\n\nYou can use this style of site generation on any platform which supports\ncontinuous deployment, good (and free or low cost) examples being:\n\n * [Netlify](https://netlify.com/)\n * [GitLab Pages](https://docs.gitlab.com/ee/user/project/pages/)\n\nThis example repo includes working demo content and a working Django admin. To\nget it working, just clone this repository and install the requirements (using\na virtual env would be a good idea):\n\n```bash\n$ pip install -r requirements.txt\n```\n\nThen run the development server:\n\n```bash\n$ ./manage.py runserver\n```\n\nYou should be able to access the site on your local development server at [http://127.0.0.1:8000/](http://127.0.0.1:8000/). The admin is at\n[http://127.0.0.1:8000/admin/](http://127.0.0.1:8000/admin) and the default\ncredentials are:\n\n* Username: `blogadmin`\n* Password: `blogadmin`\n\n**Note** This is obviously not at all secure, the static site once generated is\nsecure, however the Django interface is *only* suitable for local development\nand content editing on a secure computer. If you want to secure the development\nserver interface make sure you change the `SECRET_KEY` to something sensible\n(and store it in an environment variable).\n\nTo build a static website into a `public` directory make sure you have `make`\ninstalled, for example on Debian or Ubuntu systems:\n\n```bash\n# May need \"sudo\" prefix\n$ apt install make\n```\n\nThen in the project directory just run:\n\n```bash\n$ make\n```\n\nAnd you static site will be in the `public` directory.\n\n\n# Detailed steps to get a site live\n\n1. Go and create an account on [Netlify](https://netlify.com/)\n2. Create working Django website with some URLs wrapped by Distill, or clone /\n   fork this repo\n3. Check that `./manage.py distill-local some-directory` creates a working\n   static copy of your site\n4. Create a build script for simplicity, see the `Makefile` in this repo for an\n   example, make this build script create the site in a directory called\n   `public` - you can use a shell script or whatever you like.\n5. Make sure you set the correct Netlify runtime, see the `runtime.txt` file in\n   this repo for an example. Remember, no trailing line breaks!\n6. Link your Netlify account to your GitHub or GitLab or other repo account\n7. Create the domain on Netlify using your repo as the source, it will ask you\n   for some configuration details. In the \"Build command\" option put `make` \n   (or whatever your shell script is if you created one instead of a makefile)\n   and in the \"Publish directory\" option put `public`.\n8. Click \"Deploy site\"\n\nAfter a minute or two your static site should be live! Now every time you\ncommit some changes, including content into the SQLite database, and do a push\nyour changes will be automatically deployed live and your static assets will\nhave their cache-busting tags updated.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeeb%2Fdjango-distill-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmeeb%2Fdjango-distill-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmeeb%2Fdjango-distill-example/lists"}