静的HTMLのみでサイトを作りたいのでJekyllをインストールしたみた。
rubyをインストール
yum install ruby sudo bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer ) sudo usermod -a -G rvm root sudo gpasswd -a root rvm sudo gpasswd -a apache rvm source /etc/profile.d/rvm.sh rvm get head rvm install 2.1.0 rvm use 2.1.0 --default rvm list rvm_trust_rvmrcs_flag=1 gem install bundler --no-ri --no-rdoc gem install jekyll jekyllのインストール [root@centos5 _posts]# jekyll serve Configuration file: none Source: /home/test/_posts Destination: /home/test/_posts/_site Generating... Liquid Exception: Failed to get header. in 2013-12-02-welcome-to-jekyll.markdown error: Failed to get header.. Use --trace to view backtrace error: Failed to get header.というエラーが発生 gem uninstall pygments.rb gem install pygments.rb --version "=0.5.0" 上記の方法で解決 [root@centos5 home]# jekyll serve Configuration file: none Source: /home Destination: /home/_site Generating... Liquid Exception: EPIPE in test/_posts/2013-12-02-welcome-to-jekyll.markdown error: EPIPE. Use --trace to view backtrace python2.7にしないと行けないようので、バージョンアッップ python24からpython2.7に変更。 wget http://www.python.org/ftp/python/2.7.5/Python-2.7.5.tar.bz2 tar jxvf Python-2.7.5.tar.bz2 cd Python-2.7.5 ./configure --enable-shared make make install echo '/usr/local/lib' > /etc/ld.so.conf.d/python27.conf ldconfig [root@centos5 mobile]# jekyll serve Configuration file: /home/mobile/_config.yml Source: /home/mobile Destination: /home/mobile/_site Generating... done. Server address: http://0.0.0.0:4000 Server running... press ctrl-c to stop.
本当はpythonで静的なHTMLを生成するツールがよいのだが。
pythonには、hydeがあるけどあまり情報が少ないのでJekyllにしてみました。
AmazonのS3上に静的HTMLのみでサイトを作りたかった。Jekyll-s3とかあって便利そうだったのでこちらにしてみた。
なんか案外簡単にサクッとできなかった。
今後、Jekyllはブログ以外にFAQとか作るのに便利かも。