My new blog – my new journey
Hey guys, this is my brand new web – blog, released in November 2020 (the same day with the Election in US – still not have the results at the time I write this post).
TL;DR : In this post, I will share some technologies I used for this website :
- Gridsome : For static site generating.
- WordPress.com API : To store blog posts online for free (as a Headless CMS).
- Firebase : For free hosting with custom domain.
I bought this domain (Dshongphuc.com) in 2013 for my personal website and blog. Back to that time, I was a website designer & developer so I think a personal website will help me to promote myself, and it did very well. This is how my home page was look like :
I know, it looks terrible now 😀 But it was 7 years ago, at that time the style like that is very popular. Currently, I’m not a web designer anymore, I graduated from university with a bachelor degree in Computer science few years ago. I’m working full-time as a software engineer now. Therefore, I don’t need to develop a flashy website for myself anymore, I will keep it simple from now on !
I decided to create this blog to save something of my life, some lessons I have learnt, some of my new ideas, my plans for the future,..
Because I’m a web developer, so I really care about the technologies of my blog. I was a big fan of WordPress (I was a WP developer for more than 3 years), but it’s too slow, I need something faster, much faster ! And you guess what, static site is always faster than dynamic site, so I decided to create my blog as a static site instead.
I tried my best to choose an opensource static site generator, there’s a lot of Generators : Next.js, Gatsby, Hugo, Jekyll, Nuxt,… But after all, I choose Gridsome – it’s really the good one to get started.
Why Gridsome? Because it’s built on top of Vue.js, and I’m a big fan of Vue.js. Oh wait, but Nuxt.js is also built on top of Vue.js, why don’t I use it instead? Because Nuxt is too heavily for this purpose (static site), Gridsome is developed for only this reason, very lightweight and easy to develop.
Okay, so we’ve done for the static site generator. The next thing we need to care about is a way to store the content, I don’t want to write my blog post in Markdown format and save it as files on my local computer, I will lose it soon or later, I need to find another way to store it in a long time, I mean forever ! A lesson I’ve learnt before is that if I use some paid service online, It can also be lost in the future too (I’ve forgot to pay the bill of my hosting, so they just deleted all of my data without warning and waiting for my response), I want something free instead. And you guess what, I came back to the WordPress ^^! But it’s WordPress.com – a service to create wordpress website without hosting, the interesting thing is that they have free plan if you use their domain (*.wordpress.com). I found that they also allow us to access their public API, all free websites on their database can be access via public API at : https://developer.wordpress.com/docs/api/
Alright, so I think you have understand my idea, just write my blog posts on WordPress.com and apply the API to Gridsome to get the content. Then I can store my static site on my own custom domain without paying any fee. The last problem is hosting, I want it to be free too, if you use WordPress.org source for your blog, it’s very hard to find a free hosting. But if it’s just HTML files, there’s a lot of free hosting on the internet. One of the best one is Google Firebase – they even give you free SSL for your custom domain. It’s soooo great !
So in summary, I have my own static website which can be accessed via my custom domain, with a place to store content forever, it’s all FREE ! How cool is that? 😀
The final words
The theme of this site is also designed and developed by me (hand code with love hehe), it’s just very simple and focus on content. I believe someone will love it if I share it free for you guys, I’m fixing some issues of it now, after it’s all good, I will share it to Github for sure ! You guys can follow my Github at https://github.com/dshongphuc : I often share some interesting on that.