Skip to content

Commit a9033f5

Browse files
authored
Docs: add missing README (#957)
## Description In 92304eb, I renamed the README but forgot to add it back to git. The readme is there to explain how the docs work. However, it cannot be called "README.md" otherwise it takes the place of `index` on the website. This PR adds it back. However, I know wonder whether it would not be better to just ignore it when copying in the website at build time.
1 parent f46fd7d commit a9033f5

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

docs/_README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# CAREamics guides
2+
3+
These docs are automatically tested in the `.github/workflows/ci_guides.yml` CI and separately imported into the [CAREamics website](https://careamics.github.io/latest/). They consist of a structured organization of python snippets and markdown files.
4+
5+
The structure of the docs on the website is defined in `nav.toml`.
6+
7+
## How to use the snippets
8+
9+
Snippets are stored in python files and automatically aggregated by `test_guides.py` as pytest test cases. A snippet consist of a python code in the following block:
10+
11+
```python
12+
# %%
13+
# --8<-- [start:snippet_id]
14+
...
15+
# --8<-- [end:snippet_id]
16+
```
17+
18+
The `snippet_id` is used to identify the snippet and can be used in the markdown files to include the snippet as follows:
19+
20+
````markdown
21+
```python
22+
--8<-- "path/to/snippet.py:snippet_id"
23+
```
24+
````
25+
26+
> [!NOTE]
27+
> The path to the snippet is relative to the `docs` folder.
28+
29+
30+
## How to add new pages to the guides
31+
32+
The guides are uploaded automatically to the website at build time and organized according to the `nav.toml` file. To add a new page to the guides, simply create a new markdown file in the `docs` folder and add it to the `nav.toml` file.
33+
34+
> [!IMPORTANT]
35+
> Only existing keys are accepted by the website: Using CAREamics, Tutorials, and Legacy (v0.1). For additional sections, the website's `zensical.toml` file has to be updated.

0 commit comments

Comments
 (0)