Overview:
The Directus Extension: dwaring87-publish-netlify is a v9 extension for the Directus app. It includes a frontend app module and backend API endpoints that allow users to manage builds and deploys of a Netlify site. The extension is designed to make it easier for admin users to initiate a Netlify build and manage the published deploy directly from within the Directus app.
Features:
- Initiates a build of a static site generator (e.g., Gatsby, Gridsome) on Netlify after data in Directus has been updated.
- Keeps track of when the site was last updated and detects any data updates in Directus since the last update.
- Allows users to start a new Netlify build and manage the published deploy directly from within Directus.
Installation:
To install the Directus Extension: dwaring87-publish-netlify, follow these steps:
- Install the node dependencies by running
npm installin the project’s root directory. - Build the app module from source using Rollup. Run the included build script using
npm run build. - Deploy the built app module and API endpoint to the Directus extensions directory.
- Set the
DIRECTUS_EXTENSIONS_PATHenvironment variable to the path of the Directus extensions directory. - Use the included deploy script to copy the appropriate files to the extensions directory.
- Copy
./config.jsto/directus/extensions/endpoints/dwaring87-publish-netlify/config.js - Copy
./directus-endpoint-publish-netlify/src/index.jsto/directus/extensions/endpoints/dwaring87-publish-netlify/index.js - Copy
./directus-module-publish-netlify/dist/index.jsto/directus/extensions/modules/dwaring87-publish-netlify/index.js
- Copy
- Set the
Summary:
The Directus Extension: dwaring87-publish-netlify is a powerful tool for managing builds and deploys of a Netlify site within the Directus app. It provides a user-friendly interface for initiating builds, keeping track of updates, and managing deployed sites. The installation process involves installing node dependencies, building the app module, and deploying the module and API endpoints to the Directus extensions directory. With advanced configuration options available, the extension can be customized to fit specific needs.