Skip to content

Latest commit

 

History

History
99 lines (72 loc) · 2.19 KB

hugo-quickstart.md

File metadata and controls

99 lines (72 loc) · 2.19 KB
  1. Download & install Hugo
$ curl -sL https://github.com/gohugoio/hugo/releases/download/v0.99.1/hugo_extended_0.99.1_Linux-64bit.tar.gz | tar -xvzf -
$ curl -sL https://github.com/gohugoio/hugo/releases/download/v0.99.1/hugo_extended_0.99.1_Windows-64bit.zip | bsdtar -xvf -
LICENSE
README.md
hugo

$ rm -f LICENSE README.md
$ sudo mv hugo /usr/bin/
$ hugo version
hugo v0.99.1-d524067382e60ce2a2248c3133a1b3af206b6ef1+extended windows/amd64 BuildDate=2022-05-18T11:18:14Z VendorInfo=gohugoio
hugo v0.99.1-d524067382e60ce2a2248c3133a1b3af206b6ef1+extended linux/amd64 BuildDate=2022-05-18T11:18:14Z VendorInfo=gohugoio
  1. Create a new site
$ SITE_DIR=$(mktemp -d)
$ cd ${SITE_DIR}
$ hugo new site quickstart
  1. Add a theme
$ cd ${SITE_DIR}/quickstart
$ git init

$ git submodule add -b master https://github.com/zhaohuabing/hugo-theme-cleanwhite.git themes/cleanwhite
$ echo 'theme = "cleanwhite"' >> config.toml

$ git submodule add -b master https://github.com/kimcc/hugo-theme-noteworthy.git themes/noteworthy
$ echo 'theme = "noteworthy"' >> config.toml

$ git submodule add -b master https://github.com/CaiJimmy/hugo-theme-stack.git themes/stack
$ echo 'theme = "stack"' >> config.toml

$ git submodule add -b master https://github.com/cofess/hexo-theme-pure.git themes/pure
$ echo 'theme = "pure"' >> config.toml

$ git submodule add -b main https://github.com/dataCobra/hugo-vitae.git themes/vitae
$ echo 'theme = "vitae"' >> config.toml

$ git submodule add -b master https://github.com/taikii/whiteplain.git themes/whiteplain
$ echo 'theme = "whiteplain"' >> config.toml
$ cat config.toml

languageCode = 'en-us'
title = 'My New Hugo Site'

#theme = "cleanwhite"
#theme = "noteworthy"
#theme = "pure"
#theme = "stack"
#theme = "vitae"
theme = "whiteplain"
  1. Add some content
hugo new posts/my-first-post.md
  1. Start the Hugo server
hugo server -D
  1. Navigate to your new site
$ xdg-open http://localhost:1313/.
  1. Site Configuration
$ vi config.yaml

baseURL: http://songdongsheng.github.io/
title: My New Hugo Site
languageCode: en-us
theme: stack

DefaultContentLanguage: en
  1. Build static pages
hugo -D