mirror of
https://codeberg.org/openpgp/notes.git
synced 2025-09-09 11:19:41 +02:00
Add contributing guideline on including external files
Signed-off-by: David Runge <dave@sleepmap.de>
This commit is contained in:
parent
90cca801ce
commit
4903214c7a
1 changed files with 21 additions and 0 deletions
|
@ -56,6 +56,27 @@ The syntax follows what is available in [MyST-parser].
|
|||
|
||||
---
|
||||
|
||||
#### Including files
|
||||
|
||||
It is advisable to [include external files](https://myst-parser.readthedocs.io/en/latest/syntax/code_and_apis.html#including-code-from-files) with data, instead of using a code block to display the data.
|
||||
|
||||
---
|
||||
**NOTE**: The reason for this is, that `codespell` is used to check for common spelling mistakes and output from other programs may contain text, that will trigger it to flag it as an error.
|
||||
|
||||
To work around this issue, `codespell` is configured to ignore example files, so that not entire chapter files have to be ignored.
|
||||
|
||||
---
|
||||
|
||||
Use the `{literalcode}` directive to include files:
|
||||
|
||||
````
|
||||
|
||||
```{literalinclude} examples/my-example.txt
|
||||
:language: text
|
||||
```
|
||||
|
||||
````
|
||||
|
||||
#### Cross-referencing
|
||||
|
||||
There are a few guidelines when it comes to cross-referencing, which work around oddities with [sphinx] and [MyST-parser]:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue