Hugo — More Than A Static Website Generator

Larry K.
2042
Published in
3 min readMay 16, 2019

I’ve tested and used Hugo for 2 weeks now. One thing I like the most is how fast it could generate the public folder for you. Usually took less than one second and you could have your newly built website. What’s this public folder used for?

Photo Credit: Author

The only difference between left picture from the right one is public folder.

All you need to type is:

hugo

After you got the public folder, you could upload the whole folder to any web hosting service. This folder contained all the necessary files for a static website. You don’t need to upload other folders but this one to internet hosting service company.

The one I used is Netlify. So far I am satisfied with their service. It’s easy to use. Of course, Google Cloud Computing and AWS are good for this purpose as well.

I also found there is another way to use Hugo. I could just use Hugo as a note taking software. Here is all the folders and files generated by Hugo at the very beginning:

.
├── archetypes
│ └── default.md
├── config.toml
├── content
├── data
├── layouts
├── static
└── themes

When we would like to start to write the first note, for example, we could name the article:

hugo new 0516.md

The command above generated a file called 0516.md and it’s located under content folder.

Maybe you’re not familiar with md file. Simply put, we could write normal English with some syntax in this kind of file. It’s like a simplified version of HTML. Of course, we could just have txt file.

hugo new my-thoughts.txt

Result:

/Users/usrname/my-notebook-by-Hugo/content/my-thoughts.txt created.
├── archetypes
│ └── default.md
├── config.toml
├── content
│ ├── 0516.md
│ └── my-thoughts.txt
├── data
├── layouts
├── resources
│ └── _gen
│ ├── assets
│ └── images
├── static
└── themes

The basic architecture of Hugo is it will put all of your text files under the name of content folder.

So you could just generate as many text files as you want. And write as many articles or notes as you could. They will all appear inside content folder. Once you are done, you could easily read them inside your web browser! Isn’t it convenient?

All you need to do is typing:

hugo server -D

Then we open our web browser, no matter it is Google Chrome or Apple Safari.

Input this:

localhost:1313

Your notes/articles will appear in front you. :)

Read them like a website.

--

--