New Start


By: Axe 2019-09-21

Motivation

My old blog hosted on Linode has gone forever due to my own stupid mistake. However I still need somewhere to write down my thought to share my technical skills and record my daily life.

Technical decisions behind this blog

The criteria:

  • No server needed
  • Support Markdown with WYSIWYG editor
  • Max level flexible
  • https
  • CDN

Ghost

The old blog was built on Ghost CMS system, I've used it for many years since its still in alpha stage. It's a great and powerful CMS overall. It's dead simple to install and have rich selections of themes. The only reason why I decide not keep to use it is that Ghost is not very easy to customize in my opinion and I don't like the template engine used by Ghost. Well, the real reason is I'm too lazy to learn a template engine I won't use in my work or in my personal project. (Who would learn handlebar in 2019?!) Beside these, another reason is I don't want to setup a server to host my blog anymore.

Static site generators

I also took a look into few static site generators including Hugo, Hexo and even Vue Press. Those projects don't really have much differences between each other to be honest. Which means they all have one common problem makes me reject them all - Not powerful enough. I need my site be able run some modern javascript on it.

JAMStack frameworks

JAMStack is kinda new interesting architecture for static site. I tried out the Vue version implementation, Gridsome. I have to say I really like it. It has everything I need and beyond (e.g. image optimization and lazy loading) But why not use it in the end? Because I found a better alternative solution to it! And if I have to say one part I don't have about gridsome, I'd say the API layer design. I strongly dislike to mix view layer with any logic service or API service from my many years of frontend development experiences. Oh wait, there is one more reason, Gridsome doesn't have official Typescript support or guide. Come on, 2019 almost end, please write your javascript project in typescript.

The winner, Nuxtjs

I only used nuxtjs before as SSR framework. And this time I finally got a chance to try its static page generator. I thought the generator would be slow since it need to bootstrap lots stuff and run through many code like middlewares. However the test result didn't let me down, the generation speed is quite fast compare to gridsome. And Nuxtjs satisfy everything I need!

The final stack

At the end I setup nuxtjs with typescript as the main framework. Bootstrap SCSS utilities and selected components as style library. oh, right, I also spent a bit time to tried out another css framework Bulma. It make me feel it's just bootstrap without JS and weaker. Like it's missing lots configure options compare to bootstrap. And with webpack you can easily take out the js part and components you don't want to use by just not importing them.

Aside Nuxt and bootstrap, I picked Netlify CMS as my content management tool and of course use netlify as my host and CDN.

About the cover image

The idea of this work is from the Dao philosophy (道德经), that is everything is derived from same Dao and eventually will become one Dao. This is my first ever oil paint and it's also a projection of my mind.