generated from just-the-docs/just-the-docs-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from ucla-imls-open-sci/local-env
Added Setting up Local Environment
- Loading branch information
Showing
3 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
title: Local Environment | ||
layout: default | ||
permalink: /docs/local-env | ||
has_children: true | ||
--- | ||
|
||
This documentation is to help those setup your local environment to properly run jekyll. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
--- | ||
title: MacOS | ||
layout: default | ||
parent: Local Environment | ||
nav_order: 1 | ||
--- | ||
|
||
This is the documentation for setting up Jekyll on your local Mac environment. First you need to setup "rbenv." | ||
|
||
## Rbenv | ||
|
||
First you must have homebrew installed. To download homebrew, run the following command in your terminal: | ||
``` | ||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | ||
``` | ||
![Homebrew Download]({{ site.baseurl }}/assets/img/local-env/homebrew.png) | ||
|
||
After downloading homebrew you can then run the following commands to download and initialize rbenv. | ||
``` | ||
brew install rbenv | ||
rbenv init | ||
``` | ||
|
||
Now if you are using a ***zsh*** shell you run the following command: | ||
``` | ||
echo 'eval "$(rbenv init -)"' >> ~/.zshrc | ||
``` | ||
|
||
If you are running a ***bash*** shell then you run the following command: | ||
``` | ||
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile | ||
``` | ||
If you are unsure what shell you are using run the following command to see then go to the steps above: | ||
``` | ||
echo $SHELL | ||
``` | ||
|
||
|
||
After running these commands, either restart your terminal or run the following code: | ||
``` | ||
For bash: source exec bash | ||
For zsh: source ~/.zshrc | ||
``` | ||
*Note: If these commands don't work restart your terminal.* | ||
|
||
Now you can install the latest versions of ruby using rbenv. You can view installable versions by running the command: | ||
``` | ||
rbenv install -l | ||
``` | ||
After you run that command pick a version starting with 3. For most cases you can install ruby 3.2.2: | ||
``` | ||
rbenv install 3.2.2 | ||
``` | ||
|
||
After you're done install run: | ||
``` | ||
gem install jekyll | ||
``` | ||
|
||
Now when you are in a jekyll-site locally in your IDE of choice, you can run the following commands to preview your changes locally: | ||
``` | ||
bundle install -> RUN THIS THE FIRST TIME YOU USE IT | ||
bundle exec jekyll serve | ||
``` |