Skip to content
This repository has been archived by the owner on Jun 21, 2022. It is now read-only.

[OUTDATED] Getting started

Ashwin Vangipuram edited this page Jun 2, 2021 · 1 revision

2017-2018 Procedures:

  • Please follow the new procedures described in Website Setup Doc. Updated as of September 26, 2017.

  • Reasoning: in the past, Axiom VM was recommended so to standardize the development environment. However, due to the development slowdown and relative simplicity of packages needed, in addition to package managers like Yarn that make dev environment maintenance easier, the project manager this year deems that we can move back to just installing directly on our machines. Yay for a faster development setup and not needing to boot up a virtual machine each time. That being said, the VM is actually what we have on the actual server, so it'd be interesting to look into how it is automated.

2015-2017 Procedures:

1. Setting up your dev environment

Jekyll is written in Ruby and requires it to run in your dev environment. We strongly recommend that you use PiE's Axiom VM as your development environment, so that settings will be consistent across computers. To install the Axiom VM, follow these steps:

  1. Install Vagrant and Virtualbox
  2. Set up Axiom VM on your own computer: 3. Run git clone https://github.com/pioneers/devops.git from the command line. 4. Follow the instructions in DevOps/Axiom's README to set up the VM.
  3. Make files editable on your own computer by following instructions in “Other Stuff” in the Axiom README.

Note that all website development will now take place in the VM, not directly on your own computer. If all goes well, you should have a directory on your own computer called axiom/, which contains a Vagrantfile and some other files. The only thing you will be doing in this directory is running git pull origin master occasionally to update the VM, and running vagrant up && vagrant ssh to access the machine.

If you have a Mac or a Linux machine, you have the option of installing Ruby on your own machine and running Jekyll directly on your own machine.

2. Setting up Git

  1. Sign up for a GitHub account - it's free!
  2. Join the Pioneers GitHub organization.
  3. Fork the pioneers/website repo on GitHub - go to the website repo and click the "fork" button in the upper right. You should now have your very own copy of the repository on GitHub, accessible at http://github.com/<your github username>/website/.
  4. Clone the repo from GitHub to your VM (if using): 5. vagrant up && vagrant ssh from within your axiom/ directory to access your VM from the command line. 6. Run cd shared to access the shared/ directory. If you don't put your website code here, you won't be able to edit this using a text editor (for example, Sublime Text) from your computer. 7. Run git clone https://github.com/<your github username>/website.git on the command line. 7. Note: If you're developing on your own machine, you can skip steps i-iii by cloning the repo directly into a directory of your choice on your machine.
  5. cd into the website/ directory you just created, and add the pioneers/website repository as a remote by running git remote add pioneers https://github.com/pioneers/website.git. This adds the pioneers/website repository as a remote repository called "pioneers." Read more about working with remotes here.

3. Editing files on the VM

The lovely DevOps people have put together a great set of instructions on how to edit files on your VM using a text editor on your own machine. Check out their README for details.