Home

Awesome

Deploy devdocs locally

You can deploy devdocs.magento.com site locally using this Vagrant project. Vagrant enables you to run the software needed to build the devdocs project in a self-contained virtual machine (VM). Our Vagrant project clones the devdocs repository in the VM and shares the devdocs directory with your system in the root of this project. You can then run Jekyll from the VM in /vagrant/devdocs project root.

What is in the project

Install required software

Install the VirtualBox and Vagrant software for your operating system:

  1. Install VirtualBox.
  2. Install Vagrant.

Customize the project

You can change the following parameters in Vagrantfile:

Windows only: Run the UNIX shell and VirtualBox as Administrator

To enable symlinks to work, Windows users must run both the UNIX shell (recommended, Cygwin) and the VirtualBox application as administrator. The easiest way to do that is to modify the applications' shortcuts as follows:

  1. Right-click the application on your desktop or under Start > All Programs
  2. From the pop-up menu, click Properties.
  3. In the Properties dialog box, click Advanced.
  4. Select the Run as administrator check box.
  5. Follow the prompts on your screen to save your changes.

Create the VM and environment

  1. Using a terminal, change to vagrant on your host (that is, the directory in which this README is located). Example:
    cd ~/magento-devdocs-vagrant/
    
  2. Create and configure guest machines according to the Vagrantfile
    vagrant up
    
  3. Wait for the project to initialize, clone the repository, and install all gems. This command takes some time to complete the first time you run it.

Connect to the VM and run Jekyll

SSH into a running Vagrant machine:

vagrant ssh

Run Jekyll:

cd /vagrant/devdocs/
bin/jekyll serve --host=0.0.0.0

After Jekyll has started, go to http://127.0.0.1:4000 in a web browser on your host.

For additional command options, see Basic Usage.

Regenerate the site

If you made any changes in devdocs project, you can stop Jekyll and run it again to regenerate the _site and preview them in HTML. Automatic regeneration doesn't work in the VM.

Useful CLI scripts and commands

All commands must be run in the terminal from the directory that contains Vagrantfile.

Scripts

Commands

More Vagrant commands.