This is intended to simply the process of setting up a Jekyll development environment and remove the barrier to entry required to contribute to bitcoin.org.
Before going any further please make sure you have the most recent versions of the following:
Virtualbox - allows you to create virtual machines on your local host machine
Vagrant - creates and configures virtualmachines from a universal configuration file
First thing you will need is to grab the configuration files needed for vagrant to build a virtual machine automatically for you. This will save you the trouble of getting you environment to work properly with the dependencies required to build the website files with Jekyll (the Ruby library used to generate the static website files).
git clone https://github.com/i3inary/bitcoin.org-vagrant-jekyll-box
cd bitcoin.org-vagrant-jekyll-box
Now you will fork a fresh copy of the current bitcoin.org repository with your Github account and clone your new forked repository into the bitcoin.org-vagrant-jekyll-box directory. This step is outlined in detail here on the bitcoin.org README.
You should already be inside the bitcoin.org-vagrant-jekyll-box directory
git clone https://github.com/GITHUB_USERNAME/bitcoin.org.git bitcoin.org # this should be your forked version of the officel bitcoin.org repo
cd bitcoin.org
git remote add upstream https://github.com/bitcoin/bitcoin.org.git
You should already be inside the bitcoin.org-vagrant-jekyll-box directory
vagrant up && vagrant ssh
cd /home/vagrant/bitcoin.org && sudo gem install bundler && bundle install
You should already be inside the bitcoin.org-vagrant-jekyll-box directory
ENABLED_PLUGINS="events autocrossref" ENABLED_LANGS="en fr" make all # partial build for faster preview
jekyll serve --watch
Misc tips and commands to make things go a little smoother.
** Virtual machine resources **
# Modify virtual machine parameters in **Vagrantfile**
config.vm.provider "virtualbox" do |v|
v.customize ["modifyvm", :id, "--cpuexecutioncap", "100"]
v.memory = 1024
v.cpus = 2
end
- Need to figure out how to get jekyll to build faster...currently it takes about 6 minutes on the virtual machine running on a 2013 macbook pro.
- Configure partial building based on files changed somehow..should not build entire project each change
- Live reload setup
- Use apache instead of
jekyll serve