Skip to content

scala-js/scala-js-website

Repository files navigation

Website for Scala.js

This is the source code for the Scala.js website at http://www.scala-js.org/.

If you intended to look at the Scala.js source code itself, you can find it here: github.com/scala-js/scala-js.

Contributing

The key to contributing is being able to edit and preview your content. Your pull requests are welcome!

Set up

With Docker

You need to have Docker Engine and Docker Compose installed on your machine. Under Mac OS (Intel or Apple silicon), instead of installing Docker Desktop you can also use HomeBrew with Colima: brew install colima docker docker-compose.

docker compose up --build

On Linux you may have to prefix that command with sudo, depending on your Docker setup.

The generated site is available at http://localhost:4000.

When the website dependencies change (the content of the Gemfile), you have to kill and re-run the command.

If you have problems with the Docker image or want to force the rebuild of the Docker image:

docker compose build --no-cache

Manually with Ruby tooling

As this website is built with Jekyll, we will need to set up some Ruby tooling.

First, install RVM (Ruby Version Manager): https://rvm.io/rvm/install Then run the following commands:

$ rvm use 2.7.5 --install

# Set up Bundler, a Ruby package manager
# It downloads dependencies specified in a Gemfile
# but into a local path unlike gem
$ gem install bundler
 # and if this fails, try installing libffi first (distro-specific):
 # sudo apt install libffi-dev

# Install dependencies such as Jekyll and its plugins:
$ bundle install

# Do a full build:
$ bundle exec jekyll build

Editing live

This is what you would do after the initial installation:

$ bundle exec jekyll serve --watch