iTranslated by AI
Revamping a GitHub Pages site with HonoX
Greeting
Hello everyone,
I am @taisan11.
In this post, I will be refurbishing my website here:
↑ Glad I kept an archive.
The current repository is here.
The finished product can be found here.
Please check it out if you're interested!!
Technologies Used
Since Hono has finally reached V4 and introduced HonoX—a Vite + Hono framework similar to Next.js—I've decided to use it.
Also, since duplicating HTML for blog posts is a hassle, I'm adding MDX as well.
Code Introduction
①
First, I created a branch, deleted everything, committed, and then summoned HonoX.
I applied some CSS and built the main page.
For now, the goal is to make it look similar to the previous version.
② Trying a build...?
When I built it with SSG, the CSS wasn't being generated.
At that time, I had placed the CSS in app/ (following the same logic as the Tailwind CSS setup in the HonoX README).
It seems like using something like
<link rel='stylesheet' href='/static/style.css' />
was sufficient, and placing the CSS files in public/static works.
③ GitHub Action
I used the standard Vite action.
The official one didn't seem to work, so I referred to the article below maybe it was just a fluke?
Final Thoughts
I felt it's well-suited for people who want to use simple HTML and component features in an MPA with Vite, or those who can only use HTML but find it a chore to write HTML every time .
Discussion