Giter VIP home page Giter VIP logo

wagtail-netlify's Introduction

wagtail-netlify

Deploy your Wagtail site on Netlify. Features include:

  • automatic deployment when pages are published
  • a new netlify management command
  • conversion of Wagtail redirects to Netlify's format

Screencast demo

Install

  1. Install and configure Wagtail Bakery, if you haven't already
  2. Install Netlify, if you haven't already
  3. pip install git+https://github.com/tomdyson/wagtail-netlify.git

Configure

  1. Add 'wagtailnetlify' to your INSTALLED_APPS
  2. Run the migrations: ./manage.py migrate wagtailnetlify
  3. Add NETLIFY_PATH to your settings (hint: type which netlify to check the location)
  4. If you are deploying to an existing Netlify site, provide its ID with NETLIFY_SITE_ID = 'your-id-here'
  5. If you don't want Wagtail to deploy your site to Netlify every time you publish a page, set NETLIFY_AUTO_DEPLOY = False

Usage

  1. If you haven't set NETLIFY_AUTO_DEPLOY = False, Wagtail will automatically deploy your site every time a page is published. 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.
  2. To deploy changes manually, use ./manage.py netlify

Optional admin view

Netlify 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, add 'wagtail.contrib.modeladmin' to your INSTALLED_APPS and update your project's urls.py:

# in your imports
from wagtailnetlify import views as netlify_views

# in urlpatterns, before including wagtail_urls
url(r'^netlify/', netlify_views.success_hook, name='netlify'),

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 & deploy / Deploy notifications).

Todo

  • Provide an admin view for reporting on deployments
  • Allow adminstrators to trigger deploys manually
  • Allow developers to replace Threading with Celery or similar, for more robust async behaviour.
  • Tests

wagtail-netlify's People

Contributors

tomdyson avatar

Watchers

James Cloos avatar  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.