betterplace-content

Jekyll theme for betterplace content pages.

Note that our content pages (theme consumers) are usually edited via cloudcannon.

Installation

Add this line to your Jekyll site's Gemfile:

gem "betterplace-content"

And add this line to your Jekyll site's _config.yml:

theme: betterplace-content

And then execute:

$ bundle

Development

To set up your environment to develop this theme, run the script/bootstrap script. Note that this will check out all betterplace content repositories and install their bundles.

The installation script will ask you for a personal github access token with repo access. Instructions: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token. Afterwards provide this token when the script asks for it, or add it to GITHUB_TOKEN file (ignored by git).

The theme is setup just like a normal Jekyll site - to test you could add pages, run bundle exec jekyll serve and open your browser at http://localhost:4000. Note however that the real pages are usually edited via cloudcannon.

Testing 'static pages'

To test a static page locally, e.g. c/stellen, cd into the respective directory and run USE_DEVELOPMENT_THEME=1 bundle.

Then use JEKYLL_ENV=... bundle exec jekyll serve to start a local jekyll server (on port 4000, read output of the command) emulating the respective environment, e.g. JEKYLL_ENV=production bundle exec jekyll serve will let your page include the production javascript assets.

Note that the links in the layout (e.g. c/stellen) in the betterplace.org application are not automatically updated, i.e. they will not be resolved.

When done testing, switch back the gem dependency via USE_DEVELOPMENT_THEME=0 bundle.

Helpers

Since this theme is used in all betterplace content pages, there are a number of scripts in scripts to make things a little easier. Read the comments in those scripts to find out what they do.

Release a new version: scripts/release-theme

You can run script/release-theme to attempt an automated update of everything. This will

  • Bump the version number of the theme
  • Release the theme to rubygems.org
  • Wait for it to appear
  • Attempt to update all "content" repositories to use the new theme

The last step can easily fail. If it does, you can safely re-run script/update-dependencies as often as you like. Do not re-run the release script after the gem was released, or you'll create a new version on github every time.

License

'content--theme' is released under the Apache-2.0 license, Copyright 2017..2022 betterplace.org gGmbH.