SovereignCloudStack / website

Base content for scs.community
https://scs.community/
MIT License
5 stars 18 forks source link
community

The SCS website project

The static SCS website is generated by Jekyll. The theme is originally based on the template business-frontpage by sharu725. We're heavily making use of Bootstrap 5 to layout the page content.

The website is automatically built every 15 minutes or on every push to main and subsequently pulled onto our webspace.

Locations

Published sites:

The minimal editorial workflow

  1. [Create a branch based on the main branch Step 1
  2. Select branch, if not already selected Step 2
  3. Make your changes in the branch Step 3
  4. Create a pull request to get the changes into the main branch
    • Open https://github.com/SovereignCloudStack/website
    • Select Contribute -> Open pull request
      • Verify that base: main and compare <your branch> is selected in the top of the pull request
      • Add an optional description
      • Create pull request
    • Assign one ore more persons which can review the changes and remind the person to review the change
  5. The reviewer inspects your changes and gives feedback
    • If there is something to do, you can restart at step 2
    • If everything is fine, the reviewer approves the merge request
    • Your changes are merged to the main branch and rolled out after 15 minutes

The editorial workflow

The website data is deployed by the following process:

Website workflow

The following steps describe the basic workflow how to add, change and remove content. The description is a little more detailed than it needs to be, as it aims also to provide a reliable guide for non-engineer colleagues.

  1. Create a branch based on the main branch (you can also do this using the github user interface)
    git clone git@github.com:SovereignCloudStack/website.git # you only need to do this the first time
    cd website
    git checkout main
    git pull
    git checkout -b feat/<name of your branch> # do not use spaces
  2. Make your changes with the tool of your choice
  3. Commit and push with signoffs
    git status
    git diff
    git add <file> ... <file>
    git status
    git commit -s -a
    git push -u origin feat/<name of your branch>
  4. Optional: Testing more complex changes

    • Set the staging branch to the same state like the main branch

      git checkout staging
      # check the current difference
      git diff main
      
      # This abandons everything on the staging branch
      git reset --hard origin/main
      # add changes of other branches
      git merge feat/<name of your branch>
      git merge feat/<name of your branch ... >
      
      # perform a hard overwrite of everything in the staging branch
      git push --force
    • Test the result: https://staging.scs.community/ (that takes ~15minutes)
    • Start again at Step 2 if you are not satisfied
  5. Create a pull request to get the changes in the main branch
    • Open https://github.com/SovereignCloudStack/website
    • Select Contribute -> Open pull request
      • Verify that base: main and compare <your branch> is selected in the top of the pull request
      • Add an optional description
      • Create pull request
    • Assign one ore more persons which can review the changes and remind the person to review the change
  6. The reviewer inspects your changes and gives feedback
    • If there is something to do, you can restart at step 2
    • If everything is fine, the reviewer approves the merge request
    • Your changes are merged to the main branch and rolled out after 15 minutes

Frequently asked questions

How can I publish a community blog posting?

Create a markup document located at _i18n/en/blog and/or respectively _i18n/de/blog to add a new blog post. Be aware that the file shall be named YEAR-MONTH-DAY-title.MARKUP according to the Jekyll conventions (see Jekyll Docs).

How can I create a new page?

Due to the internationalization plugin, you have to create multiple files. First of all, add a new markup document under _pages, set the desired layout, e.g. default and add the line

{% tf pagetitle.MARKUP %}

Following this step, you have to create the documents pagetitle.MARKUP located at _i18n/en and _i18n/de. Note that you have to create at least the English translation or otherwise the build process will fail.

How can I add a press release?

Add the press release to _data/news_de.yml for German speaking press release or _data/news_en.yml for English speaking releases.

How can I add a new partner?

Upload the logo to assets/images and add a entry in _data/supporter.yml

How can I add custom styling definitions (CSS code)?

As we're using Bootstrap, please add your custom styling definitions to assets/css/_sass/custom.css

Testing changes on staging branch

We're using a dedicated workflow to build a staging preview of our website that subsequently is published with GitHub Pages. To make use of this feature, simply push to the staging branch. Please try to keep staging in sync with main, e.g. by deleting and recreating after testing your recent changes. The staging area can be reached via https://sovereigncloudstack.github.io/website/.

Testing changes locally

As of August 2024, the local build is aimed at a podman-based container installation.