Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Another Move of My Blog? #179

Open
AllanChain opened this issue Apr 6, 2022 · 2 comments
Open

Another Move of My Blog? #179

AllanChain opened this issue Apr 6, 2022 · 2 comments
Labels
blog: programming @post This is a blog post tag: gridsome |178272815-42944a54-42aa-4b5a-9032-5de8ac08e418.png

Comments

@AllanChain
Copy link
Owner

AllanChain commented Apr 6, 2022

View Post on Blog

image

It really needs a serious discussion.


Above image from https://astro.build/blog/astro-1-release-update/

Well, yes. I'm planning another move.

It's not only because the front-end ecosystem is moving fast, but also about all the unsolved problems.

Brief History

Before I present the motivation and possibilities of moving to Astro, let me briefly introduce the history.

The oldest version of my blog is ProgrammingNotes, which has been archived. It was built with MkDocs. It is a great tool for documentation, but not for blogs. It's more like a knowledge base than an actual blog.

Then I switched to Hugo. I chose Hugo mainly because of its wide adoption in simple personal websites. There are hundreds of awesome templates for displaying your experience and publications. And I made my own theme from a great theme called XMag. During the process of making and maintaining the theme, I found that Hugo's template language is really counter-intuitive and hard to do right (hugo-toc). Also, the comment on GitHub system is hard. The OAuth and "behave on your behalf" approach is not elegant. So I chose (vue-iblog) to blog directly with GitHub issues. And I was learning Vue, so Gridsome is a natural choice.

The Motivation

But Gridsome has its own problem. It's updating slowly. Very slow. The Vue ecosystem has changed a lot in recent years, and Gridsome fails to keep up.

Alright, if that's the only reason, I'll just stick to Gridsome. But there are more.

It was a wrong choice to use Vuetify for a blog. Vuetify provides a lot of useful components and is a fantastic framework for apps. It was the only great UI framework for Vue I knew at that time. However, it just makes a blog site bloated. There is too much JavaScript and CSS for a site deployed on GitHub Pages and visited mainly in my region. Although I'm using PWA (Progressive Web App) tech to ease the pain, the first-page load is still slow, and PWA itself is introducing a lot of inconsistent and buggy behaviors. Besides, Vuetify's design is not suitable for blogging, or maybe it's my fault for not doing this in the right way. People are just tired of material designs, probably because it looks like a cheap app.

Things will be different if I migrate the blog's UI system to Tailwind / WindiCSS / UnoCSS. The bundle size will be small, and it will be easy if there is another move in the future. I have already used both WindiCSS and UnoCSS in a couple of projects, and they are awesome, especially the attributify mode.

Also, with the new micro-blog, the old 3-part division (moments, cheat sheets, programming) is no longer needed. The category can just act like a normal tag. Also, I'm planning to adopt a common blog index page, namely focusing on the recent posts, and hopefully making it more attractive.

Possibilities of Using Astro

Why not Vite SSG?

One already has great SSG (Static Site Generation) in Vite, why bother using another framework? The answer is that the SSG Vite community provides is not suitable for a blog. I really don't like the idea that every page is a component. In the context of blogging, the blog content is more data than components.

Advantages of Using Astro

Astro fetches data ones at build time just like Gridsome, while Nuxt still fetches data when switching pages. So the logic of fetching data from GitHub Issues can just be reused.

Besides, when it comes to making blog content interactive (i.e. copying code blocks, making an interactive table of contents), the amount of required vanilla JavaScript is no less than actual Vue code. So it might be better just to embrace vanilla JavaScript and create Vue components when necessary.

Moving Blog too Often?

Yes, it's a bad practice to constantly move blogs without writing many posts in between. However, the blog is not just a website to log something, it's also a place we explore and play around with new web technologies!

Besides, during this move, adopting Astro is just a small part of it. It's just a little more than a "regular" update.

@AllanChain AllanChain added blog: programming @WIP The post is working in progress labels Apr 6, 2022
@AllanChain AllanChain added this to To do in Post Process Apr 6, 2022
@Yixuan-Wang
Copy link

❎ blogging
✅ blog-rewriting

@AllanChain
Copy link
Owner Author

❎ blogging
✅ blog-rewriting

To put it in a nicer way:

❎ A website to log something
✅ A testing field for new techs

@AllanChain AllanChain added @post This is a blog post and removed @WIP The post is working in progress labels May 1, 2022
@AllanChain AllanChain moved this from To do to Done in Post Process May 1, 2022
@AllanChain AllanChain added the tag: gridsome |178272815-42944a54-42aa-4b5a-9032-5de8ac08e418.png label Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blog: programming @post This is a blog post tag: gridsome |178272815-42944a54-42aa-4b5a-9032-5de8ac08e418.png
Projects
Status: Done
Post Process
  
Done
Development

No branches or pull requests

2 participants