npm installYou can skip when Press Ctrl + C to stop install hugo.
Mac
brew install hugoor other os:
go install -tags extended github.com/gohugoio/hugo@latest
hugo versionhugo serverPress Ctrl + C to stop Hugo’s development server.
Add a new page to your site.
hugo new posts/my-first-post.mdHugo created the file in the content/posts directory. Open the file with your editor.
---
title: "My First Post"
date: 2022-11-20T09:03:20-08:00
draft: true
---Notice the draft value in the front matter is true. By default, Hugo does not publish draft content when you build the site. Learn more about draft, future, and expired content.
Add some markdown to the body of the post, but do not change the draft value.
---
title: "My First Post"
date: 2022-11-20T09:03:20-08:00
draft: true
---
## Introduction
This is **bold** text, and this is *emphasized* text.
Visit the [Hugo](https://gohugo.io) website!Save the file, then start Hugo’s development server to view the site. You can run either of the following commands to include draft content.
hugo server --buildDrafts
hugo server -DView your site at the URL displayed in your terminal. Keep the development server running as you continue to add and change content.