movim / movim

Movim - Decentralized social platform
https://movim.eu
GNU Affero General Public License v3.0
1.73k stars 251 forks source link

Add Microformats2 markup to public feed #393

Closed dissolve closed 7 years ago

dissolve commented 7 years ago

Most of the independant social media (Friendica, Mastodon, Known, Micro.blog, GnuSocial, Hubzilla, etc) all publish their html with microformats2 markup so that its easily processed by others.

http://microformats.org/wiki/microformats2 There are a number of parsers listed on that page as well

But for the common social web understanding of them, its best to look at http://indieweb.org/h-feed and http://indieweb.org/h-entry

edhelas commented 7 years ago

All the public Movim feeds can be exported to Atom XML feeds https://nl.movim.eu/?feed/pubsub.movim.eu/Movim . Is his format an IETF one? I prefer to stick to Internet standards and not use some indie protocols and formats for now (especially regarding the support/breaking compatibility…)

dissolve commented 7 years ago

Microformats is referenced by the HTML spec as well as several other W3C specs. I believe it has recognized h-entry and h-card and a few others in normative references as a living spec now too.

It doesn't conflict with Atom, it just gives significantly more fidelity. Plus its just a matter of adding html classes.

aaronpk commented 7 years ago

Adding Microformats makes the W3C Webmention protocol super useful. For example, here are a bunch of my replies to posts on all sorts of different social networks, all because they support Microformats and Webmention: https://aaronparecki.com/replies?before=20170522T074418%2B0200

edhelas commented 7 years ago

Is it similar to OpenGraph tags?

aaronpk commented 7 years ago

No, it goes inline in the HTML, so that you don't have to duplicate content.

e.g. instead of

<div>
  <h2>Post Title</h2>
  <p>Blog post content here</p>
</div>

you add classes like:

<div class="h-entry">
  <h2 class="p-name">Post Title</h2>
  <p class="e-content">Blog post content here</p>
</div>

and then when you run a parser against the page, it turns into:

        {
            "type": [
                "h-entry"
            ],
            "properties": {
                "name": [
                    "Post Title"
                ],
                "content": [
                    {
                        "html": "Blog post content here",
                        "value": "Blog post content here"
                    }
                ]
            }
        }
edhelas commented 7 years ago

Mhhh ok, so adding classes everywhere in the content :/ I'll have a look but not sure if I want to put those things in the views.

edhelas commented 7 years ago

I'm closing this ticket, after having another look at your specification I'm not planning to integrate it in the views of Movim.

sjehuda commented 3 weeks ago

@dissolve and @aaronpk

I raise the following arguments and ask the following questions with sincerity, so please pardon me if they appear to be rude.

Dynamic HTML

First of all, the interface of Movim ris not a of static HTML and it requires Javascript to be rendered, so I think that this request is irrelevant for dynamic HTML pages.

Movim already offers Atom Syndication Format feeds and also XMPP PubSub feeds.

Atom and XSLT

Generally, I would ask, both of you, why do you promote and campaigning for Microformats2 instead of campaigning for Atom Syndication Format AND XSLT?

I do not judge and I CAN NOT judge anyone, yet it seems to me, that you, and your friends from those offices that attempt to determine standards, knowingly or unknowingly, are promoting an inferior format/standard (or deliberately ignoring Atom?) and consequently attempt to eradicate good technology such as Atom.

A good and robust format (Atom Syndication Format) already exists, and also XSLT.

People can easily make use of Atom with XSLT stylesheet and have a complete and dynamic HTML site without even a single line of HTML. As a lawyer with no technical education nor training, it took me less than 14 days to build my frist XSLT stylesheet for Atom and RDF.

At the last 14th of August, I have conveyed a presentation of a project which is inspired by Movim and has no single HTML code, rather it delivers only XML files in the form of Atom Syndication Format (thank you, edhelas, for explaining to me about the importance of Atom, over and over) and using an XSLT stylesheet in conjunction with ECMAScript, it builds, at the sole expense of the client-side, a complete and browse-able site.

See https://mov.im/node/pubsub.movim.eu/berlin-xmpp-meetup/schimon-presents-blasta-a-pubsub-bookmarks-system-and-rivista-a-pubsub-dynamic-iGbveu

If some people would decide to eradicate XSLT from client-side, which is not likely to occur, albeit some browsers already sabotage XSLT too, I have prepared server-side code for that day too.

Conclusion

So I ask you, again, why Microformats2 instead of Atom and XSLT?