Blogging in Hugo š¦
An SSG alone probably isn’t the most exciting tool I’ve been using. Though I am finding that the setup around it, including environment configuration be quite a fascinating endeavour. I was finding it difficult keeping my Hugo development environment clean and in sync with my various machines. This is where I am finding big value from using Github repos. Along with using Cloudflare pages CI/CD pipeline, it has been an absolutely pleasant experience! Pages get updated soon after my latest Hugo commits and I’m done. Personally I’ve never had a chance to use pipelines like this. Even though this has been a mostly automated process, it gave me a clearer understanding of how I might build out a CI/CD pipe for future development.
The biggest pain point was getting Github credentials managed across multiple devices. I did settle with the Github Credentials Manager to simplify the authentication process. Windows has been fairly easy, same with using SSH into Linux machines. However it turns out Raspberry Pi’s are a bit more troublesome due to GCM not having an ARM binary release. The process then required compiling from source, which takes quite a bit of time to complete given the performance of the Pi4’s CPU specs. At last, my devices are now configured consistently and plays nicely no matter what I use to work.
Using Neovim āļø
Here’s one that I never thought I would dive into. Traditionally most of my productivity was through VSCode, Notepad++, and a few other IDEs. I wanted to use my iPad to do development work on the go, since I truly believe it is a very attractive form and overall package. What I couldn’t do was use VSCode in a happy way. The iPad does not have any great native editors, you’d have to go with a laptop to get there (truly an Apple design choice). But I like my iPad, its a natural for travel use, and it’d be even better if I could develop on it!
My initial plan was to travel with a Raspberry Pi alongside with my iPad. OK, so we need to plan for connectivity. How would the iPad connect to it? Yes USB-C would work, but that would mean I’d have to use my iPad as a battery; not good! What about Ethernet? I had no idea if such a dongle would be suitable or if it would even work at all. It would also mean I’d have to power the Pi through a power supply; at the wall or battery. Another clunky setup that just didn’t make sense. Carrying a Pi around will also ruin the iPad form factor experience.
Fine, lets keep the Pi as a remote development server at home. I could remote in and it’d be better right? I tried spinning up a VSCode tunnel ./code tunnel (I didn’t know about VSCode tunnels until I was looking around for remote options!). However the experience of a browser based VSCode environment… Lets just say I didn’t like it. Shortcuts were not the same or absent altogether, and the navigation was sluggish, clunky, and just not pleasant. I wanted to give up on the idea… Conveniently enough, “big data” started serving me Neovim YouTube videos and Reddit pages (this might be one of those right moments where personalized content was helpful š
). This seemed to be the solution - a powerful editor usable through an SSH connection!
Using Neovim Continued
My Linux experience had always been through easy to use editors like Nano; which is a great lightweight editor, but just nowhere adequate in editing functionality to replace VSCode. After watching a lot of videos about how amazing Neovim is for all your editor needs - Yeah lets do it, I’ll take the plunge.
I began with just using a plain Neovim install. The :Tutor section was a very gentle introduction. I knew it would be overwhelming to remember everything, so I completed the tutorial over a couple of days, one lesson at a time. DONE! I remembered most of the useful motions and some of the more common commands. It was time to add plugins to give it the functionality YouTube promised me. I landed with LazyVim to be my package manager and it gave a lot of useful default plugins installed. A few other plugins I wanted required some Lua scripting setup, but the official documentation and your usual resources online have been great in achieving a working configuration.
Do expect to take time to get used to Vim motions and commands. I’m nowhere fast or even truly productive with Neovim just yet, but slowly I’m getting the required muscle memory. Similar to my take with Hugo, I’ve also created a Neovim config repo, so I can install Neovim and have the same configured experience on whichever device I may be using. I’m really excited to keep using Neovim and getting more intimate with it. Today I am writing this post with Neovim!
You can probably see how using different tools benefits from being able to sync up no matter what device you use is handy. A Github repo to handle each one of your apps and configurations is essential, I now have available to me a consistent experience anywhere I go. I have no idea why I never did this sooner. Alternatively self-hosted Git repo options were also interesting. While I considered hosting my own, I felt Github’s availability and convenience is far more important.