Skip to content

Commit 6dc8241

Browse files
authored
Merge pull request #817 from peer35/contributing_update
Contributing - tools
2 parents 2740485 + 81d4bc5 commit 6dc8241

3 files changed

Lines changed: 93 additions & 3 deletions

File tree

contributing.qmd

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,95 @@ You need to count the heading level in your guide to identify your shift number.
106106

107107
After that, you are ready to [submit your pull request](#submit-a-pull-request)!
108108

109+
### Adding a tool
110+
Tool descriptions always consist of multiple pages. To add a new tool it is best to work locally, for example in [VScode](#using-vs-code-to-contribute).
111+
112+
If a new tool needs to be added do the following (using SPSS as an example):
113+
114+
#### Copy template
115+
- Copy the folder `/tools/_template` to `/tools/spss`. Always use lowercase for folder and file names.
116+
117+
#### Set the left sidebar
118+
- Edit the `/tools/spss/_sidebar.yml` file and rename `dummy` to `spss` (or `SPSS` in titles). Do not forget the `id`, which should be unique for the tool.
119+
120+
```yaml
121+
website:
122+
sidebar:
123+
- id: sb-spss
124+
collapse-level: 4
125+
contents:
126+
# Title that shows up at the top of the sidebar
127+
- section: SPSS
128+
href: tools/spss/index.qmd
129+
contents:
130+
- href: tools/spss/index.qmd # Mandatory, start page
131+
text: What is SPSS?
132+
# Always use paths relative to the root of the site.
133+
- tools/spss/cost_access.qmd # Mandatory
134+
- tools/spss/contact_support.qmd # Mandatoty
135+
- tools/spss/quick_start.qmd # Mandatory
136+
- tools/spss/faq.qmd # Optional, delete if not necessary
137+
- tools/spss/known-issues.qmd # Optional, delete if not necessary
138+
- section: Documentation # Optional, delete section + contents if there are none
139+
contents: # Add additional documentation pages here. Subsections are possible
140+
- tools/spss/some-how-to.qmd
141+
```
142+
143+
- Add a reference to this sidebar in `/_quarto.yml` in the `metadata-files` section (keep this in alphabetical order for clarity):
144+
145+
```yaml
146+
...
147+
metadata-files:
148+
...
149+
- tools/snellius/_sidebar.yml
150+
- tools/spss/_sidebar.yml
151+
- tools/vucomputehub/_sidebar.yml
152+
- tools/yoda/_sidebar.yml
153+
```
154+
155+
#### Add the tool to the Tools overview page
156+
- Copy a logo image to the `/public` folder (use Google image search to find one). Preferred format is svg.
157+
- Edit the metadata section in `/tools/spss/index.qmd`. Set the application name as `title`, the path to the logo image and one or more appropriate categories:
158+
159+
```yaml
160+
---
161+
title: SPSS # Add link to this page to ./tools.qmd title must be the tool name
162+
categories: [Statistics] # categories appropriate to this tool
163+
image: '/public/spss-logo.svg' # Make sure to add a logo
164+
---
165+
166+
## What is it?
167+
168+
## What can it be used for?
169+
```
170+
171+
- Edit the metadata section of `/tools.qmd`, add `/tools/spss/index.qmd` to the `listing` `contents` to make the tool visible on the tools page:
172+
173+
```yaml
174+
---
175+
title: Tools
176+
listing:
177+
id: tools
178+
template: ./_templates/accordion-logo.ejs.md
179+
contents:
180+
...
181+
- tools/snellius/index.qmd
182+
- tools/spss/index.qmd
183+
- tools/vucomputehub/index.qmd
184+
- tools/yoda/index.qmd
185+
...
186+
---
187+
188+
...
189+
```
190+
191+
#### Edit the pages
192+
- Make sure to edit at least the `index.qmd` (What is?), `cost_access.qmd`, `contact_support.qmd` and `quick_start.qmd` files.
193+
- Delete unused files from the tool folder and the `_sidebar.yml`.
194+
- You can also add extra pages as needed. Make sure to add them to the `_sidebar.yml` file under the `Documentation` section. If you need extra subsections under `Documentation` you can add them to `_sidebar.yml` as needed.
195+
196+
After that, you are ready to [submit your pull request](#submit-a-pull-request)!
197+
109198
### Editing multiple files
110199

111200
There are situations in which you need to edit multiple files. If you carry out all edits in separate [pull requests](#submit-a-pull-request), this may be a long and repetitive task. Instead, you can change multiple files at once in a single pull request.

tools/_template/_sidebar.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ website:
55
contents:
66
# Title that shows up at the top of the sidebar
77
- section: Dummy
8+
href: tools/dummy/index.qmd
89
contents:
910
- href: tools/dummy/index.qmd # Mandatory, start page
1011
text: What is Dummy?
@@ -15,7 +16,7 @@ website:
1516
- tools/dummy/faq.qmd # Optional, delete if not necessary
1617
- tools/dummy/known-issues.qmd # Optional, delete if not necessary
1718
- section: Documentation # Optional, delete section + contents if there are none
18-
contents:
19-
- tools/dummy/some-how-to.qmd
19+
contents: # Add additional documentation pages here. Subsections are possible
20+
- tools/dummy/some-how-to.qmd
2021

2122
# Rename application and add to _quarto.yml

tools/_template/index.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Dummy # Add link to this page to ./tools.qmd title must be the tool name
33
categories: [Data Storage, Data Archiving, Data Publishing] # categories appropriate to this tool
4-
image: '/public/dummy-logo.png' # Make sure to add a log
4+
image: '/public/dummy-logo.svg' # Make sure to add a logo
55
---
66

77
## What is it?

0 commit comments

Comments
 (0)