/ Yongsub Lim

Build Your Own Blog with Hugo - Basic Customization & Tips

Changing Blog Title

Open <ROOT>/config.toml, and change the value of key title.

Designing Blog Menu

Find [[params.menu]]. For each [[params.menu]] item, name means a name appearing in the main page, and url means an address where you are moved by clicking the name. Order [[params.menu]] records as the same order you want to display in the main page.

Excluding Draft Pages When Deployed

You can designate a page as a draft, which will be excluded when you deploy your blog. This is especially useful when you have some pages in progress, not ready to publish, or want to exclude some existing pages temporarily. To make a page a draft, you can just add the following line to the front matter of a page:

draft = true

All pages with this line will not appear in your blog when deployed.

Managing Resources

You may have some figures and files to show in or be linked from your pages. To store such resources, you can make any folder in <ROOT>/content, and <ROOT>/content/resources would be a good choice. In your page, you can indicate <ROOT>/content/resources/abc.png by /resources/abc.png. For instance, you can insert the following line in you .md file to display cat.png

 ![My Cat](/resources/cat.png)

Some resource files can be coupled with draft pages which you don’t want to publish yet. To achieve a similar effect to draft = true, you can add the following line at the first line of <ROOT>/config.toml:

 ignoreFiles = ["resources/_first_dir", "resources/_second_dir"].

This line will exclude two folders resources/_first_dir and resources/_second_dir when your blog is deployed. The leading underscore of the folder names are not necessary, but would help you prevent to mistakenly put files into publishing folders.