diff --git a/zerver/webhooks/wordpress/doc.html b/zerver/webhooks/wordpress/doc.html deleted file mode 100644 index 6275afd094..0000000000 --- a/zerver/webhooks/wordpress/doc.html +++ /dev/null @@ -1,131 +0,0 @@ -

- See WordPress.com blog notifications in Zulip! -

- -

- This integration works with WordPress.com blogs. -

- -

- Support for self-installed blogs using software from - WordPress.org and the - HookPress plugin is experimental. For more details on the two, please see the - WordPress.com support page about - the difference between WordPress.com and WordPress.org. -

- -

- The destination stream for your WordPress notifications must already exist. The - default stream is wordpress. Some actions are only available for self- - installed blogs. For a complete list of supported action types, please see the table - at the bottom of this page. -

- -

- Configuration -

- -

- To configure a new webhook from WordPress, go to the Webhooks page in the - Settings section of your blog dashboard and click Add webhook. -

- -

- -

- If you have trouble locating the correct page on WordPress.com, you can reach - it by manually typing the url in your browser address bar as in this example: -

- -

- https://yourblogname.wordpress.com/wp-admin/options-general.php?page=webhooks -

- -

- Select the hook type action and the specific action that should trigger - this webhook notification. This example uses publish_post, which is triggered - when a new blog post is created. -

- -

- The Zulip WordPress integration uses the fields post_title, post_type, - and post_url for a publish_post action, so select those three fields in - the list. -

- -

- Next, enter the URL for the Zulip endpoint, specifying your desired destination - stream and topic. Construct your URL like this for a WordPress.com blog: -

- -

- {{ external_api_uri_subdomain }}/v1/external/wordpress?api_key=abcdefgh&stream=wordpress&topic=New%20Posts -

- -

- and like this for a self-installed blog: -

- -

- {{ external_api_uri_subdomain }}/v1/external/wordpress?api_key=abcdefgh;stream=wordpress;topic=New%20Posts -

- -

- The parameters are as follows: -

-

- -

- - Important: the HookPress plugin requires parameters delimited by - semicolons. If you have a self-installed blog, separate parameters with ; - instead of &. - -

- -

- -

- -

- When you are done, your configured webhook should look like this: -

- -

- -

- -

- When a new post is published, a message is created in the specified Zulip stream - and topic. -

- -

- -

- -

- Congratulations! You're done!
-

- -

Types of Actions

- -

- To configure other actions, choose a supported action from the dropdown list and - select the appropriate fields. -

- -

- - - - - - -
ActionRequired FieldsBlog Type
publish_postpost_title, post_type, post_urlBoth
publish_pagepost_title, post_type, post_urlBoth
user_registerdisplay_name, user_emailSelf-installed
wp_loginuser_loginSelf-installed
-

- diff --git a/zerver/webhooks/wordpress/doc.md b/zerver/webhooks/wordpress/doc.md new file mode 100644 index 0000000000..ae7462b392 --- /dev/null +++ b/zerver/webhooks/wordpress/doc.md @@ -0,0 +1,84 @@ +## WordPress + +See WordPress.com blog notifications in Zulip! + +Support for self-installed blogs using software from +[WordPress.org](http://wordpress.org) and the +[HookPress plugin](https://wordpress.org/plugins/hookpress/) +is experimental. For more details on the two, please see the +WordPress support page about +[the difference between WordPress.com and WordPress.org][1]. + +[1]: https://en.support.wordpress.com/com-vs-org/ + +Some actions are only available for self-installed blogs. For a +complete list of supported action types, please scroll to the +bottom of this page. + +{!create-stream.md!} + +{!create-bot-construct-url.md!} + +{!append-topic.md!} + +***Important:** the HookPress plugin requires URL parameters to +be delimited by semicolons instead of ampersands. If you have a +self-installed blog, separate parameters with `;` instead of `&`.* + +### Configuration + +To configure a new webhook from WordPress, go to the **Webhooks** +page in the **Settings** section of your blog dashboard and click +**Add webhook**. + +![](/static/images/integrations/wordpress/wordpress_hookpress.png) + +If you have trouble locating the correct page on WordPress.com, you +can reach it by manually typing the URL in your browser address bar +as in this example: + +`https://yourblogname.wordpress.com/wp-admin/options-general.php?page=webhooks` + +Select the hook type **action** and the specific action that should +trigger this webhook notification. This example uses **publish_post**, +which is triggered when a new blog post is created. + +The Zulip WordPress integration uses the fields **post_title**, +**post_type**, and **post_url** for a **publish_post** action, +so select those three fields in the list. + +Next, for a WordPress.com blog, enter the URL created above for +the Zulip endpoint, making sure that the parameters in the URL +are delimited by `&`. + +For a self-installed blog, enter the URL created above for the +Zulip endpoint, making sure that the parameters in the URL are +delimited by `;` + +![](/static/images/integrations/wordpress/wordpress_configure_url.png) + +When you are done, your configured webhook should look like this: + +![](/static/images/integrations/wordpress/wordpress_config_done.png) + +{!congrats.md!} + +![](/static/images/integrations/wordpress/wordpress_post_created.png) + +### Types of Actions + +To configure other actions, choose a supported action from the +dropdown list and select the appropriate fields. + +* publish_post + * **Required Fields**: post_title, post_type, post_url + * **Blog Type**: Both +* publish_page + * **Required Fields**: post_title, post_type, post_url + * **Blog Type**: Both +* user_register + * **Required Fields**: display_name, user_email + * **Blog Type**: Self-installed only +* wp_login + * **Required Fields**: user_login + * **Blog Type**: Self-installed only