KTamas' Blog

Remember kids, if Internet Explorer is brave enough to ask to be your default browser, you're brave enough to ask that girl out.

Posts about meta

Converting My Blog To Hugo and Getting Rid of My VPS

· 955 words · 5 min read

I have a blog (you’re reading it!). It’s got history: I set it up in early 2009, and I have almost 600 posts, mostly in Hungarian. I had one before that, between 2005 and 2008, but it was lost due to a variety of reasons, including my failure to properly back things up. Small bits of it are still up in the Wayback Machine, though. It was all in Wordpress, which does its job, though even in 2019 it can be a pain to update things.

From Wordpress to Jekyll to Hugo

About a week ago I decided it was time to migrate it to Jekyll. I was bored, and it gave me a good excuse to play with a static site generator. Plus, doing this kind of conversion became a rite of passage for people working in tech these days.

This is not a complete guide; you can find hundreds of them with a quick google. I will, however, provide a general overview of the process with some helpful pointers and links.

I started by migrating all the comments to Disqus with their official Wordpress plugin. After that, I used a Jekyll exporter plugin that converted all my posts into markdown… except it stripped all the embeds.

I used to blog a lot about music, so I had a lot of embeds, mostly from Youtube. In retrospect, I could have saved myself some time by patching the exporter or finding another one. In the end, however, I ended up fixing every single post by hand. I replaced old, pre-iframe flash embed codes with updated ones and changed the newer, but still http ones to https. In most places, if the video was not necessary or wasn’t available anymore, I added the song to the post via Spotify. The chances of a given song being up on Spotify in a few years feels marginally higher than on Youtube right now. I had a few other embeds that I could fix with newer code (Soundcloud) and others that I couldn’t (Deezer), but most of the time I could find the given song or playlist within Spotify. All of this had the benefit of walking down on memory lane, reading 10-year old blog posts and cringing a lot. I was so young.


I’ve found a reasonably decent theme for Jekyll, which felt like a good starting point, though it didn’t have built-in support for tags or archives. I started googling how to implement that, and around the same time I was venting about my embed issues on the XOXO slack. That was when David chimed in about his experiences on doing this exact same process, except he ended up using Hugo, another popular static site generator that’s kind of like Jekyll except faster. The theme of his blog had everything I wanted: a fancy archives page and proper support for tags. So I figured I might as well continue my journey: switch to Hugo and use his theme as a basis.

Jekyll is written in Ruby and uses a simple templating language. Hugo’s code is in Go, and it uses Go’s own templates; they definitely have a learning curve, even if you have coded in Go before. With some help, googling and a lot of trial and error, I got the hang of it and managed to change things to my liking as well as the look and the color scheme of the site. I converted most of my posts’ front matter with a script and fixed the rest with a few search-and-replaces. With 8-10 hours of work behind me — half of that was fixing those embeds — I had my new blog ready to be hosted on Github Pages for free. I use a modified version of the sample deploy script they have in Hugo’s documentation.

Getting Rid of My VPS

I had a small VPS at Linode for years now, hosting my pet projects, my blog and a bunch of static sites (like my home page) over the years. It also had OpenVPN installed so I could watch iPlayer for free until BBC started cracking down on that. By now it only had my blog and those static sites; I figured if I could find something for the latter, I could ditch the VPS entirely.

I don’t remember how, but I came across Netlify. They give you free static hosting with extremely generous soft limits (100 gigs of storage, 100 GB/month transfer). You just point them to a Github repository, and about 30 seconds later you have your site ready, with support for multiple custom domains and SSL.

I spent an hour or two moving everything to Netlify, changing the necessary DNS entries and in the end, I was ready to say goodbye to my VPS and save a grand total of $7 a month in the future. I made backups of everything and then, somewhat emotionally pressed the “Delete” button on Linode’s control panel. I wouldn’t be surprised if I would get another one eventually for a side project or something, but for now, I’m happy with my all my stuff hosted around the internet for free and stored in git repos.

On the Future of My Blog

There is a lot more content to come as I started writing regularly. Feel free to subscribe to this blog in your favorite RSS reader.

Hugo gives me a lot of ways to tinker; I am already thinking about replacing the commenting system, adding reading time, word count and so on. I might write something on this in again in the future.

This post was not sponsored by anyone, just in case some of it reads like an ad for Github or Netlify or whatever.

On Writing for 31 Days Straight and Counting

· 698 words · 4 min read

Last night I went to bed feeling I might be getting sick, and I woke up most definitely sick. It feels like something in-between a cold and full-blown flu, and I mean, whatever, it’ll pass. What bothers me is the timing: I started working with a personal trainer last week and been to 4 classes so far. Now I’ll have to skip a bunch, and that’s bad when you are building a habit.

I have at least one more post ready in my SF & XOXO 2018 series (to come), but right now I’m struggling to write end edit the ones that come after them. So I’m taking a break today to reflect on writing, and in particular, writing here.


This is my 31st post here, and I have not skipped a single day. I joined the day Owen opened signups. It’s the second longest personal writing streak I have — the first one would be the one I did when I moved to Sweden and blogged about my life daily for the first few months. I’m sure I skipped days here and there, but I wrote a lot during those days.

I used the term personal writing intentionally. Back in 2003, shortly after I started high school, I started working for a tech news site covering mobile devices, phones and PDAs.

(remember PDAs? I was really into them and had several over the years, even smartphones, and this was years before the iPhone. That’s where most of the money I earned went.)

I kept track of what’s up with the tech world and wrote a news article about whatever I’ve found interesting and fit my scope. For the first two years or so I did it for free; after that, I earned roughly 75 cents per news article. I wrote a few features, reviews and interviews as well (can’t remember how much I made from that, but not a lot).

In many ways, it was the dream writing job. I could write about anything I wanted, and the money I earned with it was significant for a 17-year old still living with their parents. I do feel somewhat ripped off financially in retrospect, though.

I stopped working for the site not long before I finished high school — I sort of lost interest. I think it had run its course.

Some habits do stay with me to this day from that era. Keeping up with the news is one of the reasons I got addicted to RSS and Google Reader. I read The Verge’s and Ars Technica’s feed religiously to this day, even though it is no longer necessary and I skip reading like 95% of it.


All of the writing I mentioned above has been in Hungarian, though. This is the first time I am writing a significant amount in English, a language that’s not my mother tongue. Now, I pride myself having a good grasp on the English language, and have been fluent in it since I was 15 or so. I don’t even have the stereotypical Hungarian accent; it sounds like generic American English to most ears. When I lived in Sweden, I spoke English 90% of the time. I can and still do think in English a lot. When I’m alone and am talking to myself, that’s often in English as well.

And yet, writing is a different beast entirely. I don’t think I’m bad at it, but I’m conscious of the fact that I’m not great either, and have a lot to learn. I run everything I write through Grammarly and Hemingway, and they help, but they’re not silver bullets. I started reading On Writing Well (thanks, Owen), since nonfiction writing is my thing. And posting here at least 300 words every day itself helps a lot.


So here I am, 31 days later; a month done, who knows how many to go. And I enjoy it a lot, even though I have no metrics on how many people are reading these posts of mine (I like having an audience and will not apologize for that). For now, I’ll go back to editing and rewriting my series. I have work to do.

Koltozes a felhobe

· 374 words · 2 min read

Ket dolog tortent, az egyik, hogy mostanaban folyton elszallt a php-nginx kombo egyszercsak a 64 megas VPS-en, amit anno osszeraktam. Frissitettem, megneztem a konfigokat, megis, egyszercsak elhalt az egesz, kezzel kellett ujrarugni. A masik dolog, ami tortent, hogy mikor tegnap este ismetelten kaptam a pingdomtol emailt, hogy “DOWN alert: blog (blog.ktamas.com) is DOWN”, akkor azt mondtam, hogy oke, eljatszotta az utolso lehetoseget is a helyzet, holnap (azaz ma) uj VPS-t keresunk.

Azaz, kerestunk volna, mert ma reggel kaptam egy emailt, ami igy kezdodott:

“You have been selected to enter the PHP Fog Beta program!”

A masik dolog, ugyanis ami mostanaban tortent, az az volt, hogy egyre-masra bukkannak fel a hacker newson Heroku-szeru cloudos PaaS-ok (Platform as a Service), eloszor talan pythonhoz-djangohoz, majd kesobb mindenfele mas programnyelv/framework/egyeb kombohoz. Mint anno a betas Heroku, ok is altalaban ingyenes betakra epulnek, hogy az emberek jol kibetatesztelik az ingyenes/olcso szolgaltatasert cserebe az egeszet. Raadasul a deployment szinte kivetel nelkul giten keresztul megy, ami iszonyat kenyelmesse teszi a dolgot, mostanaban egyre tobb projekten dolgozok amihez amugyis azt hasznalom (itt a githubom, nem disznolab). De eloreszaladok, ez egy masik blogposzt temaja lesz, remelhetoleg hamarosan.

Szoval kaptam PHP Fog betat, amire miert is ne alapon bejelentkeztem meg circa szuk ket honapja, megcsinaltam az accountot, csinaltam egy uj wordpress appot (fel evig ingyenes a legkisebb csomagban, aztan majd meglatjuk), kidumpoltam az adatbazist a regi szerveren, kimasoltam a gepemre a regi wordpress mappammal egyutt, git-cloneoztam a repot arrol az URL-rol, amit a PHP Fog adott nekem, felulirtam a wp-content mappat a regivel, behuztam PhpMyAdminbol a regi adatbazist, eeees… futottam meg egy kort a supporttal, mert hiaba pusholtam a szerverre, hiaba mondta h sikeres, a friss wordpress telepites nem nagyon latta a repoba rakott fajlokat. Mindenesetre dicseretes, hogy a szupportosok szombat ellenere par ora alatt valaszoltak es megjavitottak a helyzetet, atraktam a domain A-rekordjat, ujraimportaltam a DB-t mert azota irtam egy posztot, es most meg eppen ezt irom.

A felho tehat borzasztoan kenyelmesse tesz dolgokat, ami persze nem jelenti azt, a helyzet felhotlen lenne (elnezest), az elmult napokban is voltak erre peldak, ugye, mindenesetre programozooldalrol tenyleg iszonyat kenyelmesse tesz dolgokat, hogy (kis tulzassal) git push, es szevasztok. A bennem levo controlfreak rendszergazda most epp el van tehat nyomva, de biztos ki fog jonni egyszercsak…