All Projects → crgeary → Wp Jamstack Deployments

crgeary / Wp Jamstack Deployments

Licence: lgpl-3.0
A WordPress plugin for JAMstack deployments

Projects that are alternatives of or similar to Wp Jamstack Deployments

Wp2static
WordPress static site generator for security, performance and cost benefits
Stars: ✭ 952 (+328.83%)
Mutual labels:  netlify, wordpress, wordpress-plugin
Netlify Rebuild
WordPress Plugin to trigger Netlify rebuild
Stars: ✭ 19 (-91.44%)
Mutual labels:  netlify, wordpress, wordpress-plugin
Glotpress Wp
🌍 🌎 🌏 GlotPress is a WordPress plugin to let you set up your own collaborative, web-based software translation tool.
Stars: ✭ 205 (-7.66%)
Mutual labels:  wordpress, wordpress-plugin
Bael Template
Brutalist Blog theme for Netlify CMS
Stars: ✭ 187 (-15.77%)
Mutual labels:  netlify, jamstack
List Category Posts
WordPress plugin which allows you to list posts from a category into a post/page using the [catlist] shortcode.
Stars: ✭ 212 (-4.5%)
Mutual labels:  wordpress, wordpress-plugin
Algoliasearch Netlify
Official Algolia Plugin for Netlify. Index your website to Algolia when deploying your project to Netlify with the Algolia Crawler
Stars: ✭ 208 (-6.31%)
Mutual labels:  netlify, jamstack
Gcf
Gutenberg Custom Fields... wait what?
Stars: ✭ 185 (-16.67%)
Mutual labels:  wordpress, wordpress-plugin
Redis Cache
A persistent object cache backend for WordPress powered by Redis. Supports Predis, PhpRedis, Credis, HHVM, replication and clustering.
Stars: ✭ 205 (-7.66%)
Mutual labels:  wordpress, wordpress-plugin
Accelerated Mobile Pages
Automatically add Accelerated Mobile Pages (AMP Project) functionality on your WordPress.
Stars: ✭ 167 (-24.77%)
Mutual labels:  wordpress, wordpress-plugin
Co Cart
🛒 CoCart is a flexible, open-source solution to enabling the shopping cart via the REST API for WooCommerce.
Stars: ✭ 198 (-10.81%)
Mutual labels:  wordpress, wordpress-plugin
Syntaxhighlighter
WordPress plugin that makes it easy to post syntax-highlighted code snippets.
Stars: ✭ 194 (-12.61%)
Mutual labels:  wordpress, wordpress-plugin
Netlify Statuskit
Netlify StatusKit is a template to deploy your own Status pages on Netlify.
Stars: ✭ 216 (-2.7%)
Mutual labels:  netlify, jamstack
Jamstack Serverless
Learn JAMstack Serverless Modern App Development in Baby Steps using Gatsby.js, React, TypeScript, GraphQL, Contentful, Netlify, FaunaDB, MongoDB, Apollo, Github Actions, Project Fugu, and CSS Houdini.
Stars: ✭ 178 (-19.82%)
Mutual labels:  netlify, jamstack
Nginx Helper
Nginx Helper for WordPress caching, permalinks & efficient file handling in multisite
Stars: ✭ 170 (-23.42%)
Mutual labels:  wordpress, wordpress-plugin
Vue Wp Starter
A WordPress Vue.js starter plugin
Stars: ✭ 214 (-3.6%)
Mutual labels:  wordpress, wordpress-plugin
Wp Multi Network
A network management interface for global multisite administrators
Stars: ✭ 168 (-24.32%)
Mutual labels:  wordpress, wordpress-plugin
Classifai
Enhance your WordPress content with Artificial Intelligence and Machine Learning services.
Stars: ✭ 188 (-15.32%)
Mutual labels:  wordpress, wordpress-plugin
Nrkbetaquiz
Require the reader to pass a quiz before being able to comment on an article
Stars: ✭ 202 (-9.01%)
Mutual labels:  wordpress, wordpress-plugin
Wp Graphql Gutenberg
Query gutenberg blocks with wp-graphql
Stars: ✭ 158 (-28.83%)
Mutual labels:  wordpress, wordpress-plugin
Models
WordPress plugin to create custom post types and taxonomies using JSON, YAML or PHP files
Stars: ✭ 167 (-24.77%)
Mutual labels:  wordpress, wordpress-plugin

JAMstack Deployments

A WordPress plugin for JAMstack deployments on Netlify (and other platforms).

Description

This plugin provides a way to fire off a request to a webhook when a post, page or custom post type has been created, udpated or deleted. You're also able to fire off a request manually at the click of a button, or programmatically via a WordPress action.

Screenshots

Settings Screen

Installing the Plugin

Clone the contents of this repository to your WordPress plugins folder and activate the plugin via the installed plugins page.

Configuration

The plugin attempts to trigger builds when you update your content, and has settings that you can use to define what post types & taxonomies should be monitored.

You can access the plugin's settings in WordPress by accessing the 'Settings' panel on the left hand side of the dashboard and then clicking 'Deployments'.

From this screen you can configure the following:

  • Webhook URL - The webhook URL that you have created to trigger a deployment. For more information on webhooks with Netlify visit the Netlify documentation.
  • Webhook Method - This is the required method for the webhook request. The available options are GET or POST. By default the plugin will automatically select POST.
  • Badge Image URL - An optional field to specify the src of a badge, for services that support badges.
  • Badge Link - An optional field to specify the href of a badge, for services that support badges.
  • Post Types - A list of selectable post types that will trigger a Netlify deployment when created, updated or deleted. Note that only selected post types will trigger a deployment.
  • Taxonomies - A list of selectable taxonomies that will trigger a Netlify deployment when created, updated or deleted. Note that only selected taxonomies will trigger a deployment.

If you need more control, there are actions & filters you can use to get the job done.

Post Types

You can choose which posts types should trigger builds from the plugin settings. However, you may require more control, or need to overwrite the settings, you can do so using the jamstack_deployments_post_types filter. By default, this filter contains an array of post types that we monitor. You can add or remove them as required.

For example, if you want to force the plugin to trigger builds for the 'post' post type regardless of the settings, you can do so with the following code:

add_filter('jamstack_deployments_post_types', function ($post_types, $post_id, $post) {
    if (!in_array($post->post_type, $post_types, true)) {
        $post_types[] = 'post';
    }
    return $post_types;
}, 10, 3);

Taxonomies

Like post types, you can choose which taxonmies should trigger builds from the plugin settings. But there may be times you need more control. For this, you can use the jamstack_deployments_taxonomies filter. By default, this filter contains an array of taxonomies that we monitor.

For example, if you want to force the plugin to trigger builds for the 'post_tag' taxonomy regardless of the settings, you can do so with the following code:

add_filter('jamstack_deployments_taxonomies', function ($taxonomies, $term_id, $tax_id) {
    $tax = get_taxonomy($tax_id);
    if (!in_array($tax->name, $taxonomies, true)) {
        $taxonomies[] = 'post_tag';
    }
    return $taxonomies;
}, 10, 3);

Post Statuses

You can use the jamstack_deployments_post_statuses filter to change which post statuses we monitor. The default is to monitor 'publish', 'private' and 'trash'.

Here is an example that adds 'review' to the array of post statuses that we monitor & will trigger builds for.

add_filter('jamstack_deployments_post_statuses', function ($statuses, $post_id, $post) {
    $statuses[] = 'review';
    return $statuses;
}, 10, 3);

Custom Actions

The jamstack_deployments_fire_webhook action can be used to fire the webhook and trigger a build at a custom point that you specify. For example, if you want to fire the webhook when a user registers, then you can use:

add_action('user_register', 'jamstack_deployments_fire_webhook');

Running Code Before & After Webhooks

You can run code directly before or after you fire the webhook using the following actions:

  • Before: jamstack_deployments_before_fire_webhook
  • After: jamstack_deployments_after_fire_webhook

Changing Webhook Request Arguments

You can modify the arguments sent to the wp_remote_safe_* functions using the jamstack_deployments_webhook_request_args filter.

License

GPL-3.0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].