Add custom HTML to "featured posts" page #1485
-
So I'm using the "featured posts" page as my homepage. I need to add custom HTML to the page (to verify the page as mine in Mastodon). How could I do this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @RampantPanda! Verifying your site on Mastodon is the same regardless of what you use for your homepage, and I've implemented it on my own site and Mastodon profile. To do so, copy the Then, in Publii, go to Tools & Plugins > Custom HTML > Body: Paste the code you copied, adding <!-- Mastodon --->
<a rel="me" href="https://mastodon.instance/@username" style="display:none">Mastodon</a> Save the settings, then Sync your website. Go back to your Mastodon Settings Verification page to check whether it was successful (should be pretty quick). If you run into any issues, make sure that the link in your profile matches your site's URL exactly and remove any trailing slashes. The nice thing about this technique is that it will add the verification to every page on your site, which is great for discoverability on plugins like StreetPass for Mastodon or for automatically verifying any other link to a page on your site. If you want the verification to be tied to an existing Mastodon hyperlink/hyperlinked logo image, simply add |
Beta Was this translation helpful? Give feedback.
I've just learned that it may also be possible to create the verification using a
<link>
tag in the<head>
, which doesn't involve having to add inline CSS to hide the link.To do so, go to Tools & Plugins > Custom HTML > Head, and paste the following (changing the
href
value to your profile's link):