Cross publishing to

How to publish your content to from - hopefully

O brother where art thou?

I don't know where you will read this, but I would like to tell the story about how this very content came about.

Right now, I am writing in the editor of trying out the plugin I wrote. If everything goes to plan, you will read this post as a guide on what I did while at the same time it is the first live test of the functionality itself.

A little backstory is a project facillitating content distribution as a hybrid CMS capable of

- decoupled CMS

- coupled CMS

- headless CMS

This effectively means that it ships with a frontend, a RESTful API and webhooks. What it can't do is formatting the webhook in order to target particular APIs. As with all headless CMS' it expects the endpoints to be under the control of whoever wants to publish content at a certain website or app. Unfortunately, this is simply not the case with ( At least right now, dear team: with the successful funding round in mind, do you need any additional developers? ).

The solution

The idea is pretty simple: what if a plugin received the webhook, transformed the request according to the api specs of and then sends it on? ---> webhook to --->

The prerequisites are quite simple, I needed to convert html into markdown ( shoutout to "the league" ) and then simply restructure the payload to the format. But three things bothered me. First, I did not want to rely on the events of (created, updated, deleted) as I wanted to acount for edge cases (like what if you install the plugin to your instance and update articles that exist there but not yet on The second problem was finding a way to reliably match articles on with articles on Thankfully, the article object of contains a store object where I could simply save the ID. This solves for both of the problems as I know now 

a) which article is already exists at ( and therefore needs to be updated rather than created ) and 

b) how to reliably identify the relationship between the ID and the ID.

But what about security? The last problem was that I effectively created an endpoint where anybody can send an object in the right format to the plugin endpoint and that object will be published to in my name. Well, when setting up the webhooks in, I have the ability to set up a token. So for now, I use a combination of the `neoan3 credentials` operation and the token to ensure that only my articles are processed. But of course, this means that this plugin can only be used by one user of the installation (here me).

In order to securly facilitate plugin use like this changes to the way stores tokens needs to be revisited, and as usual, help is appreciated ( However, a good solution would go a long way as it opens up the possibility for a wide range of self-contained plugins for


If you are interested in the progress:

neoan @neoan

786 readers
Keywords api php
On topic

Install PHP 7.4 on Ubuntu

Finally PHP 7.4 is out! You have read about the new features, you have followed externals, you have gathered ideas on how new capabilities will save time. Let's get it running.

Static content pages - still the fastest web-experience

Tutorial: How to utilize to generate static content for your website.

Scaffolding REST APIs with JWT authentication

Ever had the need for your own backend while developing your web-app?

Git: globally change GitHub-remotes from git@ to https

Does your IDE or composer set remote repositories to ssh rather than https? Or are repositories you are using set up that way? You are not alone. Let's fix it once and for all!

VueJS & neoan3: a love story.

Setting up neoan3 to play nice with Vue isn't hard. Here is how the two frameworks are combined to support fast, dynamic and rapid development.

Install PHP 8 on Ubuntu

PHP8 has finally been released and it is FAAAAST! Time to update.

SEO strategies for

How to get your content listed where you want it to.

MySQL: ERROR1364 fix

The painful realization of why people use containers. PHP SDK

Create your own blog.

How to Build an Express App in Node That Reads From a Headless CMS

A headless CMS lets you design your own front-end, sometimes your own back-end. Let's set up a small application to get us started. Beginner friendly. Approx. 20 min. to reproduce / follow along

MySQL in PHP - how to deal with databases

How I handle MYSQL database transactions in PHP

How to install global npm packages without sudo on Ubuntu

Running npm on a server can be painful. Privileges are there for a reason, and so is sudo. Running npm with sudo is not the solution.

Transformer - falling in love with PHP's magic methods all over again

PHP's magic functions have been around for a long time. But there were always good reasons to avoid them. Transformer is a practical and reliable way to make use of the most common operations we program: CRUD operations.

What is composer?

Composer has become PHP's package & dependency manager. Why you should use it.