Skip to content

Commit ea3778d

Browse files
committed
Document spellchecking
1 parent f835820 commit ea3778d

File tree

2 files changed

+43
-7
lines changed

2 files changed

+43
-7
lines changed

.github/workflows/documentation.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: sphinx
22

3-
on: [push, pull_request, workflow_call]
3+
on: [push, workflow_call]
44

55
jobs:
66
spellcheck:

doc/Editing-the-Wiki.md

+42-6
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,21 @@ Sphinx is a widely-adopted structured documentation tool, which scales well even
77
is used to build [python's documentation](https://docs.python.org/3/), the [linux kernel documentation](https://docs.kernel.org/), and
88
the [numpy documentation](https://numpy.org/doc/stable/).
99

10-
### Markdown
10+
## Markdown
1111

1212
Markdown is the preferred format, although any format supported by sphinx can be used if needed for example ReST or MediaWiki may be useful if moving documentation from other sources.
1313

1414
For a 3-minute introduction to Markdown see ['Mastering Markdown'](https://guides.github.com/features/mastering-markdown/).
1515

16-
### Page Titles
16+
## Page Titles
1717

1818
A top-level heading (e.g. `#` markdown header) is used as the page title. **A page should only have one title** (at the top) - otherwise multiple links to that
1919
page will appear in the navigation structure. Subsections within a page should use sub-headers like `##` or `###`.
2020

2121
The page title is independent from the filename of the markdown file - however, for clarity, choose to use similar titles and
2222
filenames wherever possible.
2323

24-
### Adding & editing pages
24+
## Adding & editing pages
2525

2626
For simple edits to existing pages, editing can be done via the github interface. There is an "edit on github" button at
2727
the top of every page, which will take you to the relevant page in github to edit it.
@@ -36,7 +36,7 @@ Some sphinx `toctrees` (Table-of-contents trees) are listed explicitly, to promo
3636
new pages will need to be added to the `toctree` in the document one level up from where the new page has been added - preserving a
3737
natural reading order. Sphinx will warn you (and fail the build) if you forget to do this.
3838

39-
### Building the wiki locally
39+
## Building the wiki locally
4040

4141
Check out the wiki into `c:\instrument\dev\ibex_developers_manual`:
4242

@@ -69,7 +69,7 @@ rmdir /s /q _build && sphinx-autobuild doc _build
6969
```
7070

7171

72-
### Adding DrawIO Diagram
72+
## Adding DrawIO Diagram
7373

7474
Create new diagram
7575

@@ -86,7 +86,7 @@ In wiki add to markdown using:
8686

8787
To edit this just open that png in `draw.io`.
8888

89-
### Adding Images
89+
## Images
9090

9191
To add images you need to check out the Wiki and add them manually. The images should go into a folder next to the page which will use them.
9292

@@ -99,3 +99,39 @@ git push
9999
You can then add the image in markdown using the URL `test.png`:
100100

101101
![alternative text](test.png)
102+
103+
## Spellchecking
104+
105+
The wiki has a built-in spellchecker, which will automatically run when a commit
106+
is pushed to github.
107+
108+
To run the spellchecker locally, use:
109+
110+
```
111+
sphinx-build -b spelling doc _build
112+
```
113+
114+
There is an additional dictionary of allowed words in `doc/spelling_wordlist.txt`. This
115+
is used for words which we know are spelt correctly, but are not in the default dictionary.
116+
117+
118+
## Admonitions
119+
120+
Sphinx supports various admonitions, which can be used to draw the reader's attention to
121+
certain topics.
122+
123+
For example:
124+
125+
```
126+
:::{tip}
127+
This is a tip!
128+
:::
129+
```
130+
131+
Will render as:
132+
133+
:::{tip}
134+
This is a tip!
135+
:::
136+
137+
The list of supported admonitions is [on the MyST documentation](https://myst-parser.readthedocs.io/en/latest/syntax/admonitions.html).

0 commit comments

Comments
 (0)