8000 GitHub - TramsWang/TramsWang.github.io: 个人主页
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

TramsWang/TramsWang.github.io

Repository files navigation

Dev Instructions

1. Install Jekyll and Relatives

Install Ruby and dependencies

sudo apt install ruby-full build-essential zlib1g-dev

Then add following environment variables to .bashrc

# Install Ruby Gems to ~/gems
export GEM_HOME="$HOME/gems"
export PATH=$HOME/gems/bin:$PATH

Enable the modification

source .bashrc

Then install Jekyll & Bundler

gem install jekyll bundler

2. Build & Test Locally

Navigate to the source root of the site.

Initiate project

bundle init

Add following lines to Gemfile

gem "jekyll"

Then there are 2 options:

  1. Build only:

    Builds the site and outputs a static site to a directory called _site.

    jekyll build
  2. Build & Monitor:

    Does jekyll build and runs it on a local web server at http://localhost:4000, rebuilding the site any time you make a change.

    jekyll serve

    Or the following command (This restricts your Ruby environment to only use gems set in your Gemfile)

    bundle exec jekyll serve

3. Fix Ruby Version Issues

Install here.

If the following error occur:

RVM is not a function, selecting rubies with 'rvm use ...' will not work.

run the following commands:

$ source ~/.rvm/scripts/rvm
$ type rvm | head -n 1

If it returns "rvm is a function", the problem is solved.

About

个人主页

Resources

5059 Activity

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0