静的サイトジェネレーターを使ってみたいなと思って調べているときに、どうせ使うならPythonのやつが良いなと思ったので、Pythonを使っているもので調べた結果、hydeを見つけました。
hydeは、Rubyのjekyllを意識した静的サイトジェネレーターということで、公式サイトにもjekyllの文字が出てきます!!
詳しくは下記参照でお願いします!
http://hyde.github.io/
hydeを使ってみるためにpythonの環境を構築したので、実際にインストールしてみました!
インストールは下記のコマンドで行います。
D:\www\home>pip install hyde
Downloading/unpacking hyde
Downloading/unpacking fswrap==0.1.2 (from hyde)
Downloading/unpacking commando==0.3.4 (from hyde)
Downloading/unpacking PyYAML==3.10 (from hyde)
Downloading/unpacking Markdown==2.3.1 (from hyde)
Downloading/unpacking MarkupSafe==0.18 (from hyde)
Downloading/unpacking Pygments==1.6 (from hyde)
Downloading/unpacking typogrify==2.0.0 (from hyde)
Downloading/unpacking smartypants<1.8 (from hyde)
Downloading/unpacking Jinja2==2.7.1 (from hyde)
いろいろと省略しますが、上記のパッケージを一緒にインストールしていました!
インストールが完了したら、createコマンドでhydeの初期ファイルを作成します。このとき-sオプションをつけるとファイル生成パスを指定することができます。
D:\www>hyde -s ./home/hyde create
10:46:42 hyde Creating site at [D:\www\home\hyde] with layout [C:\Python27\lib\site-packages\hyde\layouts\basic]
10:46:43 hyde Site creation complete
無事にサイトが作成できたので、作成したフォルダに移動してgenコマンドで初期状態のサイトを作成してみます。
D:\www>cd home/hyde
D:\www\home\hyde>hyde gen
10:47:35 hyde.engine Reading site configuration from [D:\www\home\hyde\site.yaml]
10:47:35 hyde.engine Reading site contents
10:47:35 hyde.engine Generating site at [d:\www\home\hyde]
10:47:36 hyde.engine Configuring the template environment
10:47:36 hyde.engine Generating site to [d:\www\home\hyde\deploy]
10:47:38 hyde Generation complete.
genコマンドで-dオプションを使わない場合、deployフォルダが作成されてその中にファイルが入ります。
D:\www\home\hyde\deploy\about.html
D:\www\home\hyde\deploy\apple-touch-icon.png
D:\www\home\hyde\deploy\favicon.ico
D:\www\home\hyde\deploy\index.html
D:\www\home\hyde\deploy\blog\angry-post.html
D:\www\home\hyde\deploy\blog\atom.xml
D:\www\home\hyde\deploy\blog\excerpts.xml
D:\www\home\hyde\deploy\blog\happy-post.html
D:\www\home\hyde\deploy\blog\index.html
D:\www\home\hyde\deploy\blog\sad-post.html
D:\www\home\hyde\deploy\blog\tags\angry.html
D:\www\home\hyde\deploy\blog\tags\happy.html
D:\www\home\hyde\deploy\blog\tags\sad.html
D:\www\home\hyde\deploy\blog\tags\thoughts.html
D:\www\home\hyde\deploy\media\css\site.css
D:\www\home\hyde\deploy\media\css\syntax.css
D:\www\home\hyde\deploy\media\images\airport.png
D:\www\home\hyde\deploy\media\images\dark.png
D:\www\home\hyde\deploy\media\js\libs\dd_belatedpng.js
D:\www\home\hyde\deploy\media\js\libs\jquery-1.5.1.min.js
D:\www\home\hyde\deploy\media\js\libs\modernizr-1.7.min.js
D:\www\home\hyde\deploy\portfolio\index.html
ファイルが作成できていることを確認できたので、ブラウザからアクセスすると下記のようなページが表示されました!
ひとまず、使えることが確認できたので、今後はテンプレートの編集などをやってみようと思います。