Building an Academic Website, Test site locally
Template resources: Academic Pages, Weightshift, the personal page, GitPage tutorial
- This website uses the template from Academic Pages.
- README: A/home/kyle/Desktop/kylewang1999.github.io/_publicationscademic Pages
Render and serve the website on localhost: bundle exec jekyll serve
Node js on M1 mac, Jekyll on M1 Mac
Install Jekyll (Ubuntu).
# Install Ruby and other pre-req
sudo apt-get install ruby-full build-essential zlib1g-dev # ubuntu
# Avoid installing RubyGem as root. Instead, set up gem install dir for the user.
# The following adds environment vars to ~/.bashrc to configure gem install path
echo '# Install Ruby Gems to ~/gems' >> ~/.bashrc
echo 'export GEM_HOME="$HOME/gems"' >> ~/.bashrc
echo 'export PATH="$HOME/gems/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
# Install Jekyllm Bundler
gem install jekyll bundler && bundle install
Set up environment (MacOS)
rbenv install 3.0.0 # Install arm-based ruby 3.0.0
rbenv global 3.0.0
ruby -v
rbenv rehash
echo 'eval "$(rbenv init - bash)"' >> ~/.bash_profile # if using bash
gem install --user-install bundler jekyll
ruby -v # Check ruby version, substitute in the following line
echo 'export PATH="/usr/local/opt/ruby/bin:/usr/local/lib/ruby/gems/3.0.0/bin:$PATH"' >> ~/.bash_profile
bundle update --bundler
bundle add webrick
bundle install --redownload
Export nvm
ot environment variable:
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
Webrick cannot be found. Solution.
- Basic config options:
_config.yml
- Top navigation bar config:
_data/navigation.yml
- Single pages:
_pages/
- Collections of pages are .md or .html files in:
- _publications/
- _portfolio/
- _posts/
- _teaching/
- _talks/
- Footer:
_includes/footer.html
- Static files (like PDFs): /files/
- Profile image (can set in _config.yml):
images/profile.png