Informational website of the basimilch cooperative: http://basimil.ch
This website is done with Jekyll. The main steps to run it locally on your machine are the following:
git clone https://github.com/basimilch/basimilch.github.io.git
cd basimilch.github.io
jekyll server --watch --host 0.0.0.0
Please read the Jekyll documentation to install it on your system.
Cloud9 (c9.io
) as IDE
To start coding quickly, we recommend you to use Cloud9, an extremly handy online IDE:
-
Fork this repository with your GitHub account
-
Sign up for a Cloud9 account with your GitHub account (direct link)
-
Go to your repos on c9.io and create a new workspace for this repo
-
Install Jekyll on your workspace with the terminal with following command from the c9.io documentation:
gem install jekyll
-
Checkout the
dev
branchgit checkout -t origin/dev
-
Start serving the website from your
c9.io
accountjekyll serve --watch --host $IP --port $PORT --baseurl ''
-
When your changes are ready, please submit a pull request.
To try to ensure that our custom assets (mainly javascripts/custom.js
and
css/custom.css
) are reloaded by the clients when we update them, we add a
query param ?bust={{ site.time | date: '%s' }}
, which has a dynamic value
equal to the linux timestamp of the building time, as described in this article.
The order of the pages is automatically determined by the alphabetical order
of the files in the folder /pages
. Therefore the filenames are prefixed by a
3 digits number: main pages are numbered with 0x0
and their subpages with
0xy
.
The hierarchy of the pages is automatically determined by the permalink
field in the front matter of each file in the folder /pages
.
For example, the page defined by the file pages/011-statuten.md
, with
permalink: /genossenschaft/statuten/
in the front matter, will be under the
page defined by the file pages/010-die-genossenschaft.md
with
permalink: /genossenschaft/
.
Additionally, main pages might define a section-group: main
field to be placed
in the top menu section, like e.g. pages/010-die-genossenschaft.md
.
The events page in basimil.ch/veranstaltungen
is defined by the file
pages/040-veranstaltungen.md
using the event data automatically extracted
from the file _data/events.yml
. Therefore, to add a new event, only the file
_data/events.yml
has to be modified to add the event information at the
bottom, using the fields of a previous event as a template.
The styling of the HTML is written in the file css/custom.scss
. Note that
the file is not written in plain CSS but in SCSS (aka SASS).