Hugo builds a blog/website
What is Hugo
Hugo is a static site generator (Static Site Generator) developed in go language, with fast frame speed and high flexibility.
Install
There are many installation methods for Hugo, including Windows/macOS/Linux. Here we mainly introduce the installation methods of Windows and macOS. For other installation methods, please check the official website directly.
Scoop (Windows)
scoop install hugo scoop install hugo-extended
Homebrew (macOS)
brew install hugo
Build a website
hugo new site webside
layout theme
Hugo does not have a preset theme, you need to download it from the official website Themes .
Download using git
cd wibside git init git submodule add https://github.com/liuzc/LeaveIt.git
No matter, download LeaveIt Themes and unzip it.
Edit config.toml to set the theme to LeaveIt
Open config.toml input
theme = "LeaveIt"
You can also cut out exampleSite/config.toml in the LeaveIt file and overwrite the original file.
Create new article
hugo new posts/my-first-post.md
Articles will be in the /content directory
Launchpad
hugo server -D
Hugo default port is http://localhost:1313/
subordinate
When the website is completed, a static file is generated to the public
folder and deployed to the remote host.
Refer to the deployment method of each platform.
Like my work? Don't forget to support and clap, let me know that you are with me on the road of creation. Keep this enthusiasm together!
- Author