pietroppeter / nimibook

A port of mdbook to nim(ib)
https://pietroppeter.github.io/nimibook/
MIT License
77 stars 7 forks source link

Cannot Open Markdown Files #38

Closed kerrycobb closed 2 years ago

kerrycobb commented 3 years ago

After looking at the nimibook documentation I would expect this to work:

I have a project directory that looks like this:

├── book
│   └── index.md
├── nbook
└── nbook.nim

The nbook.nim file looks like this:

import nimibook

var book = newBookFromToc("nimibook", "book"):
  entry("Introduction", "index.md")

nimibookCli(book)

When I try to build this, I get this error: Error: unhandled exception: cannot open: book/page.md [IOError]

This seems like it might be a bug or like it would be helpful to explain in the documentation.

pietroppeter commented 3 years ago

Thanks for reporting, I was able to reproduce this, it is indeed a bug related to path handling in nimib. I will fix it.