getzola / zola

A fast static site generator in a single binary with everything built-in. https://www.getzola.org
https://www.getzola.org
MIT License
12.96k stars 919 forks source link

[Feature Request] XMPP: Post to PubSub #2475

Open sjehuda opened 2 months ago

sjehuda commented 2 months ago

Greetings!

In XMPP, using PubSub(1) (XEP-0060), it is possible to store posts as Atom Syndication(2) entries into XMPP(3).

There are several XMPP extensions that apply it, namely XEP-0227 (4) and XEP-0472 (5) which make node urn:xmpp:microblog:0 as a common choice to manage news for client accounts (e.g. blog@getzola.org), yet a component account (e.g. pubsub.getzola.org) may use all of its nodes for this purpose.

pubsub.getzola.org/
|
|-- updates/
    |-- Sombre
     `-- Varied
|-- releases/
 `-- events/
pubsub service/
|
|-- node/
    |-- item
     `-- item
|-- node/
 `-- node/

A Rust library that can be utilized would be xmpp.rs.

I have made a script that realizes viewing PubSub node items as Atom XML feeds over HTTP.

XEP-0060: Publish-Subscribe RFC 4287: The Atom Syndication Format Atom Over XMPP XEP-0277: Microblogging over XMPP XEP-0472: Pubsub Social Feed XMPP in Rust PubSub Over HTTP

Keats commented 1 month ago

What does this mean in practice for Zola?

sjehuda commented 1 month ago

It means two (or three) things that I can think of:

The following pages display*** PubSub node items on the XMPP network Phoronix and PlanetJabber. These posts are stored (i.e. published) on an XMPP server on a PubSub service "news.movim.eu", one at node "Phoronix" and the other on node "PlanetJabber".

* By publishing to XMPP, people can receive "push" updates to their account, and it is also possible to make posts selectively accessible to certain people (i.e. Jabber ID) which are white-listed for a given post. ** Incorporation of chat with PubSub reduces the need of having an Atom/RSS bot that would constantly scan for updates. *** I deliberately do not use the word "contain" because pages Phoronix and PlanetJabber are generated by Movim which also acts as a proxy XMPP<->HTTP.


An additional note about PubSub

Making published posts available on XMPP, van be either on a dedicated PubSub service (i.e. "news.movim.eu") or either on a Jabber ID (i.e. "keatas@movim.eu") or even both, which means that it is possible to associate your Zola publication with your account which means as follows:

Case 1 In case Schimon is subscribed to the PubSub node of "keatas@movim.eu", he will receive the update instantly.

Case 2 In case Schimon is not subscribed, he will see an indication of a new post which Keats has, the next time he opens a chat with Keats or view the contact row of Keats in his roster (contact list).

This is probably the most important aspect of Zola (or any other CMS) posts as PubSub being associated with ones account, because it creates rapport and also make your publication in the same spot where your account is, instead of having a Jabber ID (XMPP) and an HTML site (HTTP), usually on two different places.

Also notice that Keats - by himself, "in flesh" - did not ask or notify Schimon that he has made an interesting post; Schimon was notified only by his XMPP client software.