Skip to content

nbdev_preview strips leading digits from directories in sidebar.yml, but not in _docs #1492

Open
@stefanheyder

Description

@stefanheyder

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.

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

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions