I have been using Hugo to generate my blog, but since I’m not so comfortable with Go, I wanted to try out something fresh and familiar. Between Gridsome and Nuxt, I chose Nuxt.
Hugo -> Gridsome || Nuxt
Hugo has been working well for me but I find the template language unintuitive and compared to using Vue single-file components, it’s like pitch-dark night and blending sunny day. Gridsome was also on my radar but it fell short for me. Some of my reasons were:
Gridsome vs. Nuxt
Relative immature project: Aug. 2018vs.Jan. 2017.
Low number of core contributors: 1vs.5. (over 100 commits total).
Pure popularity: 7.1k GitHub stars vs.32.6k Github stars.
Opinionated GraphQL data layer. But this can be a positive for someone.
All in all, Gridsome is a young project so a lot can change in time. For now, I’m going for Nuxt.
Generating the Nuxt project filled my developer heart with bliss and thrill. I was intrigued by picking Programming language, Package manager, UI framework, Linting tools, Testing framework, Rendering mode, Deployment target, and Development tools. So far, so good. Try it yourself by running this yarn command yarn create nuxt-app nuxt-blog. If you want to generate a static website choose:
Nuxt.js modules: Content
Rendering mode: Universal (SSR / SSG)
When I opened the project in VSCode, it hit me, this was the right choice for my dev blog. I was sitting comfortably in front of a clean and developer-friendly directory structure. My markdown articles are stored in content/articles. The documentation of Nuxt and it’s static module: Nuxt Content was easy to follow and lovely to read. They also have a nice guide for creating a blog using Nuxt content.
Listing out the articles is done in pages/index.vue and it roughly look like so:
So far I have been delighted developing the blog in Nuxt. If you already have a love for Vue, there is no need to evaluate other options, Nuxt is for you. My plan is to extend the site using Vue components and write more articles. But life can be busy so we will see how it goes.
That was it so I wish you all a happy new year and don’t forget to wear a mask 😷.