*First post!

Made with 11ty

Hello, World!

Welcome to my blog! This isn't really my first time blogging, I've written some articles on my Đotfiles's wiki before, but NNBlog is a fresh start. In the coming month, I will copy most articles from the Dotfiles to this site.

The technical

Before that, I wanted to show off a little bit about the technical side of this site. This is a static website generated using 11ty (Eleventy). 11ty is a light, simple and convenient JS framework. Its most important feature is that it allows the us to write the page in Markdown. Not only that, it also has many features such as creating a table of contents, tag manager... This is quite ideal for a tinker like me.

I also use DaisyUI for styling and Alpine.js for a bit of interactive. Although, Alpine.js is a bit overkill at the moment (the only thing that needs it is an image hover effect on the homepage):

Hover effect

But in the future I can give a small interactive parts in some articles.

Support multi-language

Before, I only wrote in English because I wrote it on Github Wiki. But as you can see in the right corner of the Navbar there is a button to change to Vietnamese, I had blog in both English and Vietnamese! From now on, I will write in my native language first, then translate it to English. I'm quite confident about my English listening/reading skill, but I'm still a writing newbie, so LanguageTool (an open source grammar checker) has become an indispensable tool for me.

The common way to support multi-language in 11ty is to split it into two directories en/ and vi/, the same post has separate files of each language on each directory. That method is fine, but I want more flexibility in managing and reusing the elements of the article. So I let 11ty paginate each Markdown file into two pages in English (with lang = 'en') and Vietnamese (with lang = 'vi') so I can write in a single file like this:

---
title:
en: "*First post!"
vi: Blog post "đầu tiên"!
description:
en: Made with 11ty
vi: Khai bút đầu năm bằng 11ty
tags:
- update
- web_dev
date: 2023-01-22
image: https://images.unsplash.com/photo-1674240660273-a3496c4604fd
---

{% if lang == 'vi' %}
Xin chào!
{% else %}
Hello!
{% endif %}

That's all folks, I hope you all look forward to reading my next blog posts, bye!