Build process crashes when - path: docs/README.md is specified
mscno opened this issue · 1 comments
mscno commented
The build process crashes and panics when specifying the README.md file as a path.
Example:
// >> doctave.yaml
---
title: "Repo"
navigation:
- path: docs/README.md
$ RUST_BACKTRACE=1 doctave build
at 14:37:03
Doctave | Build
Building site into /home/msc/Code/go/src/oceanbolt.com/spire-vessels/site
thread 'main' panicked at 'No matching link found', src/navigation.rs:47:26
stack backtrace:
0: rust_begin_unwind
at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/std/src/panicking.rs:515:5
1: core::panicking::panic_fmt
at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/core/src/panicking.rs:92:14
2: core::option::expect_failed
at /rustc/c8dfcfe046a7680554bf4eb612bad840e7631c4b/library/core/src/option.rs:1578:5
3: doctave::navigation::Navigation::customize
4: doctave::navigation::Navigation::build_for
5: <doctave::site::DiskBackedSite as doctave::site::Site>::build
6: doctave::build::BuildCommand::run
7: doctave::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
It is not a major issue, but it caused a bit of debugging for me trying to get the custom navigation to work. It was unclear that it was the README.md inclusion that caused the error. Suggesting to either ignore the file if specified, or provide a more helpful error.
begleynk commented
Ah thanks for reporting this. Looks like I've missed a unit test case.