Skip to content

Deploying locally

damios edited this page Nov 26, 2023 · 10 revisions

After you have forked our repository, cloned it to your local machine and done some changes, you'll surely want to see the results of your work. To do so, you'll have to deploy the website locally on your machine. This can be done as follows:

Option 1: Manual Installation

  1. Install a full Ruby development environment as described in the official Jekyll guide.
  2. Install Jekyll and bundler gems:
gem install jekyll bundler
  1. In your working directory (this is where you cloned the website to), install the other dependencies of the gemfile:
bundle install
  1. Then you can deploy the Jekyll site locally:
bundle exec jekyll serve

which outputs:

> Configuration file: /Users/octocat/my-site/_config.yml
>            Source: /Users/octocat/my-site
>       Destination: /Users/octocat/my-site/_site
> Incremental build: disabled. Enable with --incremental
>      Generating...
>                    done in 0.309 seconds.
> Auto-regeneration: enabled for '/Users/octocat/my-site'
> Configuration file: /Users/octocat/my-site/_config.yml
>    Server address: http://127.0.0.1:4000/
>  Server running... press ctrl-c to stop.

If you want to display scheduled sites as well, add a --future parameter at the end: bundle exec jekyll serve --future. To enable other devices in your local network to connect to the site as well, add a --host 0.0.0.0 parameter.

Option 2: Use Docker

Alternatively, you can install Docker and use docker-compose up to start your local server.

Result

Preview your local site at: http://localhost:4000. The website is automatically rebuilt after modifying a file.