Organize your Posts with Categories and Tags

It can be helpful for your users if you tag your posts with specific keywords, so they can view similar posts.

To set tags for a particular post, open your post's markdown file (*.md) and set the tags key as an array of your tag list. You can do the same with categories too.

---
title: Setting Up an Efficient and Free Tech Blog
date: 2020-09-02 00:26:47
tags: [Hexo, Tech Blog]
categories: [tutorials]
---

By setting tags or categories, if the user clicks on a specific tag/category, they are taken to a different page containing all your posts that have that particular tag/category. This lets readers easily browse more of your content that is relevant to them.

Setting up Live Syncing of your Post Edits

Aren't you tired of having to refresh your site every time you make an edit to a post? Me too. After some digging I found this great Plugin that handles this. All you have to do is edit your posts locally, and your site will sync live while you write!

$ sudo npm i -S hexo-browsersync

Once you restart your hexo server command in the terminal, it should start syncing your changes in real time. You can find other useful plugins by browsing here.

Customizing your Blog URL

You can customize your blog URL to look nicer by editing the blog _config.yml file**.**

I've edited permalink and trailing_index:

# URL
permalink: :category/:post_title/
pretty_urls: 
  trailing_index: false # Set to false to remove trailing 'index.html' from permalinks
  trailing_html: true # Set to false to remove trailing '.html' from permalinks

permalink is by default :year/:month/:day/:title/. This means for a website yourblogdomain.com, if i make a post titled 'Hello-World' on New Year's, the URL will be: https://yourblogdomain.com/2021/01/01/Hello-World which is long and not visually appealing. To make it look nicer, you can set the permalink to show your domain name, then post category, then title. A more detailed description is available here.

Note that since the permalink has category in it, it makes sense to include categories in your post (like above).

set trailing_index to false to remove the index.html from the end of your URL.

Apart from this, you can further customize your blog URL by investing in a custom domain name, which costs around $20 a year. You can explore this option in your Vercel Account Dashboard.

Change the Theme of Your Blog

You can change the Preset Theme for your Blog by choosing a theme from here.

On the theme of your choice, follow the instructions of the GitHub Docs Readme and you're good to go!