Skip to content

DataRepublican/datarepublican

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8,615 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

title How to run the site locally

Prerequisites

  1. Install Ruby (recommended version 3.1.x)

    • On macOS with rbenv: rbenv install 3.1.4
    • Set it as your local version: rbenv local 3.1.4
  2. Install Jekyll and Bundler

    gem install jekyll bundler
  3. Install Node.js and yarn

    npm install --global yarn

Setup

  1. Install project dependencies:
    bundle add webrick     # Add webrick dependency (required for Ruby 3.x)
    bundle install        # Install Ruby dependencies
    yarn install         # Install Node.js dependencies

Run the site

  1. yarn start
  2. Open the site at http://localhost:4000

Advanced

The above command runs everything, but if you need to run things separately:

  1. bundle exec jekyll serve --livereload

    Optionally add the --verbose flag to see more information.

  2. yarn run watch:css (only needed if modifying CSS)

Build the site

  1. bundle exec jekyll clean
  2. bundle exec jekyll build JEKYLL_ENV=production

You can serve the build site locally with ruby -run -e httpd docs -p 4000

Troubleshooting

If you see "jekyll: command not found", make sure you:

  1. Have Ruby installed and selected the correct version with rbenv
  2. Have run gem install jekyll bundler
  3. Have run bundle install

If you're having dependency issues, try these steps:

  1. Install Ruby 3.1.4: rbenv install 3.1.4
  2. Switch to Ruby 3.1.4: rbenv local 3.1.4
  3. Install latest compatible bundler: gem install bundler
  4. Reinstall dependencies: bundle install

If you see an error about "cannot load such file -- webrick", run:

bundle add webrick
bundle install