Development Setup
Prerequisites
Install Ruby and development tools:
sudo apt update sudo apt install ruby-full build-essential zlib1g-dev
Configure gem installation directory (to avoid using sudo):
echo 'export GEM_HOME="$HOME/gems"' >> ~/.bashrc echo 'export PATH="$HOME/gems/bin:$PATH"' >> ~/.bashrc source ~/.bashrc
Install Jekyll and Bundler:
gem install jekyll bundler
Initial Setup
Install project dependencies:
bundle install
Run the site
Using Make (recommended):
make run
Or directly with bundle:
bundle exec jekyll serve --livereload --incremental --watchThe site will be available at http://localhost:4000
Other Make Commands
make build- Build the sitemake clean- Remove generated filesmake install- Install dependencies
Installing Jekyll Plugins
-
Add the plugin to your
Gemfile:group :jekyll_plugins do gem "plugin-name", "~> version" end
-
Add the plugin to
_config.yml:plugins: - plugin-name
-
Install the new gem:
bundle install
-
Restart the Jekyll server (Ctrl+C and run the serve command again)