From 3636834baef6f7731b28d7317b079f6d16c665ab Mon Sep 17 00:00:00 2001 From: Gerasimos Chourdakis Date: Fri, 16 Jun 2023 12:21:22 +0300 Subject: [PATCH] Add documentation on adding new tutorials to the website (#276) --- pages/community/community-contribute-to-precice.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pages/community/community-contribute-to-precice.md b/pages/community/community-contribute-to-precice.md index ba277fab09..f4cc00d3f4 100644 --- a/pages/community/community-contribute-to-precice.md +++ b/pages/community/community-contribute-to-precice.md @@ -154,6 +154,19 @@ There are a few technical things to take care of before we can merge your contri We automate many of these checks with [GitHub actions](https://github.com/features/actions), which you will see running at the bottom of each pull request. To avoid pushing and waiting for the actions to run while you develop, you can alternatively install [act](https://github.com/nektos/act) to execute all or specific workflows locally, running `act` or `act -j `. It requires [Docker](https://www.docker.com/) and you can get the latest binary from the [act releases](https://github.com/nektos/act/releases/latest). +### Adding a new tutorial to the website + +The content of the tutorials is sourced from the develop branch of the tutorials repository, which is specified in the `.gitmodules` file of the website repository. Hence, in general, anything merged to develop in the tutorials appears on the website. Consider putting some `note` [alert box](docs-meta-cheatsheet.html#alerts) on top of your new tutorial page to describe any unreleased requirements. + +*New* tutorials will not directly appear on the website, but they need some additional steps. After merging to the tutorials develop, open a pull request with the following changes in the [website repository](https://github.com/precice/precice.github.io) ([example](https://github.com/precice/precice.github.io/pull/275)): + +1. Trigger the [update submodules workflow](https://github.com/precice/precice.github.io/actions/workflows/update-submodules.yml) and, after it completes, create a new branch and pull request (this may also happen automatically, or someone from the preCICE team may have to do it for you). +2. Edit the [`_config.yml` file](https://github.com/precice/precice.github.io/blob/master/_config.yml) to append the directory name of your tutorial under `subprojects:`. +3. Edit the [tutorials sidebar](https://github.com/precice/precice.github.io/blob/master/_data/sidebars/tutorial_sidebar.yml) to add your tutorial permalink (defined in the heading of the `README.md` you created) to a fitting place, next to a similar tutorial. +4. Edit the [tutorials landing page](https://github.com/precice/precice.github.io/blob/sidebar-ff-tuts/pages/tutorials/tutorials.md) to add your tutorial to the overview. + +After your PR gets reviewed, approved, and merged, the website will be built automatically, and your tutorial will appear online in a couple of minutes. + ## Sharing a simulation case Did you create a nice simulation case that could be useful for more people, but is not simple enough to serve as a tutorial? You can alternatively share it in the [community projects](https://precice.discourse.group/c/community-projects/11) category of our forum.