You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# (among which `pip-tools` that contains `pip-compile`)
188
+
pip install -r dev-requirements.txt
155
189
156
-
# Install the dependencies listed in `requirements.in`
157
-
# This installs the indirect dependencies these plugins depend upon.
190
+
# Install the direct dependencies (listed in `requirements.in`
191
+
# This also installs the indirect dependencies these packages depend upon.
158
192
pip install -r requirements.in
159
193
160
-
# Generate `requirements.txt` with both direct AND indirect dependencies
161
-
pip freeze > requirements.txt
194
+
# Add code/doc using this package and test until it is ready.
162
195
163
-
# Commit the changes (where XXX denotes the plugin name)
196
+
# Generate the `requirements.txt` file from `requirements.in`
197
+
pip-compile
198
+
199
+
# Commit the changes (where XXX denotes the package name)
164
200
git add requirements.in requirements.txt
165
-
git commit -m "➕ Add dependency XXX"
201
+
git commit -m "➕ Add dependency: XXX"
202
+
203
+
# Push your feature branch to your `origin` repository
204
+
git push -u origin feature/add_dependency_XXX
166
205
```
167
-
168
-
## Tips & Tricks
206
+
- [**Create a Pull Request**](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request) with your changes:
207
+
- Open your clone repository of `trio-docs` on *GitHub* (`https://github.com/YOUR_USERNAME/trio-docs`)
208
+
- Click the `Pull Requests` tab
209
+
- Click "`Compare & pull request`" in the yellow banner next to your branch name
210
+
211
+
212
+
## FAQs
169
213
170
214
> [!NOTE]
171
215
> Please add!
172
216
173
217
### Add a Chapter
174
218
175
-
Using the `#` sign shows a chapter on the menu/index. The amount of `#`'s determines the level.
219
+
Using the `#` sign shows a chapter on the menu/index. The number of `#`'s determines the level.
176
220
177
221
**Example**:
178
222
@@ -197,11 +241,113 @@ Using the `#` sign shows a chapter on the menu/index. The amount of `#`'s determ
197
241
> | `**bold text**` | **bold text** |
198
242
> | `<b>bold text</b>` | **bold text** |
199
243
200
-
### Link to Another File
244
+
### Add a Link to Another File
201
245
202
246
When linking to another Markdown file (ending with `.md`) in another directory, the link must start with `../`.
203
247
204
-
**Example**: `../directoryname/filename.md`
248
+
In the below example, assuming you are editing `docs/install/index.md`, to add a link pointing to `docs/configuration/new-user-setup.md` with the text `new user setup`:
249
+
250
+
```html
251
+
Now on to the [new user setup](../configuration/new-user-setup.md)
252
+
```
253
+
254
+
Do not forget the `.md` suffix.
255
+
256
+
```
257
+
docs <== ../
258
+
├── install <== ./ denotes the current folder (docs/install/)
259
+
│ └── index.md <== You are here (the current file)
When the same section of text is repeated in several files, it is time to consolidate all these occurrences into a single file and include it in all relevant files, that means:
309
+
310
+
- Move the existing redundant section of text to a new dedicated file.
311
+
- Replace all redundant occurrences of that section with an include directive in all the files that previously defined it.
312
+
313
+
Let's break down these steps:
314
+
315
+
1. **Create a new file**
316
+
Create a **Markdown file** in the `docs/includes/` folder, for example:
317
+
`docs/includes/version-compatibility-matrix.md`.
318
+
2. **Move the duplicated content**
319
+
Move the duplicated section into this new file.
320
+
3. **Mark it as includable**
321
+
[Wrap the content](https://github.com/ebouchut/Trio-dev-docs/blob/9f22039213d5ac055b8dd171d5648d94fe0d506a/docs/includes/version-compatibility-matrix.md?plain=1#L2-L20) within `<!--include-markdown-start-->` and `<!--include-markdown-end-->` comments to define what will be included.
322
+
```markdown
323
+
Content before the start comment will not be included.
324
+
325
+
<!--include-markdown-start-->
326
+
…your reusable content (duplicated text section)…
327
+
<!--include-markdown-end-->
328
+
329
+
Content after the end comment will not be included.
330
+
```
331
+
1. **Replace each original redundant section with an include directive**
332
+
In each file that originally contained the duplicated text, **replace it with the following [include directive](https://github.com/ebouchut/Trio-dev-docs/blob/9f22039213d5ac055b8dd171d5648d94fe0d506a/docs/install/build/requirements/devices/iphone.md?plain=1#L12)**:
Make sure the path is relative to the `docs/` folder.
339
+
2. **Update `mkdocs.yml`**
340
+
To prevent the included file from appearing in the navigation or triggering a warning, add it to the [**`not_in_nav`** section](https://github.com/ebouchut/Trio-dev-docs/blob/9f22039213d5ac055b8dd171d5648d94fe0d506a/mkdocs.yml#L203):
341
+
```yaml
342
+
not_in_nav: |
343
+
includes/version-compatibility-matrix.md
344
+
```
345
+
346
+
> [!NOTE]
347
+
> Do not overuse this feature!
348
+
>
349
+
> Use it sparingly, as it adds a layer of abstraction that makes it harder to see the full contents of a page when editing it.
0 commit comments