· hugo

hugoの基本操作の備忘録

hugoの基本操作

サイトの新規作成

$ hugo new site hogehohge

ページを作成する

$ hugo new hello-hugo.md

テーマフォルダを作成して、テーマをダウンロードする

$ mkdir themes && cd themes
$ git clone https://github.com/Zenithar/hugo-theme-crisp.git

ドラフトをテーマを反映してローカルで確認

$ hugo server --theme=Crisp --buildDrafts --watch

themeの変更方法

theme のフォルダ構成(archetypes, layouts, static)は作業環境のそれとほぼ同じである。 実は theme の構成は作業環境で上書きできる

作成したページをundraft(公開)にする

$ hugo undraft content/hello-hugo.md

公開ページを生成

$ hugo --theme=Crisp

リポジトリへの反映

Bitbucketへの登録

$ git add -A
$ git commit -m 'detail of changed contents'
$ git push -u origin master
  • LinkedIn
  • Tumblr
  • Reddit
  • Google+
  • Pinterest
  • Pocket