AnswerDotAI / AnswerDotAI/nbdev
nbdev_preview strips leading digits from directories in `sidebar.yml`, but not in `_docs`
- Dominant language
- Jupyter Notebook
- Stars
- 5.3k
- Forks
- 513
- Avg merge
- 2d 30m
- Merged PRs (30d)
- 8
Description
As the title suggests, calling `nbdev_preview` with a file inside a directory whose name starts with leading digits (e.g. `00_test`) will result in broken documentation.
## steps to reproduce
Create a new nbdev_project and a `00_test` directory under notebooks.
```bash
nbdev_init
mkdir nbs/00_test
mv nbs/00_core.ipynb nbs/00_test/00_core.ipynb
nbdev_preview
```
will result in the following `sidebar.yml`
```yaml
website:
sidebar:
contents:
- index.ipynb
- section: test
contents:
- test/00_core.ipynb
```
which is broken, as the correct path would be `00_test/00_core.ipynb` (file is under `_proc/00_test/00_core.html.md`). Thus the link in the preview will not work.
Contributor guide
Assessment
This issue has not been assessed yet.