Skip to content

basimilch/basimilch.github.io

Repository files navigation

basimilch.github.io

Informational website of the basimilch cooperative: http://basimil.ch

Dev

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:

  1. Fork this repository with your GitHub account

  2. Sign up for a Cloud9 account with your GitHub account (direct link)

  3. Go to your repos on c9.io and create a new workspace for this repo

  4. Install Jekyll on your workspace with the terminal with following command from the c9.io documentation:

    gem install jekyll
  5. Checkout the dev branch

    git checkout -t origin/dev
  6. Start serving the website from your c9.io account

    jekyll serve --watch --host $IP --port $PORT --baseurl ''
  7. When your changes are ready, please submit a pull request.

Cache busting

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.

File structure

Pages

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.

Events

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.

Styling

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).

Documentation and references