So, I spend a long time trying to set up PESOS for individual silos on IFTTT, specifically Facebook and Instagram, because they are terrible. I’ve got it currently set up to publish my initial post, but no back feed support yet. Also, this is going to wordpress, but it shouldn’t matter (in theory, because all software is terrific in theory)

Since I got a headache, I figured that someone else might get one, so let’s save them the pain and I’ll just post the templates for my recipes webmentions. You’ll need to get an auth token for your micropub endpoint. This IFTTT recipe is set up as a webhook, and the trigger will be your silo. The URL should be your micropub endpoint. Replace all instances of ACCESSTOKEN with your generated token value.

Facebook Status Update:


access_token=ACCESSTOKEN&&content=<<<{{Message}}>>>&h=entry&category[]=facebook

{{Message}} is the message of the contents. Facebook is the category. Remove category[]=facebook if you don’t care about that.

Facebook Photo Post:


access_token=ACCESSTOKEN&content=<<<{{Caption}}>>>&photo[]=<<<{{ImageSource}}>>>&h=entry&syndication=<<<{{Link}}>>>&mp-syndicate-to[]=flickr-bridgy&category[]=facebook 

{{Caption}} is the text of the post. {{ImageSource}} is the URL of the picture. Only use the syndication part if you want your site to link back to your post. mp-syndicate-to[] syndicates the photo to flicker via bridgy. Omit if you don’t use bridgy, or you don’t wish to syndicate.
Instagram Photo Post:


access_token=ACCESSTOKEN&&content=<<<{{Caption}}>>>&photo[]=<<<{{SourceUrl}}>>>&h=entry&syndication=<<<{{Url}}>>>&mp-syndicate-to[]=flickr-bridgy


This is almost identical to above.

Obviously, you probably don't want to just cut and paste. You'll want to look up the micropub documentation.
Anyway, I hope that helps. PESOS is not as good as POSSE, but Facebook decided to lock down writing rights after the scandal with reading rights, so what can we do except being bitter?

Hey there!

So, one of my goals is to make my site as compliant to IndieWeb as possible, but there was one particular protocol that was giving me trouble: delete.

See, the issue is that WordPress doesn’t have a way to distinguish trashed posts versus posts that are no longer available. Buuuuut, I think I found a hacky workaround, involving categories!

The first thing I did was to create a new category, in this case, “deleted”. The actual name doesn’t matter, but I figured that’d be intuitive enough. Then, I faced three issues:

  • Hiding the posts from the main page and blog roll
  • Creating a tombstone page distinct from the 404 page. 404 doesn’t mean 410
  • Setting the status code for the HTTP response to 410

With that said, let’s look at the code.

For the first issue, it’s pretty easy to hide posts, using a filter. I found a tutorial here, and I used a modified version of method 2:

function exclude_category($query) {
if(is_admin()) {
return $query;
}
$query->set( 'cat', '-55' );
return $query;
}
add_filter( 'pre_get_posts', 'exclude_category' );

55 happens to be my category id. Yours will be different, probably. Of note, I experimented quite a bit with the conditions to hide it, because just changing the query across the board would also hide it from the admin page, meaning we can’t quite see the posts we deleted. So, we only filter if we are not on the admin pages using is_admin().

The next part is the tombstone and status code. Fortunately, I was able to modify both in the same place by modifying the template I’m using. At the time of writing, I’m using Autonomie with my own modifications.

Here is the full modified Single Post template:

<?php
/**
* The Template for displaying all single posts.
*
* @package Autonomie
* @since Autonomie 1.0.0
*/

get_header(); ?>

<main id="primary" <?php autonomie_main_class(); ?><?php autonomie_semantics( 'main' ); ?>>

<?php while ( have_posts() ) : the_post(); ?>
<?php if(in_category("deleted")): ?>
<?php status_header( 410, 'deleted' ) ?>
<div class="entry-content e-content" itemprop="description articleBody">
<div class="h-entry">
<time class="dt-updated" datetime="<?php echo get_the_modified_date(); ?>">Removed on: <?php echo get_the_modified_date(); ?></time>
<p class="p-name p-content">
There was a post here. It's gone now.
</p>
</div>
</div>
<?php else: ?>
<?php get_template_part( 'templates/content', get_post_format() ); ?>

<?php
// If comments are open or we have at least one comment, load up the comment template
if ( comments_open() || '0' != get_comments_number() ) {
comments_template( '', true );
}
?>
<?php endif; ?>

<?php endwhile; // end of the loop. ?>
</main><!-- #content -->

<?php autonomie_content_nav( 'nav-below' ); ?>

<?php get_footer(); ?>

The status code is easy to change. Just call status_header( 410, 'deleted' ). For the tombstone, we just need to add a conditional tag to check the category: if(in_category("deleted")):.

Yes, I’m absolutely certain there is probably a better way to handle the tombstone via how WordPress handles templates, but… I’m really, really new to wordpress and PHP, so a hack it is. If this was Sitecore, I’d be all over that. But you know, Sitecore and IndieWeb probably form some sort of contradiction. 😛

Check out the result for the deleted test post I made: Test.

There are still some issues, though. I’ve noticed that deleting a post in this way doesn’t automatically send a web mention, so Bridgy needs to be notified by hand. I’m also unsure if I need to do any additional modifications to my feed.

I’m contemplating actually pulling out all this behavior into its own plugin, to let WordPress handle deletions much more gracefully, including notifying any downstream servers of the removal.

So I decided to start a garden.

I actually started it a few weeks ago, but I figured, hey, why not write about it?

 

In order, we’ve got a window box planted with Sweet Pea flowers (My girlfriend’s favorite) and flowers good for bees and hummingbirds, a grow box made from an old plastic bin growing about four or five potato plants, and a shallow planter with a kidney bean plant and four garlic plants.

I’ve also got a pot full of basil and other common herbs I use in my cooking.

It ain’t much right now, but soon it’s gonna be BIG! My plan is to basically create a balcony garden that can supplement most of our produce needs. Been looking into permaculture techniques to handle this. Granted, permaculture has very limited use in a balcony context, but any techniques that I can apply will be of much use.

The first thing I did was start a composting system! I used a bin that I’ve had lying around for about 7 years, which seems to be perfect for a balcony worm compost system.

Once I had the holes drilled, I obtained about 500 worms from a local supplier. Cost about $20. It should be a one time cost, as long as I don’t manage to kill off the worms. Then we get to the gross part, filling it.

 

It’s mostly kitchen scraps. Old strawberries, veggie scraps, and such for the green. Since I don’t actually get any newspapers, I’m using paper towels, napkins, and used papers for the brown. Not ideal, but hey, the worms seem happy so far.

I’m actually really happy to start composting. Food scraps that go to the landfill break down in an anaerobic environment, resulting in both a slower breakdown, as well as creating a TON of methane, which you’ll probably recall is a far worse greenhouse gas. So, doing this gives me good dirt for the gardens, and reduces my carbon, er, methane footprint.

(Yes, I’m aware that most of the issues with greenhouse gases are due to industry, and the narrative that individuals need to take responsibility is propaganda to shift the blame to us lowly proles, but I don’t think at least avoiding adding my drop of pollution to the ocean of doom is a bad idea)

Anyway, my next step, I think, is to get a couple of micro fruit trees. It would be glorious to be able to walk outside and just grab a fresh peach or lemon.

O