{"id":13530933,"url":"https://github.com/tomdyson/wagtail-netlify","last_synced_at":"2025-03-16T17:34:17.012Z","repository":{"id":56061922,"uuid":"100290355","full_name":"tomdyson/wagtail-netlify","owner":"tomdyson","description":"Wagtail \u003c3 Netlify","archived":false,"fork":false,"pushed_at":"2022-05-04T13:36:10.000Z","size":46,"stargazers_count":85,"open_issues_count":7,"forks_count":13,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-08T04:05:16.555Z","etag":null,"topics":["netlify","wagtail"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/wagtailnetlify/","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/tomdyson.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-14T17:00:05.000Z","updated_at":"2024-11-30T19:50:22.000Z","dependencies_parsed_at":"2022-08-15T12:30:35.858Z","dependency_job_id":null,"html_url":"https://github.com/tomdyson/wagtail-netlify","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomdyson%2Fwagtail-netlify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomdyson%2Fwagtail-netlify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomdyson%2Fwagtail-netlify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomdyson%2Fwagtail-netlify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomdyson","download_url":"https://codeload.github.com/tomdyson/wagtail-netlify/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243822295,"owners_count":20353500,"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":["netlify","wagtail"],"created_at":"2024-08-01T07:00:58.031Z","updated_at":"2025-03-16T17:34:16.723Z","avatar_url":"https://github.com/tomdyson.png","language":"Python","funding_links":[],"categories":["Apps"],"sub_categories":["Static site generation"],"readme":"# wagtail-netlify\n\n[![PyPI version](https://badge.fury.io/py/wagtailnetlify.svg)](https://badge.fury.io/py/wagtailnetlify)\n\nDeploy your Wagtail site on Netlify. Features include:\n\n - automatic deployment when pages are published\n - a new `netlify` management command\n - conversion of Wagtail redirects to Netlify's format\n\n![Screencast demo](https://tom.s3.amazonaws.com/wagtail-netlify.gif)\n\n## Installation\n\n1. Install and configure [Wagtail Bakery](https://github.com/moorinteractive/wagtail-bakery), if you haven't already.\n2. Install [Netlify CLI v2.x](https://www.netlify.com/docs/cli/#installation), if you haven't already.\n3. Install Wagtail-Netlify via pip (with `pip install wagtailnetlify`).\n\n## Configuration\n\n1. Add `wagtailnetlify` to your `INSTALLED_APPS`.\n2. Run the migrations: `./manage.py migrate wagtailnetlify`.\n3. Add `NETLIFY_PATH` or `NETLIFY_BUILD_HOOK` to your settings.\n\nCheck the [Settings](#settings) section below for more customisation options.\n\n## Usage\n\nIf `NETLIFY_AUTO_DEPLOY` is set to `True`, Wagtail will automatically deploy your site every time a page is published.\n\n*or*\n\nTo deploy changes manually, use `./manage.py netlify`. \n\nTo generate redirects without deploying, use the `-n` or `--no-deploy` flag: `./manage.py netlify --no-deploy`. \n\nTo trigger a build on Netlify's servers, configure `settings.NETLIFY_BUILD_HOOK` and use the `-t` or `--trigger-build` flag: `./manage.py netlify --trigger-build`.\n\n## Settings\n\n### `NETLIFY_PATH`\n\nThe path to the Netlify CLI. *Hint: type `which netlify` to check the location.*\n\n### `NETLIFY_SITE_ID`\n\n**Default: `None`**\n\nIf set, deploy to that specific Netlify site.\n\nIf not set, the Netlify CLI might prompt you to select one.\n\n### `NETLIFY_API_TOKEN`\n\n**Default: `None`**\n\nIf set, the Netlify CLI will not prompt you to click the authentication link in the console. It can be useful when deployed to a remote server where you don't see the console output.\n\nConnect to your Netlify account to [generate a token](https://app.netlify.com/account/applications) and then set the settings. *Warning: You should never check credentials in your version control system. Use [environment variables](https://django-environ.readthedocs.io/en/latest/) or [local settings file](http://techstream.org/Bits/Local-Settings-in-django) instead.*\n\n### `NETLIFY_AUTO_DEPLOY`\n\n**Default: `False`**\n\nWhether to automatically deploy your site to Netlify every time you publish a page. This make take between a few seconds and a few minutes, depending on the size of your site, and the number of pages which are affected by your change. If you have configured `settings.NETLIFY_BUILD_HOOK`, publishing a page will trigger a build on Netlify's servers.\n\n### `NETLIFY_DEPLOY_FUNCTION`\n\n**Default: `wagtailnetlify.models.deploy`**\n\nThe function to be called when a deploy is triggered (excluding when triggered manually with the `./manage.py netlify` command). It can be useful if you want to use your own task runner (like Celery) instead of the built-in threading model.\n\nThe function needs to be a valid [Django signal receiver](https://docs.djangoproject.com/en/2.1/topics/signals/#receiver-functions).\n\n### `NETLIFY_BUILD_HOOK`\n\n**Default: `None`**\n\nThe URL of a Netlify build hook. If provided, `./manage.py netlify --trigger-build` will call this hook, triggering a build\non Netlify's servers. This may be useful if you have a headless front-end on Netlify which handles its own static site generation, \ne.g. Nuxt, Next or Gatsby. See https://docs.netlify.com/configure-builds/build-hooks/ for more details.\n\n### Optional admin view and endpoints\n\nNetlify can send a webhook after a successful deployment. This app provides an endpoint for that webhook and an admin view of completed deployments. To enable this view:\n\n1. Add `wagtail.contrib.modeladmin` to your `INSTALLED_APPS`\n1. Update your project's `urls.py`:\n\n```python\n# in your imports\nfrom wagtailnetlify import urls as netlify_urls\n\n# in urlpatterns, before including wagtail_urls\nurl(r\"^netlify/\", include(netlify_urls)),\n```\n\n3. In Netlify's admin interface for your app, add http://yourdomain/netlify/success as a URL to notify for the outgoing webhook on *Deploy succeeded* events (in Settings / Build \u0026 deploy / Deploy notifications).\n\nThe view will be available under `Settings / Deployments` in your site's admin.\n\nIncluding the `wagtailnetlify` URLs will also enable a view at /netlify/redirects, which outputs any Wagtail redirects in [Netlify's plain text format](https://docs.netlify.com/routing/redirects/#syntax-for-the-redirects-file). This may be useful if you are using Netlify to host a headless front-end for your Wagtail site.\n\n## Development\n\n### Releases\n\n1. Ensure you have the latest versions of `pip`, `setuptools` and `twine` installed in your virtual environment.\n1. Ensure your `master` branch is up to date.\n1. Create a new branch (e.g. `release/v1.1.3`) for the release of the new version.\n1. Update the version number in `wagtailnetlify/__init__.py` following [Semantic Versioning](http://semver.org/spec/v2.0.0.html).\n1. Update `CHANGELOG.md`.\n1. (Optional) If you need to verify anything, use `make publish-test` to upload to https://test.pypi.org and enter your PyPi *test* credentials as needed.\n1. On GitHub, create a pull request and squash merge it.\n1. Checkout and pull the `master` branch locally.\n1. Use `make publish` and enter your PyPi credentials as needed.\n1. On GitHub, create a release and a tag for the new version.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomdyson%2Fwagtail-netlify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomdyson%2Fwagtail-netlify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomdyson%2Fwagtail-netlify/lists"}