atomicules

Push propelled program tinkerer and picture maker.

Redirecting From Http To Https With Bozohttpd

Following on from the previous post: I'm so slow/dumb sometimes. Of course it's possible to redirect http requests to https with Bozohttpd, the very fact I'm running two instances of this makes this possible.

For the httpd (non-https) instance configure it with a different virtual root directory, e.g:

httpd_flags="-S bozohttpd -v /var/www/vredirectroot -M .html 'text/html; charset=utf-8' '' '' -M .xml 'text/xml; charset=utf-8' '' ''"

Then within that directory create the virtual host directory so you have a path like so:

/var/www/vredirectroot/atomicules.co.uk

And then within that directory just place a .bzabsredirect file:

sudo ln -s https://atomicules.co.uk .bzabsredirect

Restart that bozohttpd instance:

sudo /etc/rc.d/httpd restart

And "hey presto!" it works.


[EDIT: 2017-07-31] Spoke too soon. It's too simplistic. It redirects just the path with the .bzabsredirect file is. So although http://atomicules.co.uk/ merrily redirected to https://atomicules.co.uk an existing blog post like http://atomicules.co.uk/2017/13/32/somepost.html just 404s. Poop. Ok, I think I'll have to go back to duplicating http and https again for the time being otherwise I'll break a load of links - well a handful. One thing .bzabsredirect will work for is redirecting www.atomicules.co.uk on it's own, I'd just left that broken for now. I might take a look at HAProxy as I'm not moving off Bozohttpd.

Now Serving Https As Well

Since it's 2017 and that; Didn't want to rush into this. Thought I should finally enable TLS/SSL since it's free. I'm not sure I entirely agree with the arguments for a site like mine (wouldn't metadata be the biggest problem?), but it's pointless trying to argue against the tide; One thing though: Zscaler, anyone who has had to browse through that realises that TLS/SSL isn't bulletproof. I understand why that exists as a product, but, gah, as an end user it's just horrible.

The EFF site will guide you down the certbot-auto route for NetBSD, which is silly as there is a py27-certbot package - just use that.

Bozohttpd works fine with Let's Encrypt, the only issue is that it either serves https OR http, unfortunately not both at the same time. I haven't yet figured out a way to redirect traffic between ports so that's meant I'm effectively running two webservers at the moment as per this rc.conf approach. I.e:

  1. Duplicate /etc/rc.d/httpd to /etc/rc.d/httpsd.
  2. Edit and make sure to change name to httpsd and command so command is explicitly calling /usr/libexec/httpd
  3. Add a $procname=$name line (otherwise it'll get confused between httpd and httpsd and think they are the same).
  4. Change required_dirs to $httpsd_wwwdir
  5. In rc.conf have both a httpsd=YES and a httpd=YES

Then I have the following entries in rc.conf for http:

httpd_flags="-S bozohttpd -v /var/www/vroot -M .html 'text/html; charset=utf-8' '' '' -M .xml 'text/xml; charset=utf-8' '' ''"

Whilst httpsd has these extras:

-Z /usr/pkg/etc/letsencrypt/live/atomicules.co.uk/fullchain.pem /usr/pkg/etc/letsencrypt/live/atomicules.co.uk/privkey.pem -z 'EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;'

The ciphers as advised here.

Since running two webservers isn't ideal I think I'll ultimately have to redirect all traffic with the firewall (or run a proxy I suppose?), but that is going to have to wait until I perform some server maintenance and finally switch from IPFilter to NPF (which I should be able to do now I'm running on KVM).


[EDIT: 2017-07-30] Note: It's advisable to set procname in both /etc/rc.d files. I think otherwise the start up order matters (god knows how it gets confused, but I found setting procname in both worked).

Site Performance Improvements

I just couldn't resist the temptation of trying to get my Speed Index below the magic 1000 number*.

The first efforts I made were eliminating any external requests where possible; in fact, I'd already started making a few tweaks as a result of Jacques Mattheij's Fastest Blog post. The rest were made after testing on WebPageTest.

Changes made:

  • Hosted the Creative Commons image, used in the footer, locally.
  • Used my own search form, still passing off to DuckDuckGo, as opposed to using their iframe.
  • Provide gzipped versions of all files; And that is as far as I can go with my webserver, Keep-alive and Caching are not an option.
  • Moved styles inline; much to my chagrin it does improve things. Fortunately it is still just as easy to manage from my point of view as I've just moved the file from /styles to /_includes.
  • Moved the Google Web Fonts stylesheet to a <link> instead of using an @import; I'm not getting rid of Web Fonts as I don't want to be ugly, plus it'd be a crime not to use Vernon Adams' fonts.

Of course, I'm not really sure there is a lot of point in making a site that no one reads really fast to load, but nevermind.

* - This is with the default US server test though, so I imagine faster still from the UK, but I'm still not very mobile friendly; I care far more about Elinks than mobile browsers.

Indieweb - Automatically sending webmentions

In crowbar-ing in webmentions I realised that the syndication code I'd written need overhauling if I was ever going to support more than u-in-reply-to. In fact, so much so that the code in my note syndication post is now obsolete; rather than looping through the posts in the syndication method of each syndication class instance I'm doing the looping just once in the Rakefile and calling the correct syndication class as required.

That overhaul was time consuming and explains the lack of posts here this month - I've spent most of my time doing behind-the-scenes work - but things are much cleaner now; although as ever, there is always room for improvement: I am still only webmentioning u-in-reply-to, but it will be easier to add it in for other uses of webmention.

In the Rakefile, when looping through posts, I do this when I come across a new link post since last deploy date:

case yaml["type"]
    when "link"
        post_data["link"] = yaml["link"]
        @posse_pinboard.syndicate(post_data)
        #For the time being webmentions are only sent for link type posts that have this key
        if yaml.has_key?("u-in-reply-to")
            @webmention.send(post_data)
        end
    when "photo"
        #Different things
    #And so on
end

Simple. The actual sending of the webmention is just as easy. I'm using Nokogiri to find the webmention endpoint (As far as I know it will only ever be on link element):

def find_webmention_endpoint(post_url)
    #Should cache these? Probably not worth it.
    page = Nokogiri::HTML(open(post_url))
    webmention_link = page.xpath("//link[@rel='webmention']")
    if webmention_link.empty?
        fail NoWebmentionEndpoint
    else 
        begin
            #Should be only one. I guess it's always on a link
            webmention_endpoint = webmention_link[0][:href]
        rescue
            #Something bizarre going on
            fail NoWebmentionEndpoint
        end
    end
end

And lastly, sending the webmention is as easy as:

res = Net::HTTP.post_form(webmention_endpoint, 'source' => post_data["my_post_url"], 'target' => post_data["link"])

Just in case you've forgotten: my Jekyll Indieweb repository

RE: Testing Receiving Webmentions

Testing my cobbled together code for automatically sending webmentions. For the time being it is only for things I've marked as being u-in-reply-to. I need to overhaul my code to cover other uses for webmentions.

Testing Receiving Webmentions

This is pretty much a test post so I have something to target as I work on implementing support for automatically sending webmentions on deploy and (obviously) receiving webmentions via webmention.herokuapp.com; I'm far more bothered about being able to automate sending webmentions than I am about receiving them, but from a practical standpoint I can't do one without the other.

I've decided to go with Voxpelli's service in the first instance to make my life easier. I may ultimately write my own and properly host my own webmentions receiver; I have horribly tempting thoughts to see what I can achieve with Lua and Bozohttpd.

Some very brief thoughts on webmention.herokuapp.com

to try to flesh out this post a bit

  • It is graciously provided for free and takes all of a second to implement so I have no rights to complain at all, but...
  • It requires Javascript to display mentions. I do use Javascript on my Archive page, but in general I'm trying to be Javascript free (purely because I'm the biggest user of my website and I use Elinks a lot).
  • There's no administration functionality, such as being able to review webmentions before allowing them to be posted or deleting spam webmentions.

Yet more Indieweb syndication - Notes

Since adding syndication of link posts to Pinboard I've added syndication of photos to Flickr (in theory, since I'm still waiting to get last years' films developed I can't use it yet) and notes to Twitter. I wasn't sure about doing notes to Twitter as I don't really want the clutter on my site, but I've decided to take the same approach as I have with Pinboard: I can tweet via my website, but I don't have to.

I'll not talk about the Photo syndication as it's not so interesting; it was all made pretty easy with the Flickraw gem. The Twitter stuff is a bit more interesting because I wanted to make the experience as frictionless as possible; still pretty easy thanks to the twitter gem.

In the Pinboard syndication post I cheated and just linked to the repository, but I'll try and talk through this one a bit more. So not in the order that I wrote the code, but in an order that kind of makes sense:

I have a rake task that handles POSSEing to Twitter.

task :posse_twitter do
    date = File.open("_deploy_date", &:readline) 
    netrc = Netrc.read
    token, secret = netrc["twitter.com"]
    puts "--> Looking for note posts to syndicate to Twitter"
    posse_twitter = Jekyll_syndicate_twitter.new(token, secret, date)
    posse_twitter.syndicate()
    #Above should fail if no posts found, hence re-build below will only occur if changes made
    Rake::Task["build"].invoke
    Rake::Task["deploy"].invoke
end

This reads a file called _date_deploy from the top of my Jekyll site directory. It's a text file that contains one line only: the date and time that I last deployed my site. I store my user/access token and secret in a .netrc file (the actual application/consumer token and secret in a _flickr_app file). This rake task then creates a new instance of a Jekyll_syndicate_twitter class and calls the syndicate method on it:

class Jekyll_syndicate_twitter

    def initialize(token, secret, date)
        @date = date
        @twitter = Twitter::REST::Client.new
        #The actual key and secret are stored with the app in a file called...
        twitter_app = YAML.load_file("_twitter_app")
        @twitter.consumer_key = twitter_app["consumer_key"]
        @twitter.consumer_secret = twitter_app["consumer_secret"]
        #Assumes authentication has already taken place
        @twitter.access_token = token 
        @twitter.access_token_secret = secret
    end


    def syndicate
        note_posts = find_posts_since("note", @date)
        note_posts.each do |filename, title|
            #Does stuff, we'll get to this later
        end
    end
end

This is fairly simple because the gem does all the hard work. The initialize method just handles creating a new Twitter client given all the correct tokens and secrets. The syndicate method finds all new note type posts since the last deploy date using find_posts_since:

(I'll cut some of this out and just discuss what changed since the Pinboard syndication).

def find_posts_since(post_type, last_deploy_date)
    #This is looking in _posts not _site
    posts_to_syndicate = []
    #Need to do this differently for note posts and normal posts
    post_directory = "_posts/"
    if post_type == "note"
        post_directory += "notes/"
    end
    #Skip sub-directories
    all_posts = Dir[post_directory+'/*'].reject do |post|
        File.directory?(post)
    end
    all_posts.each do |post|
        filename = File.basename(post)
        #Need to check date in file if available (for notes) if not use filename
        yaml = YAML.load_file(post)
        if yaml.has_key?("date")
            #Seems to come as Time
            publish_date = yaml["date"].to_datetime
        else
            publish_date = DateTime.parse(filename[0..9]) 
        end
        if publish_date > DateTime.parse(last_deploy_date)

            #...Gets the actual bits and bobs required from the files

        end
    end
    if posts_to_syndicate.empty?
        fail NoPostsFoundError, "No #{post_type} posts found"
    end
    posts_to_syndicate
end

I'm storing my notes in a sub-directory of _posts just to keep everything a bit cleaner so the method needs to look in the right place. Since notes have the potential to be posted more than once a day (I haven't had that problem yet though) I can't rely on the file name when comparing the deploy date, I need to check the actual date in the file if it is there. If no new posts are found then I raise a custom error so I can capture this in my Rakefile and still allow other things to carry on since it is an ok error.

Now I've got a list of note posts I want to syndicate and relevant data from those posts (which for notes is just the text of the note), going back to the syndicate class...

class Jekyll_syndicate_twitter

    def initialize(token, secret, date)
        #The stuff that was up above
    end


    def syndicate
        note_posts = find_posts_since("note", @date)
        note_posts.each do |filename, title|
            #For twitter posts can't add any kind of POSSE backlink
            #But should be possible to get the link of the twitter post
            tweet = @twitter.update(title)
            #Can build link from tweet.id, weird that doesn't seem to be a way to get full url
            link_to_tweet = "https://twitter.com/#{tweet.user.name}/statuses/#{tweet.id}"
            #Need to then update the post, as per flickr
            add_link_to_blog_post("_posts/notes/"+filename, link_to_tweet)
        end
    end
end

...it then tweets the relevant bit (I'm using the title field of the yaml front matter to store the tweet/note text) and then edits the note post to add the link to the tweet in:

def add_link_to_blog_post(post, link)
    #Manually do or use some aspect of to_yaml. I think safer to do manually can then quote the url
    lines = File.readlines(post)
    #insert before second ---
    yaml_start_idx = lines.index{ |line| line.strip == "---" }
    yaml_end_idx = lines[yaml_start_idx+1..-1].index{ |line| line.strip == "---" } + yaml_start_idx+1
    lines.insert(yaml_end_idx, "u-syndication: \"#{link}\"\n")
    #Write back out
    f = File.open(post, "w")
    lines.each do |line|
        f << line
    end
    f.close
end

This simply opens the relevant note file for editing and adds a u-syndication property to the yaml front matter which I can then make use of in my Jekyll templates using some Liquid magic to add a syndication link to the note. I've also included webactions, but only on the page permalink, not everywhere the note is displayed. I don't have my Jekyll templates in a public repository anymore so I might go over how I've set this up in another post. Might.

Last of all then, and getting to the main point of this post, so I can make tweeting from the command line usable, I have a rake task set up for it:

task :note, [:text] do |t, args|
    #Get argument from command line
    #Can't use commas: http://stackoverflow.com/questions/7258148/how-can-i-use-a-comma-in-a-string-argument-to-a-rake-task
    #Fix idea from: http://blog.stevenocchipinti.com/2013/10/18/rake-task-with-an-arbitrary-number-of-arguments/
    text = args[:text]
    if args.extras.length > 0
        #rake strips white space as well. Will just have to assume I have used spaces after commas
        text += ", "+args.extras.join(", ")
    end
    #Check length
    if text.length > 140
        fail NoteTooLongError, "Note is too long by #{text.length-140}"
    end
    #replace anything that's not a letter or number with a hyphen to make it pretty ish
    filename = text.gsub(/[^0-9a-zA-Z]/, "-")
    #Just to be on safe side in case I've missed something
    filename = CGI.escape(filename)
    #get date
    date = Date.today.iso8601
    datetime = DateTime.now.iso8601
    #write out to file
    File.open("_posts/notes/#{date}-#{filename}.markdown", "w") do |file|
        file << "---\n"
        file << "layout: page\n"
        file << "type: note\n"
        file << "title: \"#{text}\"\n"
        file << "categories:\n"
        file << "- note\n"
        file << "date: #{datetime}\n"
        file << "---\n"
    end
    Rake::Task["build"].invoke
    #deploy, which will call posse_twitter
    Rake::Task["deploy"].invoke
end

With this I can call rake note["Here's a tweet"] on the command line and it'll build my note post, build my site, syndicate the tweet out and deploy my site. Ok, there is a bit of a delay waiting for the site to build, but actually not too long.

The task looks complex because Rake has an issue with commas in arguments for tasks and will split any string on commas and consider these as separate arguments. So if I tried to tweet something like "All things being well, I'm now syndicating notes" all that I'd end up with would be "All things being well". I've added a work-around to recombine any split string and add the commas back in. I might have to rethink this if I ever want to extend the work I've done and syndicate out twitter replies as I'll need to include an intentional additional argument of the id of the tweet being replied to. But for the time being it's unlikely I'm going to want to do this as I'll just jump to TTYtter. I'm also checking that my note isn't longer than 140 characters because I have no interest in syndicating out truncated notes.

For the most recent code refer, once again, to the repository

Indieweb: Now Syndicating Link posts to Pinboard

Well, I said by the end of the year, that was quicker than expected! As of this post I've started syndicating out link posts to Pinboard with this result.

In further Indieweb efforts the code for this is available via Fossil on this very site. Not on Github! I couldn't get Fossil CGI hosting to work with the web server I use so it's slightly annoyingly on a different port. Only slightly annoyingly, because I really admire just how easy it is to get Fossil working as a server. For pet personal projects I will continue to use it over Git.

My old deploy script, since my personal computer is also my webserver, used to be a very simple sudo cp .... It's a bit more complex now. The basic principles are:

  1. Use a Rakefile for deploying.
  2. When deploying (Still basically a sudo cp) write date of deploy to a file.
  3. Find posts in _posts that are link type posts and newer than the last deploy date in file.
  4. Syndicate each of those out to Pinboard via the API. If the link already exists on Pinboard, but doesn't have a tag representing it's been syndicated out, the extended description is replaced with content of post and a syndication tag added. Otherwise a new bookmark is added.

This approach suits me fine. Any link post here will appear on Pinboard, but I do not care for having every bookmark I make on Pinboard show up here. This also nets me another 0.1 pt on the Indiemark score.

The Pinboard code I adapted from my Stackexchange favs to Pinboard code. The whole code is very rough and ready at the moment and needs some polishing, but works well (for me). The main limitations at the moment are:

  • Assumes my permalink style.
  • The date of deploy granularity is only to the nearest day.
  • It is seemingly not possible to get the bookmark ID from the Pinboard API. So I can't update the blog post with a link to where it is syndicated.

Next up will either be photo posts (although that is a continuing story of heartache; still to send off the only four roll of films I got to shoot last year) or more likely figuring out a way to do notes/tweets in a none annoying (to me) way.

See the Fossil repository here.

LINK: Muddling My way through Microformat Markup

As part of my Indieweb effort I've now been through all of my post archive and manually added appropriate markup - mostly where I had imported posts from Tumblr which were reblogs of others. This thankless, pointless task is why I've not posted so much here so far this year. On the plus side, it did lead to me making improvements to the microformat markup I'd already added to my Jekyll includes and templates, but on the down side, in trying to figure out what parts of old posts were my content as opposed to content I'd quoted, I discovered a lot of the Tumblr URLs were no longer valid anyway (hence the pointlessness of the task).

One of my major stumbling blocks was figuring out how to do nested quotations / h-cites. So I put together the mockup I've linked to and posted to the Indiewebcamp IRC channel for help. I'm glad I did as I prefer the result I've ended up with compared to my original idea; I am aware of the irony of purely linking to something I have not PESOSed when discussing the Indieweb.

Here's an actual instance of putting this into practice and the corresponding parsed json.

There are some potential downsides to microformats due to the limitations of how they work:

  • Repetition. With three nested quotations/reblogs the name of the post has to be repeated three times. To me, this looks messy visually even if it is semantically correct. I could alter the markup so that this is hidden from view and I might yet, even if that is frowned upon; relatedly, implied properties are great until you don't want them implied and then you have to define things multiple times.
  • Extra markup. It was necessary to add extra markup (surrounding blockquotes, etc) so that the relevant elements and microformat properties would be contained within the intended root class name.
  • Microformat properties belong to the closest root level microformat parent. So you've got to be aware of where you place them. In the linked example I originally had u-repost-of within the h-cite, but this had to be pulled outside the h-cite element so it was recognised as a property of the h-entry. Perhaps it would be useful to have certain properties only belong to certain root classes so it doesn't matter if they are nested within other root level classes? Perhaps that would be way too hard to implement and parse though?
  • URL based properties are limited. I wish there was something like u-slug-name so I could use the last part of a URL to indicate the name of the post/work.

Some related notes for myself:

A basic example:

<blockquote class="h-cite">
    <p><a class="p-name u-url" href="http://some.where">Title</a> by <span class="p-author">Author</span>:</p>
    <blockquote>
        <p class="p-content">Something intelligent</p>
    </blockquote>
</blockquote>
  • h-* is the root level. So any elements within this element get parsed in that context (huh? like that makes it any clearer).
  • p-* for simple text properties. So the text contained wholly and immediately within that element. So for the h-cite above the name (p-name) is "Title" and the author (p-author) is "Author".
  • u-* for url derived properties. Typically using u-url on the anchor (a) to indicate that the href is the URL for the work being quoted (cited, h-cite), although as far as I can tell there is nothing stopping you from using u-name and/or u-author as well which would indicate that the entire URL is the name of the work and also the author; this would make no sense, but it would parse fine.
  • e-* for element tree. Basically when p isn't enough. So typically the h-cite would have content and you could indicate the content by using p-content if you were quoting a single sentence, but perhaps you are quoting a few paragraphs which contain links, etc and thus html structure - that's when you use e-content.

[EDIT: 2015-03-13] I've had a bit of a wobble that I may have got this wrong and perhaps should have used u-in-reply-to instead of u-repost-of for these imported Tumblr posts because Indieweb seems to classify reposts as posts that are solely 100% of the original content with no amendments, comments or additions. And that perhaps my efforts to shift u-repost-of out of the blockquote and under h-entry may have been the wrong idea as it may then give the impression my content (comments, etc) are the bit that have been reposted. But then I re-read the Indieweb definition of replies and that definitely doesn't fit these imported Tumblr posts. I'm not sure on where the u-repost-of should be. Perhaps it would make sense under a h-cite? Although I think they are meant to be used on h-entry? So for the time being I'm giving up and staying with the way I've done it. It's good enough for now.

Indieweb

When I first started with this website I used to post meta-posts about the development of the site fairly often. It does still change quite often behind the scenes, but the changes are small and incremental so I forget to mention them, or it doesn't seem worthwhile to mention them on an individual level.

But this time around, I am going to mention some small behind the scenes changes as the reason for them is important far beyond my site: the Indieweb builds on past efforts to own your own identity and owning your own content (which is pretty much what that post amounts to, even if ironically hosted "in the cloud"), but with an emphasis on still being social and keeping you connected with your friends on whatever system they choose to use. I.e. So it's not a Facebook replacement or a Twitter replacement or any product at all: rather it's a philosophy (and you choose which tools to use or build your own).

Having my own website is important to me. I like that I've had it for years and, especially over the last few years, I've managed to post something every month. I do like owning (as much as possible) my own content and I'm proud it isn't all siloed off on something like Facebook or even Tumblr. I'm not terribly social at all (or rather, I am) on the internet so I'm not immediately focused on the "staying connected" part of Indieweb, although I am impressed with the technology. Rather, I discovered Indieweb through this tweet and thought I'd have a go at doing the same basic first steps.

Indiemark Score

Those basic first steps can be tracked through the Indiemark score:

Level 1

  • 0.2 pts for identity. Easy as I already have my own domain and website.
  • 0.2 pts for authentication. I added rel="me" links in so I can use IndieAuth. They are hidden on my homepage as I have them exposed on my Elsewhere page.
  • 0.4 pts for posts. I'm lacking the exact time in my post published date because at the moment it is not relevant to my blog posts. I gather this is important as a big push of Indieweb is to get you to publish "notes" (tweets/status updates) on your own site and syndicate them out and obviously then the exact time is more important, but, for the time being, being to the nearest day is plenty accurate enough for my sporadic blog posts.
  • 0.2 pts for search. Has been there for crawling for some years now.

Level 2

(At time of writing, I'm sure the level 2 scores add up to 0.9 not 1 total)

  • 0.1 pts for h-card. I've added my h-card in (see notes below). I never saw the point of microformats the first time around, but the Indieweb makes use of them and they are easy to add in now using the implied properties of the new and improved microformats2.
  • 0.2 pts for multiple post types. Yep. Since I moved from Tumblr I have, and use, photo, text, quote and link type posts, so already there.
  • 0 pts of 0.1 for syndication. POSSE (Publish Own Site, Syndicate Elsewhere) - This is where I'm lacking. More on this below.
  • 0 pts of 0.1 for posting UI. I have nothing here either.
  • 0.1 pts for navigation. In some previous iteration of my site, I had the required previous/next post navigation (I know because I've only very recently removed the long redundant CSS), but I think I lost it when I moved to Jekyll. This prompted me to go and look: It isn't any limitation of Jekyll, just an oversight on my part, so I've added this back in. That's an easy 0.1 pt.
  • 0.1 pts for search. The search UI is there and I allow indexing (Level 1), but that doesn't mean it gets indexed.
  • 0 pts of 0.1 for aggregation. I think I get this now after asking on IRC. This is somewhat related to syndication and means embedding useful properties of items syndicated elsewhere. Take Tantek's reply to me: this originated on his site, but was syndicated out to Twitter as a proper threaded reply (magic!), but displays on his site with automatic links to my Tweet and my username. And it's those links that are considered "aggregated". A fuller approach, perhaps, could be considered automatically pulling in my user image from Twitter.
  • 0 pts of 0.1 for web actions. This is best explained by visiting that previous link and seeing how Tantek has links available allowing you to reply on Twitter even though the note is syndicated out from his site.

...I'll stop there for now. Which gives me a score of 1.5. Not bad for minimal effort.

H-cards

In doing this there were a couple of things I found less obvious to do with h-cards:

Representative h-card

You need rel="me" on it

<a class="h-card" rel="me" href="http://atomicules.co.uk/">
    <!-- Using implied h-card properties, which don't always validate, but is actually valid. Might figure out using a decent sized image at some point -->
    <img src="https://atomicules.co.uk/images/favicon.png" alt="atomicules">
</a>

I had the above in my footer and at the time no other h-cards on the page, yet it wouldn't get picked up as the representative h-card until I put the rel="me" bit in.

Multiple representative h-cards

So then I added my h-card into my post h-entry which meant I then had eleven h-cards on my home page (which is fine), but they were all coming up as representative h-cards! At first I thought it was because I'd left the rel="me" in on them all as a result of copying and pasting, but weirdly taking rel="me" off doesn't work. At least per this parser. I had to remove the url from my h-entry h-cards:

<!-- A minimal h-card without a url to avoid multiple representative h-card issues-->
<img class="p-author h-card" rel="author" src="https://atomicules.co.uk/images/favicon.png" alt="atomicules">

Thoughts on POSSE...

I've only scratched the surface of Indieweb so far. I am completely lacking on POSSE. I actually used to be a bit better: I used the PESOS (you can easily figure out what that means now you know what POSSE stands for) approach when my site was Rails based to pull in my forum posts from the (now long defunct) Appletalker forum and embedded my latest tweet as a site status heading. Since starting with Jekyll (so a few years now) I've toyed with the idea of syndicating out my link posts to Pinboard, but there is a huge lack of flow/convenience in doing this: If I'm in a web-browser it is far easier to bookmark it on Pinboard first (even in Elinks) than switch to Vim, create a new post, rebuild in Jekyll, commit in Fossil and finally deploy. Finally, I don't really want every bookmark I make to be part of my website.

Now that my photography seems to have permanently slowed down perhaps I could think about syndicating that out somehow to Flickr though, as that isn't an action I want to happen quickly like bookmarking.

I doubt I will ever syndicate out my Tweets. I am constantly on the fence with Twitter and always have half a mind to delete it, but then an unexpected interaction will occur and I'll think it's great again for a bit. I could, however, think about building my own plugin for TTYtter that publishes on my site at the same time as I Tweet.

... and Staying Connected

At the moment I'm not that keen on receiving webmentions. I do think the idea and technology is cool, though: see the comments section of this post for a great example of how links flow back in as a result of the article being syndicated in different places). The reason I'm not keen is it feels similar to the clutter of comments: I don't mean the clutter of having comments display on my site, rather the pointlessness of having them integrated at all when they would rarely ever be used.

I also thought including webmentions on a static site would be difficult to do and I've no desire to give up a static site; however, some clever people are using Jekyll combined with Javascript for embedding webmentions.

For the time being though, I'm just going to try to remember to send webmentions and I'm also going to retrospectively add in u-repost-of and u-in-reply-to on the odd occasions this is applicable.

My Indieweb Commitment

My commitment for this year (the end of the year; I'm being realistic) is to start POSSEing (or more likely PESOSing) something. WITHOUT using Javascript. Because I don't feel using Javascript to display content really makes that content part of my site, it just appears that way. I suspect I'll have a "Not-quite real-time web" and use cron to run some scripts to generate the necessary static content and then build and deploy the site every so often.


[EDIT: 2015-04-08] Another 0.1 pts for syndication, bringing my total score uo to 1.6, now that I'm syndicating link type posts out to Pinboard.

[EDIT: 2015-05-18] Now also syndicating photo posts (well, when I eventually get last year's films developed) and (select) note posts. This doesn't get me any more points. Yet. It does enable me to think about adding webactions for replying, liking and reposting tweets, etc.I don't know if I'll ever get any points for aggregation as I don't think it'll be that appropriate for my use of my site. And I don't know if my Rake task for tweeting from the command line counts as a UI. Perhaps. Actually, going back I do get a 0.1pt for UI as it is with regards to automatic POSSE and that all happens now. Total score now 1.7.

[EDIT: 2015-05-19] Just to clarify the Indieweb Commitment paragraph: I think I was a bit confused when I wrote that as POSSEing doesn't have anything to do with Javascript; PESOSing, possibly. The Javscript waffle refers to Webmentions which, since I've figured out POSSEing all I can, is my next step if I choose to do them.

[EDIT: 2015-05-21] Added webactions (as in links to favourite, reply and rewteet) for my notes with the indie-action wrappers as well. Total score 1.8. Only Aggregation left and I've implemented all of Level 2.

These are the ten most recent posts, for older posts see the Archive.