Skip to content

Commit 891655a

Browse files
authored
build (docs): add a code formatter to the docs/ folder (#4337)
Note: run `npm run format` to format changes in `docs/`.
1 parent cd3b084 commit 891655a

92 files changed

Lines changed: 1234 additions & 1228 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/pull-request-test.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,17 +42,21 @@ jobs:
4242
run:
4343
working-directory: docs/
4444
steps:
45-
- uses: actions/checkout@v5
46-
- uses: actions/setup-node@v4
45+
- name: Checkout repository
46+
uses: actions/checkout@v5
47+
- name: Setup node
48+
uses: actions/setup-node@v4
4749
with:
4850
node-version: "22"
4951
cache: npm
5052
cache-dependency-path: docs/package-lock.json
51-
- name: install dependencies
52-
run: npm install
53-
- name: test docs spelling
53+
- name: Install dependencies
54+
run: npm clean-install
55+
- name: Check docs formatting
56+
run: npm run format:check
57+
- name: Test docs spelling
5458
run: npm run spell-check
55-
- name: test the docs build
59+
- name: Test the docs build
5660
run: npm run build
5761

5862
check-deploy:

docs/README.md

Lines changed: 48 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -36,50 +36,56 @@ This command generates static content into the `build` directory and can be serv
3636

3737
## Deployment
3838

39-
The documentation is deployed using [Read The Docs](https://about.readthedocs.com/).
39+
The documentation is deployed using [Read The Docs](https://about.readthedocs.com/).
4040
The [renku project](https://app.readthedocs.org/projects/renku/) on Read the Docs
4141
builds and deploys when changes are made in the repo.
4242

4343
## Notes
4444

45-
* When adding an image to a page, put it in the same folder as the page and reference it using a relative path (e.g. `./image.png`). By default, the image will fill the whole page's width. If that's what you want, you're done. Otherwise, you can wrap the image in a container with a custom width based on your desired size, e.g.:
46-
```md
47-
<p class="image-container-s">
48-
![image 10](./image-10.png)
49-
</p>
50-
```
51-
The available container sizes are `image-container-s` (55% width), `image-container-m` (70% width), and `image-container-l` (85% width).
52-
* Image properties that are controllable by CSS can be modified in the documentation CSS file at `docs/src/css/custom.css`. Currently, we use it to add shadows to all images and to define the container sizes for images:
53-
```css
54-
img {
55-
filter: drop-shadow(0 10px 16px rgba(0, 0, 0, .25))
56-
drop-shadow(0 2px 4px rgba(0, 0, 0, .15));
57-
}
58-
59-
.image-container-s, .image-container-m, .image-container-l {
60-
margin: auto;
61-
text-align: center; /* Center the image horizontally when its width is narrower than the max-width*/
62-
}
63-
64-
.image-container-s {
65-
max-width: 55%;
66-
}
67-
68-
.image-container-m {
69-
max-width: 70%;
70-
}
71-
72-
.image-container-l {
73-
max-width: 85%;
74-
}
75-
```
76-
* When adding a video to a page, put it in the same folder as the page. You then need to import it in the markdown file using its relative path and put the imported name in the `src` attribute of the `video` tag. For example:
77-
```md
78-
import video10 from './video-10.mp4';
79-
80-
<video controls width="100%" src={video10} />
81-
```
82-
* When linking to other documentation pages, always use relative URL links (e.g. `../sessions/guides/create-environment-with-custom-packages-installed`) instead of absolute links (e.g. `/docs/users/sessions/guides/create-environment-with-custom-packages-installed`) or relative file paths (e.g. `../60-sessions/guides/20-create-environment-with-custom-packages-installed.md`).
83-
Always use URL links instead of file paths for links. Docusaurus converts file paths into URL links by removing number prefixes and the .md extension. To find the correct URL link, open the corresponding page in your browser, copy the path from the address bar, and adjust it to be relative to the current page.
84-
85-
* If you add an `index.md` file to a directory, never add a prefix to it (e.g. `10-index.md`). Docusaurus treats `index.md` file specially, so it shouldn't have any prefix in its name. Prefixes are only used for other files in the directory to control their order.
45+
- When adding an image to a page, put it in the same folder as the page and reference it using a relative path (e.g. `./image.png`). By default, the image will fill the whole page's width. If that's what you want, you're done. Otherwise, you can wrap the image in a container with a custom width based on your desired size, e.g.:
46+
```md
47+
<p class="image-container-s">
48+
![image 10](./image-10.png)
49+
</p>
50+
```
51+
The available container sizes are `image-container-s` (55% width), `image-container-m` (70% width), and `image-container-l` (85% width).
52+
- Image properties that are controllable by CSS can be modified in the documentation CSS file at `docs/src/css/custom.css`. Currently, we use it to add shadows to all images and to define the container sizes for images:
53+
54+
```css
55+
img {
56+
filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.25))
57+
drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
58+
}
59+
60+
.image-container-s,
61+
.image-container-m,
62+
.image-container-l {
63+
margin: auto;
64+
text-align: center; /* Center the image horizontally when its width is narrower than the max-width*/
65+
}
66+
67+
.image-container-s {
68+
max-width: 55%;
69+
}
70+
71+
.image-container-m {
72+
max-width: 70%;
73+
}
74+
75+
.image-container-l {
76+
max-width: 85%;
77+
}
78+
```
79+
80+
- When adding a video to a page, put it in the same folder as the page. You then need to import it in the markdown file using its relative path and put the imported name in the `src` attribute of the `video` tag. For example:
81+
82+
```md
83+
import video10 from './video-10.mp4';
84+
85+
<video controls width="100%" src={video10} />
86+
```
87+
88+
- When linking to other documentation pages, always use relative URL links (e.g. `../sessions/guides/create-environment-with-custom-packages-installed`) instead of absolute links (e.g. `/docs/users/sessions/guides/create-environment-with-custom-packages-installed`) or relative file paths (e.g. `../60-sessions/guides/20-create-environment-with-custom-packages-installed.md`).
89+
Always use URL links instead of file paths for links. Docusaurus converts file paths into URL links by removing number prefixes and the .md extension. To find the correct URL link, open the corresponding page in your browser, copy the path from the address bar, and adjust it to be relative to the current page.
90+
91+
- If you add an `index.md` file to a directory, never add a prefix to it (e.g. `10-index.md`). Docusaurus treats `index.md` file specially, so it shouldn't have any prefix in its name. Prefixes are only used for other files in the directory to control their order.

docs/docs/10-users/10-users.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ Renku is an **open-source platform for researchers and scientists to connect dat
99

1010
## How to use Renku docs
1111

12-
1312
<p class="text-align: center">
1413
![image.png](./rocket_40px.png)
1514
[**First Steps Tutorial**](/docs/users/getting-started/): Want to try it out? [**Create your account**](/docs/users/getting-started/tutorial-start) and follow our hands-on tutorial!
@@ -21,34 +20,33 @@ Renku is an **open-source platform for researchers and scientists to connect dat
2120
[**Projects**](/docs/users/projects/projects/) in Renku may contain [**Data**](/docs/users/data/data/), [**Code**](/docs/users/code/code-repository) and [**Sessions**](/docs/users/sessions/environment/) to foster [**Collaboration**](/docs/users/collaboration/). Check each individual building block for understanding the possibilities that Renku offers.
2221
</p>
2322

24-
___
23+
---
2524

2625
<p class="text-align: center">
2726
![image.png](./use-cases_40px.png)
2827
[**Use Cases**](/docs/users/use-cases/) Learn more about how Renku is used in the broader community.
2928
</p>
3029

31-
___
30+
---
3231

3332
<p class="text-align: center">
3433
![image.png](./use-cases_40px.png)
3534
[**Knowledge Base**](/docs/users/knowledge-base/fair-open-science/) Curiosity about how it works? [Any doubts](/docs/users/knowledge-base/faq/)? Join our channels to keep in touch with us.
3635
</p>
3736

38-
___
37+
---
3938

4039
<p class="text-align: center">
4140
![image.png](./sunset_40px.png)
4241
[**Renku Legacy:**](/docs/users/migrate-v1-v2/) Guidelines on how to migrate your code repositories from Legacy Renkulab Gitlab to your own code repository provider, and keep
4342
</p>
4443

45-
4644
## Use cases
4745

48-
| Researchers | Educators | Event organizers |
49-
| :-------------: |:-------------:| :-----:|
50-
| ![image.jpg](https://renkulab.io/assets/researcherIcon-DFFtd-Xp.svg) | ![image.jpg](https://renkulab.io/assets/educatorIcon-8mTN9nT-.svg) | ![image.jpg](https://renkulab.io/assets/organizerIcon-CcAdtX3S.svg) |
51-
| **Unified Research** <p>Connect your entire research workflow in one place, and collaborate across specialties without technical barriers.</p> | **Computing Courses made easy** <p>Help your students focus on the material, not getting lost during setup. Ideal for project-based coursework and time-sensitive workshops.</p> | **Seamless Events** <p>Focus on innovation, not setup and infrastructure. Provide a consistent environment for all teams, and get participants coding and collaborating right away.</p> |
46+
| Researchers | Educators | Event organizers |
47+
| :--------------------------------------------------------------------------------------------------------------------------------------------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
48+
| ![image.jpg](https://renkulab.io/assets/researcherIcon-DFFtd-Xp.svg) | ![image.jpg](https://renkulab.io/assets/educatorIcon-8mTN9nT-.svg) | ![image.jpg](https://renkulab.io/assets/organizerIcon-CcAdtX3S.svg) |
49+
| **Unified Research** <p>Connect your entire research workflow in one place, and collaborate across specialties without technical barriers.</p> | **Computing Courses made easy** <p>Help your students focus on the material, not getting lost during setup. Ideal for project-based coursework and time-sensitive workshops.</p> | **Seamless Events** <p>Focus on innovation, not setup and infrastructure. Provide a consistent environment for all teams, and get participants coding and collaborating right away.</p> |
5250

5351
## What's new - Check out our latest blog posts:
5452

@@ -59,7 +57,8 @@ Renku is an **open-source platform for researchers and scientists to connect dat
5957
<p>We've combined Renku's super-simple sessions with the power of supercomputing!</p>
6058

6159
</p>
62-
___
60+
61+
---
6362

6463
<p class="image-container-s">
6564
[![AiiDA Success Story](https://blog.renkulab.io/assets/images/intro-image-f9ca2c80c6b9ad273b0d8750b112dab7.png)](https://blog.renkulab.io/aiida-success-story/)

docs/docs/10-users/20-getting-started/20-create-project.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ You will land in your Renku dashboard. From here, you can create a new project:
44

55
1. In the **My projects** section of the dashboard, click on **+** to create a new project
66
2. For project **Name**, enter **Genova Weather Analysis**
7-
- (Leave **Owner, Visibility**, and **Description** unchanged)
7+
- (Leave **Owner, Visibility**, and **Description** unchanged)
88
3. Click **Create**.
99

1010
![image.png](./GS_image_2.png)

docs/docs/10-users/20-getting-started/30-connect-data.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ Note that the description in Zenodo of this dataset is automatically imported as
1616

1717
:::
1818

19-
2019
## Connect a Storage Space to save your work (optional)
2120

2221
The data connector in the previous step is read only. If you would like to be able to save the work you do in your Renku session, add a data connector for a storage where you'd like to save that work. For example, you might use a Switch Drive or polybox folder, or an S3 bucket.

docs/docs/10-users/20-getting-started/40-connect-code.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ We need to connect this git repository to the Renku project in order to access i
1616

1717
Here's how to add the code repository to your project:
1818

19-
1. Click on **+** under the Code Repositories section.
20-
2. Copy and paste the link to **Clone with HTTPS** from your git project.
21-
In this case, we already provide you with the code here:
19+
1. Click on **+** under the Code Repositories section.
20+
2. Copy and paste the link to **Clone with HTTPS** from your git project.
21+
In this case, we already provide you with the code here:
2222

23-
```
24-
https://gitlab.com/renku/air-quality-analysis
25-
```
23+
```
24+
https://gitlab.com/renku/air-quality-analysis
25+
```
2626

2727
For more information about working with code repositories on Renku, check out the **code** section in the [How To Guides](../code/code-repository).

docs/docs/10-users/20-getting-started/50-launch-session.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@
55
To run your code and analyze data on RenkuLab, first decide what kind of session environment you would like by creating a session launcher.
66

77
1. In the **Sessions** section of your project page, click on **+**.
8-
2. In the **Global environment** tab, scroll down and select **Python Data Science - Jupyter**. This will give you a pre-configured environment with python and data science packages pre-installed. If you need to install other packages, you can install any necessary packages using the terminal. For a detailed guide for how to install packages, see [How to install packages on-the-fly in your session](../sessions/guides/environments/install-packages-on-the-fly-in-your-session). However, the packages you install on-the-fly in the session will not be shared with other people working with your Renku project. To ensure the adequate dependencies are installed in your environment, follow step 4.3 to create a custom environment from code.
8+
2. In the **Global environment** tab, scroll down and select **Python Data Science - Jupyter**. This will give you a pre-configured environment with python and data science packages pre-installed. If you need to install other packages, you can install any necessary packages using the terminal. For a detailed guide for how to install packages, see [How to install packages on-the-fly in your session](../sessions/guides/environments/install-packages-on-the-fly-in-your-session). However, the packages you install on-the-fly in the session will not be shared with other people working with your Renku project. To ensure the adequate dependencies are installed in your environment, follow step 4.3 to create a custom environment from code.
99
3. Click **Next**.
1010
4. Choose the compute resources for your session based on your project’s needs in the drop-down menu, and select the amount of disk space.
1111

12-
1312
![image.png](./add-session-launcher.png)
1413

1514
:::info
@@ -19,6 +18,7 @@ You can have multiple Session Launchers in your project that run different kinds
1918
:::info
2019
Do you need more resources than those available in RenkuLab’s public resource classes? [Contact us!](mailto:hello@renku.io) We can configure a custom resource pool for your team or class.
2120
:::
21+
2222
## Launch a Session
2323

2424
Click on the **Launch** button in your new Session Launcher to start a session.

docs/docs/10-users/20-getting-started/60-share.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ In your project page:
1212

1313
1. Open the **Settings** tab.
1414
2. Go to **Project Members** and click on **+**
15-
3. Search for the people you want to invite by name or username and set their role.
15+
3. Search for the people you want to invite by name or username and set their role.
1616

1717
![image.png](./add-member.png)
18-
:::info
19-
Note that in order to add people to your Renku project, they need to already have a Renku account.
20-
:::
18+
:::info
19+
Note that in order to add people to your Renku project, they need to already have a Renku account.
20+
:::
2121

2222
## Make Your Project Public (optional)
2323

docs/docs/10-users/20-getting-started/70-conclusion.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# Next Steps
22

3-
43
🎉 Congratulations! You have successfully created a Renku project, connected data and code, launched a session, and shared your project with collaborators.
54

65
![image.png](./congratulations.png)

0 commit comments

Comments
 (0)