“At first I did adore a twinkling star, But now I worship a celestial sun”

Whilst on a recent holiday to Verona I had the pleasure of snatching a few hours of chat over a drink in the sunshine with Jim Groom, during which he relentlessly argued the case for more use of the WordPress API for syndication and aggregation. I sat down with him loving RSS and FeedWordPress and by the time I stood up, I was converted. Only one glass of wine required.

I’d read his recent blog post about his visit to VCU, and I’ve been following information about the HAX work at Penn State via Twitter and various Apereo colleagues. It all sounded pretty cool, but not something I needed to do more than keep a watching brief on. However, we were chatting about how we’ve woven blogging into our new institutional Web Strategy at Edinburgh* and it all started clicking.

I’d been wondering how we could get a better blend of blogs and institutional website. How could we mash WP and Drupal together in ways that were harmonious and a bit more sophisticated than a link to a blog on an ed.ac.uk domain? Also how could we create institutional blogs but still give people the freedom to have their own personal domains as well? I was planning to rely on FeedWordPress for a lot of this, but as Jim rightly pointed out, there’s quite a bit of setup required, and it doesn’t always run smoothly. We need to be doing better in this space and making it easier.

The more more I started to think, the more I realised we’re also not that far away from what’s required already. We use Drupal to run our institutional website and already have the ‘headless’ concept in place – we use Drupal to edit, but for a few years now we’ve been outputting static HTML copy which takes the strain and allows us to keep the site up even whilst we’re doing Drupal updates.

Jim was explaining how this model could extend to being able to publish from an institutional blog into the institutional website, or even push to your own personal archive too. That would work well for someone like me – I have chosen to blog on my own site so I can be a potty mouth and intersperse reasonably worthwhile content with total idiocy, personal vanity, and whimsy –  but if could blog on a University domain for some of the time, and syndicate a copy into my personal site too, I’d jump in a heartbeat (though I think I’d actually want the copy that goes into my archive to be a full-fat WP post, not static HTML as I want to be able to work with it ongoing).

So now I’m thinking that I (well, not me, people who know how to code proper and stuff) want to build a couple of plugins:

(1) For WP that allow users to push copies of posts to another WP site of their choosing.

(2) For WP that allows a push to the institutional website – maybe into Drupal, maybe as static HTML – work will always still be required to put navigation links in from other Drupal content items (I thought about a pull from Drupal instead, but I think that kind of violates all sorts of ideas about the privacy and ownership of blogging spaces).

It would need some security model to be built into it too – but that should be do-able. I suspect there will always be some end-user config required, but maybe it can be as simple as a url and username/password or some other security token?

On that basis, some links that look useful. At some point I’ll also expand out a couple of use cases in more detail once I’ve thought about it a bit more.

I’d be very grateful if anyone has done this already btw! Please let me know…

REST API Post Embeds

Display WordPress Posts on Another Site with WP REST API

wp_insert_post()

* Our web team have a great blog where you can follow lots of the excellent work they do.

(Sun mosaic at Castelvecchio, Verona. Photo by me, no rights reserved.)

3 thoughts on ““At first I did adore a twinkling star, But now I worship a celestial sun”

  1. Although I still find plenty of uses/reasons for RSS, getting on the API train is just an additional destination.

    The WordPress API will not be terribly complex for your dev team to harness; it offers out of the box a way to get almost any kind of data from wordpress that one might do from internal WP functions, and its presented as structure text you can do anything with anywhere.

    I would avoid any WordPress approaches relying on shortcodes in your content.

    But the door opens for you to have WordPress provide stuff that goes beyond the basic API. I played a little with code to have it deliver random posts (not in API) with the idea a SPLOT Image Collector could be used as a source of images to use in other sites

    http://cogdogblog.com/2018/06/pechasplot-duct-taped-api/

    See you on the train 😉

    1. Thanks Alan! I read this post once by a guy who implored people to change the default category from Uncategorized if they did nothing else. He seemed to know what he was talking about…

      Reading your link has given me another idea for the problem I’m mulling (see https://ammienoot.com/brain-fluff/going-out-of-my-head-thinking-about-headless/ – i.e. how to syndicate blog posts from WordPress into a Drupal site).

      I was thinking along the lines of pushing out from WordPress to other places via the API because that leaves most control with the blog owner, but reading your comments and post it now occurs to me that another way to do it would be to build a widget in Drupal that the blog owner configures with a url and a username/password to their blog (maybe also an option to restrict to specific categories?). Then they can pull in post content via API calls. Control is still with the blog owner as they can always remove the user on the WordPress side that makes it work (was reminded of this via reference to SPLOTs and the way they use a single user).

      So thanks again! This train is turning out to be a fun ride 😉

Leave a Reply

Your email address will not be published. Required fields are marked *