This site: Hexo on Vercel
This is a static website built using hexo.io. It is deployed on Vercel. I write entirely in VS Code in the Markdown language. Vercel monitors a git repository for changes, and when it detects changes it runs a
hexo generate to build the new site. I basically manage zero infrastructure and have a simple static site. No big CMS solution, or tons of code that has to run in your browser. This is ideal for me, as someone who fondly remembers the internet made of personal sites made with very simple HTML markup.
The workflow with Hexo is quite simple:
hexo new draft "This very post"
This creates a Markdown file under /source/_drafts called This-very-post.md. Open this in your favored editor and write blog posts as comfortably as you would write code.
hexo publish This-very-post
When you are done writing your post it’s easy to publish it. This will at a timestamp to the posts’s front matter (the bit at the top) and move the file to /source/_posts.
The generate command will build the actual static website files. To preview your site just do
…and your site will be at http://localhost:4000
It is not complicated to update posts after they have been published. Simply edit the Markdown in /source/_posts. You can even adjust the timestamps or anything else in the front matter. The
hexo generate command will have no problems updating your blog.
If for some reason you want or need to build your site from a clean starting point, just run…
… all of your post data will still be there. Hexo will just purge its generated content so you can do a clean build.
Hexo supports plugins as well. I use hexo-generator-feed to publish the site’s RSS feed. Because hexo is a node.js application you can install plugins with
Configuring various options for your site is simple too. Hexo reads your settings in
_config.yml. The developers of hexo, plugins, and themes will provide guidance on what to put in your
_config.yml to set them up.
I really enjoy blogging this way. I don’t have to login to some website or app and suffer some half-baked editor or deal with awful Markdown support and rendering. Best of all I have all my content saved automatically as source code. My content itself is not stored in any proprietary format, just Markdown.
For fun, to generate my site and send it up to git I have a little script called
yeet.sh. Nothing fancy at all but it saves typing.