1 of 31

2 of 31

Micropub & WordPress

Custom Posting Applications

Chris Aldrich https://boffosocko.com

WordCamp Santa Clarita Valley April 6, 2019

3 of 31

Twitter

Salad Days

Who remembers the grand days of Twitter's open API?

There were hundreds and hundreds of open apps for posting to it.

4 of 31

How many ways are there to post to WordPress?

  • Admin UI: either Classic Editor or Gutenberg
  • Mobile apps (iOS, Android)
  • Email
  • Google Docs add in
  • XML/RPC clients

5 of 31

Micropub

Definition

is an open API standard (W3C Recommendation) for creating, editing, and deleting posts on websites and is supported by numerous third-party clients and CMSs.

6 of 31

Resources

7 of 31

Supported CMS / Platforms

  • WordPress (via plugin)
  • Drupal (via module)
  • WithKnown (built into core)
  • Craft
  • Jekyll
  • Hugo
  • Kirby
  • Blot

8 of 31

WordPress Plugin

9 of 31

Configuration

10 of 31

Authentication & Authorization

For security it is recommended that you only use this plugin on sites that implement HTTPS.

Supports the full OAuth2/IndieAuth authentication and authorization flow. Defaults to IndieAuth.com.

If you want to use your own site as an IndieAuth endpoint, you can activate the IndieAuth plugin which is recommended but not required.

11 of 31

Supports the following scope parameters requested by Micropub clients

  • post (legacy) – Grants all user delegated access
  • create – Allows the client to create posts on behalf of the user
  • update – Allows the client to update posts on behalf of the user
  • delete – Allows the client to delete posts on behalf of the user
  • undelete – Allows the client to undelete posts on behalf of the user
  • media – Supports media for the media endpoint, but create or update also give media upload permissions

12 of 31

Example Micropub Clients

13 of 31

14 of 31

15 of 31

16 of 31

17 of 31

18 of 31

19 of 31

20 of 31

21 of 31

22 of 31

23 of 31

But wait! There’s more!

Microsub based servers and readers:

  • Monocle
  • Indigenous (iOS and Android)
  • Others forthcoming including Yarns, a WordPress based Microsub server

24 of 31

Developers, Developers, Developers

  • Test suites. Complete client and server test suites: https://micropub.rocks/
  • Diverse network effects. There’s already a diversity of clients and servers for your implementation to interoperate with.
  • User privacy and security. Replace any use of MetaWeblog or AtomPub (which depend on password sharing, often in the clear) with Micropub, which is OAuth-based.

25 of 31

WordPress plugin supports experimental extensions to Micropub as well

  • Post Status – Either published or draft
  • Visibility – Either public or private.
  • Location Visiblity – Either public, private, or protected
  • Query for Post List – Supports query for the last x number of posts.
  • Query for Support Queries – Returns a list of query parameters the endpoint supports
  • Query for Supported Properties – Returns a list of which supported experimental properties the endpoint supports so the client can choose to hide unsupported ones.

26 of 31

Competition can be good

  • Plurality of projects in multiple languages
  • Better UI
  • Innovation
  • Multiplicity of targets: You're not just building and designing for one specific platform, like in Twitter's original case, but now you're creating clients for a massive audience that could potentially include the entire web!

27 of 31

Custom Interfaces

28 of 31

Import / Export

29 of 31

What if Gutenberg were a Micropub application for other platforms?

30 of 31

Additional help and questions?

IndieWeb.org

IndieWeb chat

  • General chat
  • Developer channel

31 of 31

Chris Aldrich

https://boffosocko.com

chris@boffosocko.com