opengraphlogo

I make use of Jetpack for this blog in order to add some pretty handy functionality, cross posting to my silo accounts, commenting, and OpenGraph.

Unfortunately, I had to make a couple of tweaks in order to get Opengraph working correctly.

This info is dotted around t’internet, but as an aide-mémoire, I figured I’d consolidate here.

OpenGraph headers not showing

To start, I had to get the OpenGraph headers to show in the first place. This required me to make a minor modification to the code of the plugin, not exactly desirable, but good for the moment.

Basically, Jetpack has a list of plugins that it conflicts with, and if one of those plugins is running, then it disables certain features. Unfortunately, I was running one of these plugins.

I didn’t want to disable the plugin, but after reviewing the code, I figured I wasn’t making use of the conflicting functionality (namely Opengraph, and two sets of opengraph headers is known to cause problems), so I removed the plugin from the list.

This list is found in $conflicting_plugins, which can be found in the function check_open_graph() in the file class.jetpack.php. Comment out the appropriate line at your own risk.

Missing/default open graph image

Next, I wanted to provide a default image for situations when the I don’t have a featured image in the post. This required a slight modification to my theme’s functions.php, as described here and here.

Showing your twitter user instead of @jetpack

Finally, I wanted to use my own twitter handle (@mapkyca) for the twitter card, instead of the default @jetpack.

This was another quick addition to my functions.php, e.g.

See this discussion for details.

Markdown-mark.svg

Markdown is a text based markup language, which provides a quick way of editing posts as readable plain text, but have them simply rendered into formatted HTML.

I routinely use Markdown to create posts on this blog, and also use it to create readme files for github plugins. I thought it’d be handy if long form posts on Known could also have this functionality, so I wrote a very quick plugin that adds it.

Hope this will be useful!

» Visit the project on Github...

I’ve been using my post via email plugin to post messages on my feed for a while now.

Fairly recently I added syndication support, which is very handy for posting messages to my silo followers. However in day to day usage, I found the subject line only approach was a little clunky, and I often forgot to add the syndication tags.

So, I added support for syndication tags in the message body as well. These tags will be stripped automatically from the post text, so they won’t appear in the post.

» Visit the project on Github...