Building a blog with Pelican and Netlify

It's been more than a year since I last posted on this website. I've been busy and I didn't have something to write about, until now. As I wrote before, I've been running the classic Jekyll/GitHub Pages combo, but I wanted to try something different, something that gave me more control over my website, so I found Pelican.

Similar to Jekyll, Pelican is a static site generator: its output are plain HTML/CSS files that you can upload anywhere, you don't need a backend nor a database. This is great because finding cheap (free) hosting is easy, and Netlify's Started Plan is perfect for this type of websites.

Just like Jekyll, Pelican also supports a wide variety of plugins and themes. The main difference is that Pelican is written in Python, and being a huge Python fan myself, I decided to give it a go. This is the write-up of how I got it working.

1. Setup the project using Poetry

I really like Poetry for managing my dependencies and virtual environments.

You can create a new Poetry project by running:

poetry new new-blog

You can find more information on how to use Poetry by reading the docs.

Now …

more ...

Getting started with the ESP-IDF running under WSL2

I'm really excited about this post, because it's the first post slightly related to Embedded Systems, and that's the topic I was expecting to write about when I started this blog. The second reason is because I love the ESP32, specially using the ESP IoT Development Framework. It's been a while since I worked with an ESP32 using the IDF (2019 actually), and the framework changed a lot since, so after all this time, I decided to get myself a dev board and explore the IDF again.

When I started working with the ESP32, I followed the excellent Neil Kolban's Book on ESP32, but I've heard it's slightly outdated now, so your best bet is definitely the also excelent IDF Documentation from Espressif.

As I wrote before, I've been using mostly Windows 10 with WSL2 for my development work, so setting up the IDF under WSL2 might be a little different to the average process you follow if running under an actual Linux distribution. This guide is a quick guide on how to start working with an ESP32 using WSL2.

1. Install the CP210x USB to UART Bridge VCP Drivers

Assuming you're using one of the very common ESP32 DevKit …

more ...

PowerShell for the (Unix) masses

Screenshot of how my PowerShell setup looks like Screenshot of how my PowerShell setup looks like

Last time I wrote about my development setup on Windows 10, I suggested using the Windows Subsystem for Linux (WSL), and I still think this is the best (or most confortable) approach for most Unix people. However, you might find yourself in a situation where you can't really use WSL, such as needing to compile Windows native binaries or your company-issued laptop just won't allow it.

I actually am in one of those situations, so at first I tried a Cygwin setup, and it did work, but not painlessly (it took me some work to get to a place where I was confortable) and it was slow and buggy at times.

After much pain and unwillingness to dedicate more time to Cygwin, I said "screw it" and went the Windows-way (not without some initial resistance of course) and found out that you can get a pretty "Riced Unix" feel with PowerShell easily, and that PowerShell is actually good. So here's a writeup on how I got it working the way I like.

1. Install Git

You know you need it. You can get Git for Windows here.

2. Install Windows Terminal

The …

more ...

Development Setup on Windows 10

Screenshot of how my Windows 10 setup looks like Screenshot of how my Windows 10 setup looks like

Before I start, let me get something straight: No, I haven't lost my mind.

With that cleared out, let me give a little background: I've been working for years on Unix systems, first on Ubuntu (and a bunch of different distros) and recently on a Mac. I never really liked the development ecosystem for Windows. That haven't changed much, my work laptop still is a MacBook Pro, however, I've been gaming quite more often now during quarantine, so having to change between my "work" OS (Ubuntu) and my gaming OS was starting to get a little bit tiring, so I was wondering if I could get Windows 10 set the way I like to work on my personal projects.

I found this great blog post after Googling "Developer setup for Windows 10", and it really helped me get where I can work comfortably. Here's a writeup on what I did, so maybe it might be useful for someone trying to move from a Mac (or Linux) to Windows.

Install the Chocolatey package manager

I don't really use Chocolatey much, but it's useful when constantly working on Windows, also, I used it …

more ...

How I got Jekyll to work the way I want

Okay, I've been (seriously this time) playing around with Jekyll and I think I can now give a writeup on how I got this site to a point I feel confortable with.

I know that the Jekyll experience is a little different when using GitHub Pages vs generating you own static content and then pushing it to master, but since I'm not a fan of front-end stuff (CSS is a nightmare for me), I knew from the beginning that if I wanted to make this site, it had to be the easiest thing for me to maintain.

So yes, I went with GitHub Pages, but unfortunately, GitHub Pages generates all pages using the --safe options, which means that third-party plugins are out of question (GitHub has a whitelist of plugins you can use that can be found here). Due to the lack of plugins, you have to be a little handy to get where I wanted to get.

What do I want this site to have? I want it to be as clean and simple to navigate as possible, I want it to be more than a blog (so having a sidebar was a must), have some sort of comment …

more ...