LoginSignup
1
3

More than 5 years have passed since last update.

Go言語のHugoを使おうとして、ハマったので備忘録

Posted at

HUGOとは?

静的なHTMLを作成することができるGo言語製の静的ページジェネレーターらしいです。

インストール環境

go version go1.11.4 linux/amd64

公式サイトを参考に

公式サイトに

mkdir $HOME/src
cd $HOME/src
git clone https://github.com/gohugoio/hugo.git
cd hugo
go install --tags extended

上記を試したのですが、依存関係のパッケージが無いと怒られました。(すみませんエラー残し特の忘れたので、多分パッケージ関連のエラーだったと思われます)

govendorを試す

govendor get github.com/gohugoio/hugo

を試したのですが、

github.com/gohugoio/hugo/vendor/github.com/cpuguy83/go-md2man/md2man
vendor/github.com/cpuguy83/go-md2man/md2man/roff.go:15:15: undefined: blackfriday.Extensions

というエラーに、
そのままググったところ、
https://github.com/gohugoio/hugo/issues/4390
こちらに行き着きました。

mageを使う

govendor ではなく、mage というものを使えとのことでしたので、

 go get github.com/magefile/mage 
 go get -d github.com/gohugoio/hugo 
 cd $HOME/go/src/github.com/gohugoio/hugo 
 mage vendor 
 mage install 

で、インストール出来ました。
なんかモヤモヤするけど。

何か、誤り等ありました。ご指摘いただけると幸いです。

1
3
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
1
3