Hugo builds a blog/website

CasonYang
·
·
IPFS
·

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.

CC BY-NC-ND 2.0

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!

CasonYang嘿! 歡迎滑到我的 Matter ,這裡紀錄這我的技術blog的內容。我喜歡透過文字紀錄來搭建個人知識庫,也可以和各位交流看法。文章大多偏向Web3.0的內容,有興趣的話可以訂閱我。 Telegram: https://t.me/yanglin94
  • Author

Hugo使用Likecoin教學