# hugo 搭建个人博客

# 1. 安装hugo
# 2. Create a New Site
hugo new site yafanisonya.io-creator

# 3. Add a Theme
  cd yafanisonya.io-creator/
  git init
  git submodule add https://github.com/budparr/gohugo-theme-ananke.git themes/ananke
  echo 'theme = "ananke"' >> config.toml

####4. Add Some Content
  hugo new posts/my-first-post.md


将draft值改为false,否则为草稿状态
# 5. Start the Hugo server
 hugo server -D


# 6. Customize the Theme

# 7. Build static pages
  hugo -D

# 8. 本地推送至github
在/d/github/yafanisonya.io-creator中创建.gitignore文件,将/public写入,使得public自成仓库
  cd public/
  git init
  git add .
  git commit -v
在github新建仓库,仓库名为 用户名.github.io

  git remote add origin git@github.com:yafanisonya/yafanisonya.github.io.git
  git push -u origin master


在yafanisonya.github.io仓库中设置GitHub Pages-->Source-->master

# 最终效果

# hugo更新博客方法:
# ①:新建博客
  hugo new posts/my-first-post.md

然后编辑博客内容
# ②:hugo

# ③:推送

    cd public/
    git add .
    git commit -v
    git push


