Replies

Jan-Lukas Else 17 Feb 2020 18:38

Opinions can change over time. And since I often post opinions on my blog, I’ve added a feature to my blog theme that displays a warning message above posts that are over one year old (example).I have been blogging for some time now. There were times when blogging was my escape to deal with …

Completely agree with all you’ve said. “But still, I don’t want to delete most of what I published back then just like that.” this is something I’ve come to learn. My website passed through many phases where I removed a lot of the posts I had there. But now? Now I restored everything.

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!

Jan-Lukas Else 10 Feb 2020 18:36

I promised and people already asked, so here is the first part of the documentation about how I enabled ActivityPub support on my Hugo-based blog:The first step to enable ActivityPub support, was to get Hugo to generate ActivityStreams representations for posts and the ActivityPub actor. I did this …

I was looking at your single template and I was wondering if content_html shouldn’t be content only? According to the spec, there’s no content_html property and the content can contain HTML by default.

Jan-Lukas Else 30 Jan 2020 21:30

I think I’m in some kind of bubble, but most of the people I instant message with use Telegram, because either they are computer science students too or because I convinced (or persuaded) them.My top features (that can convince geeks) are: cross device cloud sync (with clients for almost any …

Uh! That’s pretty awesome. In my case, over 50% of the people I talk every day are not on telegram. I’ve convinced some (including my parents!) with the arguments you mentioned, but others are just to lazy to change or they don’t bother about the eventual benefits even if they complain about things that Telegram would solve when compared to other services: storage usage is my favorite point here. Also, cross-platform syncing and not losing everything just because you changed systems…

Jan-Lukas Else 30 Jan 2020 18:59

Pavel Durov, founder of Telegram, wrote about “why using WhatsApp is dangerous”, citing the attack against Jeff Bezos.Second, there are backdoors. Enforcement agencies are not too happy with encryption, forcing app developers to secretly plant vulnerabilities in their apps. I know that because we’ve …

I really love Telegram and love it! I known a few folks that also prefer Telegram over any other messaging platform. I think that most people would enjoy it more than what they use right now if they tried the app. However, it’s a bit hard to make people start using new services when they’re used to the same steps everyday. Inertia.

Jan-Lukas Else 29 Jan 2020 11:21

I just want to briefly announce on my blog that I have successfully completed the apprenticeship part of my dual study and can now call myself “Fachinformatiker für Anwendungsentwicklung” (IT specialist for application development)!

Congratulations! 🎓

Aaron Parecki 22 Jan 2020 13:25

It's all a giant pile of PHP code I wrote ages ago, it's not even map-projection-aware it just plots on a 2D canvas. The animation is basically a timelapse of a bunch of frames of that same script played in a row.

Thanks for the info :D Will probably do something similar when I have more data to create more interesting “maps”.

Aaron Parecki Original Post

I've had a fascination with maps for as long as I can remember. During family road trips to San Francisco I remember tracing our route on a map with a highlighter in real-time. Many, many years later, I am able to trace my route automatically with a GPS receiver on my phone. I have been carrying …

Hey Aaron! What software/library are you using to generate those maps with your location? Can they be considered heat maps? And what about the animated video?

Jan-Lukas Else 22 Jan 2020 10:28

I don’t show webmention content at all. 😅 Instead I just show a link to the “interaction”. That removes a lot of complexity with parsing, storing etc. but probably isn’t as intuitive: it requires opening the “interactions” section below the post and visiting the link.

I enjoy showing the webmention and the context (reply to what? repost of what? like of what?) because, as you know, the content on the Internet is ephemeral and if I don’t store it, I don’t have assurance that it will remain available. And that’s the main reason why I show the webmentions.

In any case, it’s not the webmentions that worry me, but the post contexts that I show on replies, likes and reposts… Need to decide on that: either remove the pictures, or store them.

Jan-Lukas Else 22 Jan 2020 08:43

On a lot of IndieWeb sites, I noticed that profile images of webmentions get directly embedded from their original source. For example, Twitter profile images are loaded directly from Twitter servers (pbs.twimg.com) or even my profile image is directly embedded from my site.However you should …

This is actually the next thing I want to “fix”. Other problem of twitter is that, if the user changes the profile picture, the previous one gets unavailable. For webmentions, I’m using the images provided by webmention.io, but for replies, likes and reposts context, I’m using the original source and I don’t like it.

I already ponderated to remove the images at all from the contexts, but I don’t think it would look as friendly as it does now. What do you think?

Miguel Hugo Regouga 19 Jan 2020 22:51

Dava para levar mesmo para fora do Spotify, para até conseguires ir mais atrás. Por exemplo ao fazeres scan dos barcodes dos CDs que tens em casa e que ouvias quando eras puto

Pronto, para quem tem, seria bastante interessante. No meu caso, só tenho lá uns 4 CDs haha. O resto era dos meus pais, mas sim, seria bastante interessante. Visualization tools, visualization tools. We need them!

Miguel Hugo Regouga 19 Jan 2020 22:45

Quão fixe era podermos ver como o nosso gosto musical evoluiu ao longo dos anos? Desde as primeiras músicas que ouvimos até agora? Tal como a nossa própria personalidade, ouvimos bandas e géneros diferentes à medida que amadurecemos. Era interessante ver essa progressão

Eu sei que não usámos Spotify desde sempre, mas, para quem usa, seria fixe construir uma tool que usasse a API deles e fizesse alguma análise aos dados e dar stats tipo o que acabaste de dizer.

Jan-Lukas Else 19 Jan 2020 12:53

After talking to @jlelse, I finally decided not to trouble myself with writing my own static website generator and just improve what I have right now.Optimizing software to run faster is a good thing in itself. If you have to wait less for the software to run, you have more time for other things. …

Wouldn’t it be better to start where minutes or even hours are regularly wasted?

Yup, that was my conclusion and I’m really happy I ended up not wasting more time with whatever I was trying to do.

When I invest time in my own software projects, I use most of it to create new features that allow me to do new things. This morning, I invested a few hours in a feature that allows me to create posts with photos on my blog via an app from my smartphone.

That’s great! I actually have a big list of features and things I want to add to my own website. Will start working more on them after I finish my exams.

But what I haven’t done yet, and what I will do only when there is a more important reason to do so, is rewriting the software, which allows me to receive HTML forms via email, from NodeJS to Go.

I love Go but I ended up picking Node.js for the micropub endpoint and all the API that is running on the back of my website just because it was easier to deal with… for now.

Henrique Dias 02 Jan 2020 23:40

After digressing a bit about building a Micropub endpoint for my website, I’ve been thinking about the next steps: if I should keep Hugo or move to some other system.I opened a topic on Hugo’s discourse to see to which point it would be reliable to use the watch mode of Hugo in production and it …

@aaronpk @t I would personally love some of your thoughts or pointers on this :) Any advice?