Fediverse Creator meta tag

Mastodon is adding a feature to allow people to include their fediverse handle on blogs and articles, to get them to display specially in the link card on Mastodon. (It’s currently in beta and requires manual review by the mastodon.social team to turn on, which ug, hate that, but…) You can read about it here: Highlighting journalism on Mastodon - Mastodon Blog

It says to include <meta name="fediverse:creator" content="@Gargron@mastodon.social" /> in your page’s head, so I go to the site configuration in the admin panel (or the site config file, either or) and I add my information (either in the two fields via the admin panel, or as 'fediverse:creator': '@deathkitten@ibe.social' in the site.yaml) and it shows up in the header of my page as <meta property="fediverse:creator" content="@deathkitten@ibe.social" /> using property instead of name.

Is there any way to get it to use name instead of property as it should?

It depends how you set your meta tags. Based on the template, It can be any or all of:

  • name
  • http_equiv
  • charset
  • property
  • content

I’m literally just setting it in site.yaml (tried both via the admin panel and directly editing the file in a text editor), I haven’t made any changes to templates related to meta tags.

Looking at the file you linked, it’s not clear to me how it decides which to use in the meta tag.

How do you set it in site.yaml?

There is a section for metadata, and you add a line just like I quoted in my first post: 'fediverse:creator': '@deathkitten@ibe.social' and it plugs it into that template you linked and spits out the meta tag and places it in the header of the page.

My whole problem is that template looks at the information I put into the config and decides that the first piece of data should be in a property attribute instead of a name attribute like it should be.

I am trying to understand why it’s getting that wrong and how to fix it.

Try:

metadata:
  fediverse:
    creator: "@deathkitten@ibe.social"

It seems Grav has hardcoded logic for keys that contain : (semicolon) - it forces them as property

But if you resave it in Admin, it’ll mess things up again
I’d suggest to report this to Grav Github repo as an issue

Okay, that’s getting us closer? It put <meta name="fediverse:creator" property="fediverse:creator" content="@deathkitten@ibe.social" /> into the header of my page. Since the feature is still in beta on mastodon and doing the ask to be opted in nonsense, I don’t know if that’ll fly or break in their system yet. I might email them and ask.

I’ll go fill in the issue on github in a bit, I was just headed out the door to run some errands.

Following up, I submitted the issue. (Posting here in case anyone else finds this thread at a later date with a similar issue.)

1 Like

See reply to Github issue