Skip to content

honmachi-nomi/knp-honmachi-netlify

Repository files navigation

knp-honmachi-netlify

Hugo, Netlify, GitHub

ブランチについて

  • master: 公開ブランチ
  • develop: Theme, サイト設定
  • 記事 post: 記事投稿

Getting Started

$ brew update && brew install hugo
$ git clone git@github.com:honmachi-nomi/knp-honmachi-netlify.git
$ cd knp-honmachi-netlify

Add content

ステータス: 下書き( draft = true )の記事が content/post/hoge.md に作成されます。
draft = true のまま公開ブランチに push しても公開されません。

$ hugo new review/hoge.md

Make posts public

記事が作成できたら、 draft = false にします。

$ hugo undraft content/post/hoge.md

Serve content

現在使用中の Theme 名 robust を引数でわたします。

$ hugo server --theme=hugo_theme_robust

config.toml に以下を書けば、省略することができます。

theme = "hugo_theme_robust"
$ hugo server

http://localhost:1313/

また下書き状態の記事を表示する際は以下のオプションも必要です。

$ hugo server --buildDrafts --theme=hugo_theme_robust