Log in
Seblog.nl

Seblog.nl

Day 4: scheduled posts

I'm very late today. It's actually day 5 now in The Netherlands, but since I haven't slept yet I'm still calling this day 4.

Because I started so late, I chose an easy one for today. Unfortunately the easy ones always take longer than you expect. But hey, that makes this episode of #100daysofindieweb an episode!


I am now able to schedule posts on my blog. That's a simple one, because all I have to do is check wether the 'published' field of a post is in the past before I display it. It took a little longer because I had to do it in two places, the feed and the entry page.

The feed now only grabs posts where the 'published' is smaller than the current date, and my router now gives a 404 Not found if a post has a 'published' that is bigger than the current date.

Because my webmentions trigger on the first visit of the page, and the page never gets called, I effectively schedule webmentions with this too. Only one problem: I need to wait for a visitor to open the post once it's published to trigger the mentions. This includes the mention to Brid.gy/publish, to syndicate a post to Twitter. I leave that problem to another day though.

Anyway, it's a simple feature, but a neat one, so I'm happy with it.

@bitsoffreedom Ik heb al bij twee evenementen de klantenservice gemaild omdat hun ticketsysteem me verplicht om geboortedatum en geslacht in te vullen, vaak omdat ze hun ticketverkoop hebben uitbesteed. Hebben jullie daar toevallig een blogpost of pagina voor waar naar kan linken?

Day 3: relative urls

Today I started with fiddling with reply-contexts, but that turned out to be a giant mess, because I store my own posts in a different format than posts by others, and I wanted to re-use my template. I need to come back to that another time.


Yesterday, I mentioned Martijn in my post. And when I mention urls in my posts, my server will try to notify the other site that I mentioned that page. So yesterday my site notified Martijn’s site. At least, it tried.

Martijn is known for giving parsers a hard time. My site came up with http://vanderven.se/mention.php as his webmention endpoint, which is not correct. The following things went wrong:

  • I mentioned http://vanderven.se/martijn, which is not his canonical url. That’s http://vanderven.se/martijn/, ending in a /.
  • Kirby Toolkit’s remote::get(), which I used to fetch the page, did follow the redirect, but my script didn’t update the mentioned url accordingly. Since Martijns endpoint link is relative (webmention.php), that / does matter: it defines Martijns page as a folder, so his endpoint is at http://vanderven.se/martijn/endpoint.php
  • Finally, it turned out that Kirby Toolkit’s url::makeAbsolute($path, $home) did not handle relative urls well. It just intelligently added $path to $home, but didn’t actually solve relative urls where $home is a folder or file.

Martijn encouraged me to write some tests for Kirby Toolkit, because they use phpunit and all that stuff. It was nice, because I didn’t have any experience with this kind of testing (I just refresh the page and hope it works). Learning to test things is a goal for 2017 for me.

When I had a list of good tests, I started to change the function. I might be a little too refresh-frenzy still, but in the end I managed to pass all my own tests. After the pull request and with a little tweaking of my own scripts, I finally got Martijn’s endpoint:

http://vanderven.se/martijn/endpoint.php

So, Martijn, here is another try, still without your canonical /, just to see if it works now. :)

Ik weet het niet hoor jongens. Ik heb zojuist een stukje van 418 woorden geplaatst onder de categorie '100dagen500woorden', maar ik vind het gewoon gênant. Ik geef jullie de eerste zin:

Ik weet niet, maar op een of andere manier is een codehoofd gewoon een heel ander soort hoofd dan een schrijfhoofd.

Het is zo'n typisch stukje over schrijven. Daar schrijf ik er heel veel van en die probeer ik zo min mogelijk te publiceren. De bedoeling van deze challenge was dat er wat meer creatiefs naar boven kwam. Maar goed, bij proberen hoort falen. En daarna opnieuw proberen.

Dus denk dat ik dit deel van de 100 dagen ga omgooien. Het andere deel gaat prima en zie ik 'makkelijk' tot de 100 komen, maar dit deel voelt verkeerd. Naast '500 woorden' heb ik toch ook een soort kwaliteitskeurmerk voor ogen en dat kwaliteitskeurmerk is ten eerste niet reëel voor 500 woorden, 100 dagen lang, naast minimaal 5 uur zakelijk websites bouwen én je eigen weblog verbeteren, en ten tweede eigenlijk ook volstrekt irrelevant.

Mijn productiefste tijd ooit was juist een tijd waarbij kwaliteit 'och' was en waarbij het er om ging dat je er was en dat je dingen maakte. (Ik refereer hier aan het legendarische Waai.) Daarom ga ik dat gewoon schaamteloos opnieuw proberen: #100dagenwaaien.

Er volg zometeen een haiku om te beginnen met dag 2. (Want zo gaan die dingen.)

Day 2: 410 Gone

One day I made an RSS-feed just for Martijn, and the other day he said:

[2017-01-09 19:27:07] <Zegnat> Oh, geen support voor /deleted? re: https://seblog.nl/2017/01/08/1/this-is-another-test-post

Nope, I just made a test post and deleted it right away, the hard way: a proper delete. How could I know his parser was just visiting right in the three minutes the posts existed? My site showed a 404 Not found, because the page did not exist.

According to /deleted, that’s not the way things should be. So today I re-posted This is another test post, and then unproperly deleted it.


So when you now go to https://seblog.nl/2017/01/08/1/this-is-another-test-post, you’ll get a 410 Gone, including a Dutch human readable page which explains what that means.

I do this by setting a dt-deleted on my post. I also taught my site that if I put a future date, it won’t 410 on people, until we past that date. This sets up my own Snapchat/Instagram Stories on Seblog!

In addition to a 410 Gone for direct hits on the url, the post does still pop up on feeds, but with the following markup:

<div class="h-entry" style="display:none">
  <a href="https://seblog.nl/2017/01/08/1/this-is-another-test-post" class="u-uid u-url"></a>
  <time datetime="2017-01-08 15:26:26" class="dt-deleted"></time>
</div>

This is not visible for normal users, but advanced feed readers could pick this up and delete the post in their cache. I haven’t added it to the RSS, because I doubt anyone supports this, but h-feed readers can pick it up!

I also don’t support delete via Micropub, but hey, we’re getting somewhere!


Oh and while I was at it: my private posts hide their slug now. My deleted posts don’t, because that would cause a redirect (which is 301 or 302) and I wanted a 410 Gone.

Day 1: fixing reposts

Okay, enough, I’m joining! Aaron has been doing this for ages now (that is, 26 days): 100 days of IndieWeb, in which he builds an IndieWeb related feature into his site or some other service.

I’ve been doing my own 100 days of IndieWeb for a while now, but I never blogged about the outcomes of each day. There also wasn’t much focus. I did multiple things at once and was never really satisfied. So my 100 days of IndieWeb is not about doing more, it’s about doing less, but more consistent.

My updates here won’t all be as spectacular or useful to other people as Aaron’s, but they will be updates. My site will improve a small bit every day.


I wanted to start off with something simple, and since I’m already copying Aaron I’m going to do something he did a few days ago, that is: fixing my reposts.

Before today, they looked like this:

As you can see I default to the hostname when I don’t have an author cached. In the case of a retweet, this is not useful at all! Luckily I already had the data cached from the Twitter import, so with a few tweaks I was able to show that on the page:

To make things more interesting I now have a /reposts feed too.

100 dagen

De afgelopen twee weken waren een beetje vaag. Ten eerste is het nu 2017, waar ik nog niet helemaal aan gewend ben, en ten tweede is het nu al de tweede week van 2017, wat echt veel te snel gaat. Ik heb het gevoel dat ik niets gedaan heb in die twee weken. Dat is niet helemaal waar, maar het gevoel is er wel.

Het gevoel is wel verklaarbaar. De afgelopen weken ben ik vooral bezig geweest met het verbouwen van mijn weblog, het bijhouden van #indieweb op IRC en hier en daar met wat websites voor anderen. (Ik heb inmiddels ook een best leuke todo.txt set-up, maar daar blog ik later nog wel eens over.) Al met al sliep ik van 3:30 tot veel te laat en haalde ik niet veel voldoening uit mijn dag.


Gister vond ik dat het anders moest, dus hield ik een schermloze dag. Ik liet mijn telefoon en laptop uit en dwong mezelf om andere dingen te verzinnen om te doen.

Het was heel interessant. Op gegeven moment stond ik in een boekhandel naar boeken te kijken en dacht ik: nu doe ik weer precies wat ik al twee weken doe. Ik verzamel meer informatie om tot me te nemen, voor zometeen, terwijl ik daarmee eigenlijk blijf hangen in een soort oppervlakkigheid. Nog steeds nam ik niet de tijd om de informatie die ik in mijn hoofd aan het verzamelen was te verwerken.

Enfin, ik heb nog een tijd in de bieb gezeten met een notitieboekje, nadenkend over dingen, súperintellectueel. Weer thuis gekomen heb ik mijn kamer verbouwd, heb ik voor het eerst sinds tijden weer wat boeken gelezen en heb ik dus allemaal plannen gemaakt over hoe ik dit beter kan aanpakken.


Daarom nu: ik ga een 100-dagenchallenge doen. Het idee is niet nieuw, ik heb het van Aaron Parecki en die heeft het vast weer van anderen. Hij bouwt elke dag een stukje van zijn site uit én hij schrijft elke dag een stukje muziek. Ik heb al een aantal keer bedacht dat ik zoiets ook zou moeten doen, omdat ik praktisch gezien al elke dag iets aan mijn weblog verander, maar dat niet op diezelfde manier deel. Dus bij dezen:

  • Ik ga 100 dagen lang elke dag iets aan mijn website veranderen. Details straks in het Engels.
  • Ik ga 100 dagen lang elke dag 500 woorden schrijven en die hier op mijn weblog plaatsen. Het eerste stukje vind je hier.

De teksten kan je komende dagen vinden onder de categorie #100dagen500woorden. Waarschuwing vooraf: ik heb niet gezegd dat dit goede teksten gaan worden, ik heb alleen gezegd dat ze er 100 dagen lang elke dag zijn en dat ze ongeveer 500 woorden per stuk zijn.

Ook alvast een uitzondering: elke tiende dag ga ik weer zo’n schermloze dag houden, waarbij ik mijn laptop en telefoon uit laat, want dat beviel enorm. Ik denk dat ik voor die dagen een tekstbeeld teken, wat met de hand schrijf en dat de volgende dag post.

Meer laden