Vagrantfile
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "bento/ubuntu-16.04"
config.vm.hostname = "ub1604pelican"
config.vm.provider :virtualbox do |vbox|
vbox.name = "ub1604pelican"
vbox.cpus = 2
vbox.memory = 2048
vbox.customize ["modifyvm", :id, "--nicpromisc2","allow-all"]
end
config.vm.network "private_network", ip: "192.168.55.105", :netmask => "255.255.255.0"
config.vm.network "public_network", ip:"192.168.1.105", :netmask => "255.255.255.0"
config.vm.provision "shell", inline: <<-shell --upgrade="" -o="" -y="" apt-get="" cat="" dpkg::options::="--force-confold" eof="" install="" ja_jp.utf-8="" lang="ja_JP.UTF-8" locale-gen="" localectl="" markdown="" noninteractive="" packages="" pelican="" pip="" python-pip="" set-locale="" unzip="" update="" upgrade=""> ./pelicanconf.py
#!/usr/bin/env python
# -*- coding: utf-8 -*- #
AUTHOR = u"Kyle"
SITENAME = u"ペリカンテスト"
SITEURL = ''
TIMEZONE = 'Asia/Tokyo'
DEFAULT_LANG = 'ja'
LOCALE = 'ja_JP.UTF-8'
DEFAULT_PAGINATION = 10
STATIC_PATHS = ['images', 'figures', 'downloads', 'favicon.png']
EOF
mkdir -p content
cat << EOF > content/test.md
Title: テスト記事
Date: 2017-11-03 10:30
Category: Test
これはテスト記事です。
EOF
pelican content
chown -R vagrant:vagrant content
chown -R vagrant:vagrant output
chown vagrant:vagrant pelicanconf.py
echo 'execute following... cd output && python -m SimpleHTTPServer '
SHELL
end
-shell>
○pelicanで生成したテストサイト
0 件のコメント:
コメントを投稿