Jetpack: automatically add hashtags to posts shared to Mastodon

Do you use the Jetpack plugin and its Social feature, or the Jetpack Social standalone plugin? Are you active on Mastodon? This little tip is for you!

My WordPress story

WordPress is turning 20 this week. WordPress is such a big part of my life, I must join in and celebrate.

WordPress: how to add a default title to your posts

This came up on the Fediverse: @[email protected] wanted to automatically add titles to the posts on his microblog.

This automation would have to be compatible with all the editors, including the mobile app.

How to add a Mastodon icon to your WordPress site

Following yesterday’s post, I’d like to do a bit of a follow-up. Sometimes you “just” want to add a Mastodon icon to your site, linking to your Mastodon profile:

I have one just like that on my home page, alongside my other Social Media links.

In this post, I’ll cover 3 different ways to add such an icon to your site.

Share your blog posts on Mastodon with Jetpack

After dipping my toes into the Fediverse for the past few months, I wanted the Jetpack plugin to be there to help bloggers who wanted to interact more with the Fediverse on their sites.

Jetpack includes Sharing buttons that can be handy for your readers to quickly share your posts to their Social Network of choice ; adding a Mastodon button seemed like a no-brainer!

Mention other ActivityPub users right inside your WordPress blog!

If you’re actively blogging on WordPress and have been playing with Mastodon et al. in the past few months, you probably came across the ActivityPub plugin for WordPress.

The plugin implements the ActivityPub protocol for your site. It allows others to follow your blog from their Mastodon / Pleroma / GoToSocial account. If they reply to one of your blog’s posts there, their reply will be posted as a comment on your blog.

This is already pretty neat! But starting today with the release of version 0.16.1 of the plugin, you can even mention other ActivityPub users in your posts. When you hit Publish, they’ll be notified of your post inside their client of choice.

WordPress as Social Media?

I’m re-publishing a conversation I had a few days ago on the Fediverse, following an excellent question from Phil Johnston:

If you’re a WordPress person who publishes more on social media than on your WP site (sadly this is still currently me), does that say anything about WordPress?

Phil Johnston (@[email protected])

I felt compelled to reply, as I’ve struggled with some version of this question myself for years. Fair warning, I’m heavily involved with WordPress, so my answer is quite biased :)

I am heavily involved with WordPress, yet I don’t post that often on this site.

What does this say about WordPress?

Jetpack: remove External Media from the block editor

The Jetpack plugin comes with a number of blocks and editor extensions. One of those features extends the existing Media blocks, and adds an option to find and upload images from Google Photos or Pexels:

While this can be super useful when you use Google Photos or need to find free stock photos for your posts, you may sometimes prefer to only see the default “Media Library” option.

Playing with time intervals in WordPress

I’ve recently had to think about calculating time intervals in a little WordPress plugin of mine, and I thought I would share my findings. Maybe some of you will have some ideas on how to improve things even further :)

SVN and @ characters: peg revision is not allowed here

This has got me stuck a few times in the past few months so I thought I would write this down and get this committed to memory, once and for all!

When working with SVN and trying to add or remove a file that includes the @ to your working copy, you will run into a peg revision is not allowed here error:

svn rm modules/sharedaddy/images/[email protected]
svn: E200009: 'modules/sharedaddy/images/[email protected]': a peg revision is not allowed here

That is because SVN uses the @ symbol as a way to determine a specific revision, like so:

svn info readme.txt@2021803
Path: readme.txt
Name: readme.txt
URL: https://plugins.svn.wordpress.org/jetpack/trunk/readme.txt
Relative URL: ^/jetpack/trunk/readme.txt
Repository Root: https://plugins.svn.wordpress.org
Repository UUID: b8457f37-d9ea-0310-8a92-e5e31aec5664
Revision: 2021803
Node Kind: file
Last Changed Author: jeherve
Last Changed Rev: 2021532
Last Changed Date: 2019-01-29 22:57:37 +0100 (Tue, 29 Jan 2019)

To work around that, all you need to do is add an @ symbol at the end of the filename, like so:

svn rm modules/sharedaddy/images/[email protected]@
D         modules/sharedaddy/images/[email protected]

Problem solved!