How to Build Blog

Build hugo Static blog (Build article)

1. Ready

2. Build site

New hugo sitehugo new site your-blog-site

The directory format should look like this

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
---archetypes

---assets

---content

---date

---i18n

---layout

---static

---themes

---hugo.toml

3. Change theme

  • Drag the theme file intothemes

  • Add the following code to hugo.toml:

    1
    2
    3
    4
    
    baseURL = "https://your-site.com"
    title = "your-site-name"
    languageCode = "en-us"
    theme = "name"#The theme folder name needs to match this
    

4. New Page

  • Create a new archive.md in content
1
2
3
4
title: "archive
layout: "archives"
url: "/archives/"
summary: archives

5. New Post

Type in git

1
hugo new /content/posts/the-first-post.md
Licensed under CC BY-NC-SA 4.0