This is the repository for the Slim website (slimframework.com).
If you spot any errors, typos, or missing information, please submit a pull request.
Unless otherwise stated, the documentation follows the AP Stylebook.
When making changes, it's helpful to run the site locally so you can see the changes or read your new works within the context of the site.
If you would rather not install Ruby and the gem toolchain on your machine, you can run the site in a container instead. All you need is [Docker] docker-url.
From the repository root, start the site:
$ docker compose upThe first run installs the gems into a cached volume and takes a few minutes;
later runs start in seconds. Once Jekyll reports Server running..., browse
to http://localhost:4000.
The site rebuilds automatically as you edit files, and the browser refreshes
via LiveReload. Press Ctrl-C to stop the server; run docker compose down
afterwards if you also want to remove the container.
To run a one-off command in the same environment, such as a production build,
use docker compose run:
$ docker compose run --rm jekyll bundle exec jekyll buildYou can also run this site directly on your local computer to test your changes.
Firstly, ensure you have Ruby installed. If you are a Microsoft Windows user, you need to make sure you have Ruby Devkit Installed (MSYS2).
$ sudo gem install bundler
$ bundle installNow, run the local Jekyll installation:
$ bundle exec jekyll serveThen, browse to http://localhost:4000 in your browser of choice.
The CSS uses Less and is managed by grunt.
Install the tool chain:
$ npm install -g grunt-cli
$ npm installTo change any CSS, edit the appropriate files in assets\less and then run:
gruntYou can also run grunt watch to automatically rebuild when you make CSS changes.
If you would rather not install NodeJS and grunt on your machine, the
docker-compose.yml includes a css service that runs the same toolchain
in a container. To start grunt watch:
$ docker compose up cssFor a one-off build, run:
$ docker compose run --rm css npx gruntThe first run installs the npm packages into a cached volume; later runs start almost instantly.
bundle exec jekyll buildMerging a pull request to the gh-pages branch will trigger a GitHub Action
that builds and deploys the site to GitHub Pages.
Ensure you set the environment variable ALGOLIA_API_KEY before running these commands.
See algolia docs for more information.
bundle install
bundle exec jekyll algolia