meta

I just spent a lot time trying to send signed requests to accept ActivityPub followers. It’s not working! I make the requests to Mastodon and their servers reply with 202 but the ‘Cancel follow request’ button does not change to ‘Unfollow’ and I don’t know what the problem is. In addition, the test suite has not working for over a year it seems. Ugh…

How do I generate my knowledge base

For quite a few time, I used Bear as my go-to Notes application for two reasons: it was single to use and the syntax was quite similar to markdown. However, it is not markdown and it does not support some things that’d like to see on such software: diagrams, mathematics, wiki-like links, etc.

After searching for a bit I found out an app called Notable. In addition to having all the features I wanted from Bear, it is also storage independent, meaning everything is stored as markdown plain-files that I can version control with Git or some similar software.

This is just a FYI: if you’re interested, I recently added a knowledge base section to the website where I automatically deploy de notes I write with Notable. I actually have some ideas of things to add to these notes when I have time. It’s actually quite simple: just set up a GitHub hook, pull the notes repo, convert them to Hugo’s format and et voilรก!

Analyzing my shows and movie habits

Today, I decided to readd a watches page, but this time it isn’t built from hundreds of posts, but from the data that I get directly from Trakt’s API. I built a small tool called trakt-collector used to collect your history and save it in JSON format.

The Trakt API gives you so much information about every episode and every movie: from the title, to the rating, description, channel where it aired, when it aired first, the countries where it aired, etc, etc. I don’t actually need all that information, but it’s never too much to store.

I’m wondering if there’s any interesting software to build git based wikis (or at least with a flat file storage) that support Markdown and ACL for private and public posts and is extensible enough to allow me to customize it the way I want. I have a bunch of notes I’d like to make public just because they might be helpful for someone else. I thought about integrating it into this website but I’d love to have a way to have private posts, as well as easily linking between pages. The most interesting option I found was DokuWiki which was tons of plugins. However, it’s PHP and I’m not sure about how maintained it is nowadays. It looks like wiki software is dying… besides the big beasts.

Just wondering if itโ€™s worth it to keep my watches log and checkins on my website. I know I had some work setting that up. But, is it worth it? Is it worth for you, readers?

I like having that data accessible and I still can by just using the APIs and backing up the data myself. It can be useful and it can have many uses. But is it worthy to have on this website?

For maintenance purposes, itโ€™s a bit harder but not impossible. For you, readers. Iโ€™d love your opinion on this. Iโ€™ve b en thinking about removing swarm checkins because of privacy issues.

About the watches: maybe itโ€™d be nice to have a page listing the series and movies Iโ€™ve watched but not as logs.

Henrique Dias 16 Feb 2020 11:06

So I just made a few changes to my website and I hope it didnโ€™t break anything like feeds and such. Hereโ€™s a small changelog of the changes: Stopped using Hugo categories for post types (replies, notes, articles, etc) and started using sections, i.e., I know put a note under the /note path. So this โ€ฆ

After publishing the post to which I’m replying to, @jlelse contacted me and I noticed the import directive in Caddy can be used to import files:

import allows you to use configuration from another file or a reusable snippet. It gets replaced with the contents of that file or snippet.

So I just decided to build the redirects file using Hugo itself. First of all, I needed to import a lot of redirects as aliases because I had them in a separate file, but this way it’s much better. After that, I needed to add a new output type to Hugo’s config:

disableAliases: true

outputFormats:
  redir:
    mediaType: text/plain
    baseName: redirects
    isPlainText: true
    notAlternative: true

outputs:
  home:
    - redir

Then, I created a layouts/index.redir.txt file with the following content:

{{- range $p := .Site.Pages -}}
{{ range .Aliases }}
{{  . | printf "%-70s" }}	{{ $p.RelPermalink -}}
{{ end -}}
{{- end -}}

This is mostly what you can see on this commit of the official hugo docs for their netlify redirects. With this, my Hugo website does not build any HTML aliases (disableAliases), but creates a file on the root called redirects.txt which you see here. I can just block the access through Caddy but there’s no reason I should do so. Is there?

On Caddyland, I just added this snipped:

hacdias.com {
  root /the/public/path/

  redir 301 {
    import /the/public/path/redirects.txt
  }
}

And voilรก! It works! But now you ask: what if we change the redirects file and we don’t wanna have any downtime? Just configure your Micropub entrypoint or whatever software you’re using on the backend to do a config hot reload by executing the following command:

pkill -USR1 caddy

There it is! 301 redirects working flawlessly!

So I just made a few changes to my website and I hope it didn’t break anything like feeds and such. Here’s a small changelog of the changes:

  • Stopped using Hugo categories for post types (replies, notes, articles, etc) and started using sections, i.e., I know put a note under the /note path. So this also changed the URLs, hopefully for better and now it’s easier to restrict access or remove something if I want.
  • I added about ~2000 redirect rules. Does anyone know if Caddy allows me to import the redirect rules from another file? My Caddyfile is getting huge.
  • Started using partialCached in some places which improved the build time a tiny bit.
  • Moved the Articles page from /blog to /articles which I already wanted to do for a while.
  • Added a contact page.
  • Updated the more page with more links!

And… that’s it I think. I’d also love to use this website as a “knowledge base” so I’ll probably create a section for that later. I always want to organize the knowledge I get somehow but I just have tons of files from university and other stuff laying around without any organization. I really loved this braindump from Jethro.

OwnYourTrakt

For quite some time, I have been getting more and more into the IndieWeb world and trying to own my own data. I have started publishing more to my website and using it as a place to store most of my public data, i.e., data I already published on other social media and platforms.

It now holds my web interactions, such as replies, likes and reposts, as well as my reading log. Since the beginning, I also wanted to this website as a place to store my watch logs. With watch I mean watching movies and TV series.