A partial archive of https://discourse-mediawiki.wmflabs.org as of Saturday May 21, 2022.

Creation of rich cards

giby

Hello,

I would try to create rich cards on my site. I tried to paste some HTLM code in a wiki page, but it was removed.

Is there any way to get it? any plugin?

Thanks in advance for reply.

samwilson

What are “rich cards”?

giby

It is a kind of structured data…
Here is a gallery by google: https://developers.google.com/search/docs/guides/search-gallery

Tgr

You can add HTML by hand if you set $wgRawHtml but it’s generally a bad idea. There are a couple extensions that are slightly safer, like Widgets, HTMLets, HTML Tags… not sure if they are still actively maintained.

Seems like a cool feature though, there should probably be a dedicated extension for it.

samwilson

This seems at its core to be about supporting schema.org structured data in order that search results can be displayed better on Google.

I don’t think the HTML required is any that is banned without $wgRawHtml. For example, have a look at the Event template on Meta.

Tgr

The task for better supporting schema.org is T106650 FWIW (although that was written before search cards were a thing).