LoginSignup
3
2

More than 5 years have passed since last update.

静的サイトジェネレータHugoをはじめる

Last updated at Posted at 2018-09-16

下記サイトを参考に、ローカルでサイトがプレビューできるところまでを確認する。

環境

macOS 10.13.6

手順

ターミナルで下記を実行

brew install hugo
hugo version # バージョン情報が表示されればインストール成功
hugo new site bookshelf #サイトの作成
hugo new post/good-to-great.md # コンテンツの新規作成 ここを編集してコンテンツを作る
hugo server -D # プレビューする ただしここではまだテーマがないので画面は真っ白
cd themes # テーマを入れていく
git clone https://github.com/dim0627/hugo_theme_robust.git robust

config.tomlへ下記を追記

theme = "robust"

ターミナルで下記を実行

hugo server -D

結果

サイトが表示された。

スクリーンショット 2018-09-17 0.36.42.png

画面を縮めると、スマホ向けのレイアウトになってくれる。

スクリーンショット 2018-09-17 0.36.31.png

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2