Hacker News new | ask | show | jobs
by clone1018 1576 days ago
Generally what happens is a a publisher lets you know its available via a list of WebSub Hubs. Then as a subscriber, your client will pick one or all hubs available and send a request to the hub to get notifications about any updates. The hub then double checks with the subscriber that they'd like to see these updates and that's it until the publisher submits an update. When the publisher has an update, they poke the Hub, the hub downloads the content and shoots it out to all of the subscribers.

For the publisher, it's as easy as including

  Link: <https://hub.example.com/>; rel="hub"
  or 
  <link rel="hub" href="https://hub.example.com/">
in the header of the content.
1 comments

> For the publisher, it’s as easy as including [a link element or header] in the header of the content.

Well, you’ve got to poke the hub as well when changes occur, which makes it moderately incompatible with static site generation, requiring some kind of manual action after you publish, which could be comparatively straightforward if you use a site generator that allows you to define programmable post-publish hooks, or could be difficult if it doesn’t and you publish to something that doesn’t guarantee instant updates.