Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,19 @@ concurrency:
cancel-in-progress: true

jobs:
checkcode:
runs-on: ubuntu-latest
env:
SKIP: no-commit-to-branch
steps:
- uses: actions/checkout@v6
- name: Run pre-commit
run: |
./utilities/set_up_dev_env.sh
source ./utilities/python-venv/bin/activate
pre-commit clean
pre-commit run --all-files --show-diff-on-failure
build:
runs-on: ubuntu-latest
container:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,9 @@ jobs:
sudo apt-get install -y lftp
cd $LOCAL_DIR
lftp -u $USERNAME --env-password $SERVER -e "set ftp:ssl-protect-data true; set ssl:verify-certificate false; set ftp:list-options -a; cd $SERVER_DIR; mirror -R --delete . .; exit"
env:
env:
SERVER: ${{ vars.FOUR_C_WEBSITE_SERVER }}
USERNAME: ${{ secrets.FOUR_C_WEBSITE_USERNAME }}
LFTP_PASSWORD: ${{ secrets.FOUR_C_WEBSITE_PASSWORD }}
SERVER_DIR: ${{ secrets.FOUR_C_WEBSITE_BASE_PATH }}
LOCAL_DIR: ${{ github.workspace }}/website/

5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,8 @@ vendor/
website/
_drafts/
Gemfile.lock

# Python
*.pyc
utilities/python-venv/*
*.egg-info/
27 changes: 27 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: no-commit-to-branch

- repo: https://github.com/google/yamlfmt
rev: v0.16.0
hooks:
- id: yamlfmt
name: Format yaml
args: [-conf, utilities/code_checks/.yamlfmt.yaml]

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
additional_dependencies:
- prettier@4.0.0-alpha.8
- prettier-plugin-liquid
files: \.(js|scss|json|md|html|liquid)$

- repo: https://github.com/FlamingTempura/bibtex-tidy
rev: v1.14.0
hooks:
- id: bibtex-tidy
36 changes: 18 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ Based on this site generator it is easy for everybody to include some new inform

## How to add a new example to the website?

Examples are collected in the file `<source_dir>/_data/examples.json`. Each example is an entry in the dictionary, which has the following shape
Examples are collected in the file `<source_dir>/_data/examples.json`. Each example is an entry in the dictionary, which has the following shape

```json
{
"title": "Here comes the title",
"image": {
"url": "/images/capabilities/<image-name>",
"width": 400,
"height": "auto"
},
"featured": false,
"description": "Here an explanatory sentence about the project should be given",
"link": "<url_pointing_to_more_information.html",
"author": "N. N."
}
{
"title": "Here comes the title",
"image": {
"url": "/images/capabilities/<image-name>",
"width": 400,
"height": "auto"
},
"featured": false,
"description": "Here an explanatory sentence about the project should be given",
"link": "<url_pointing_to_more_information.html",
"author": "N. N."
}
```

The `featured` flag may be set to true if the examples should be shown on the home page.
Expand Down Expand Up @@ -66,15 +66,15 @@ To propose a change to the website, follow these steps:

1. Open an issue to announce and discuss upcoming changes (optional, but recommended).
1. Fork and clone the repository.
1. Run `./<source_dir>/set_up_dev_env.sh` to set up the development environment and pre-commit hooks.
1. Create a feature branch, where you will make any change.
1. To inspect your changes, navigate into the website source code directory and
1. for setup: run `bundle install`
**Remark:** You might set the a path to not install the dependencies into the system installation: `bundle install --path vendor/bundle`
1. run `bundle exec jekyll serve` from the terminal and follow the instructions there.
1. for setup: run `bundle install`
**Remark:** You might set the a path to not install the dependencies into the system installation: `bundle install --path vendor/bundle`
1. run `bundle exec jekyll serve` from the terminal and follow the instructions there.
1. Commit changes. Push the branch to your fork on GitHub.
1. Open a pull request.

> Note: You might want to do a quick internet search for more details on `jekyll`, in case that these instructions are not sufficient.

Since this website represents 4C publicly,
merging of PRs (i.e. actually publishing changes) always requires another set of eyes.
Since this website represents 4C publicly, merging of PRs (i.e. actually publishing changes) always requires another set of eyes.
Loading