This VM provides a fresh Jekyll instalation.
We use a standard Ubuntu/Bionic as the base image, and install Ruby + Jekyll.
The website (Jekyll project) source code is copied from the host machine to the guest VM (through shared folders) where Jekyll can be executed transforming the templates, text files and assets into a static website.
The generated website will be localted within the standard _site
folder of the Jekyll project sources. Given that the shared folder synchronization is bidirectional (host->guest and guest->host), the _site
folder will be available in the host machine too.
- Git
- VirtualBox
- Vagrant
- [Optional] Moonshine-IDE
- Download and install VirtualBox.
- Download and install Vagrant.
- Download and install Git.
- [Optional] Download and install Moonshine-IDE.
- [Optional] If you want to use the Moonshine IDE Website (which is a Jekyll project) to test this, then using Git clone the MoonshineIDE website repository.
- IMPORTANT: Comment or remove the gem
sass
from theGemfile
of the Moonshine IDE website.
- IMPORTANT: Comment or remove the gem
- Using Git, clone the vagrant-jekyll repository (this project).
- Open the project in Moonshine IDE by double-clicking
JekyllWebsite.javaproj
(or Project > Open/Import Project) - Locate the
Vagrantfile
in the base path of this project and set the followin variables:PROJECT_SOURCE_IN_HOST
: the path where the Jekyll project (MoonshineWebsite or other) resides.IS_SASS_USED
: if your Jekyll project doesn't use Sass, set this to "false".RUBY_VERSION
: set the Ruby version that will be installed in the VM.
- Use the Vagrant support in Moonshine IDE to launch the virtual machine: find the
Vagrantfile
and use the right click to open the Context menu, selectVagrant
>Up
. The static website will be available at127.0.0.1:4000
(by default). You can make changes to your local Jekyll project files and the static website will be automatically updated and reloaded. - Use the Vagrant support in Moonshine IDE to stop the virtual machine: find the
Vagrantfile
and use the right click to open the Context menu, selectVagrant
>Halt
.