Contents

Blogging with Hugo

Install

  • macos
1
brew install hugo
  • linux
1
download: https://github.com/gohugoio/hugo/releases/latest

Create a site

1
2
3
4
hugo new site yuancoder-hugo
cd yuancoder-hugo 
git init
hugo server -D

Install theme

1
2
git submodule add https://github.com/dillonzq/LoveIt.git themes/LoveIt
echo "theme = 'LoveIt'" >> config.toml

Directory Structure

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
yuancoder/
├── archetypes/                
│   └── default.md              
├── assets/                     
├── content/                   
├── data/                      
├── layouts/                  
├── public/                   
├── static/                  
├── themes/                 
└── config.toml            

Add content

1
hugo new posts/my-first-post.md

Configure the site

1
2
example: ./themes/LoveIt/exampleSite/config.toml 
config: ./config.toml

Publish the site

1
hugo

Deployment with Rsync

1
rsync -avz --delete public/ www-data@yourserver:/www/