Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README.md: Add a note for init and header name #40

Closed
wants to merge 1 commit into from

Conversation

bryanasdev000
Copy link

Just a little note to help anyone that uses it, since the project does not have a documentation, yet the mention to the init command helps compare mdbook config to mdzk, with special attention that without the head [mdzk] we get a:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Unable to represent the item as a JSON Value

Caused by:
    unsupported None value', src/config.rs:63:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Just a little note to help anyone that uses it, since the project does not have a documentation, yet the mention to the init command helps compare mdbook config to mdzk, with special attention that without the head `[mdzk]` we get a:

```
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Unable to represent the item as a JSON Value

Caused by:
    unsupported None value', src/config.rs:63:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```
@ratsclub
Copy link
Member

ratsclub commented Nov 6, 2021

Thanks for the feedback. I guess we could implement a warning on this case!

@bryanasdev000
Copy link
Author

Thanks for the feedback. I guess we could implement a warning on this case!

Feel free to edit as you please, I just think that a note is good because I got the error when building my notes today with the latest version from nixpkgs.

@kmaasrud
Copy link
Member

kmaasrud commented Nov 6, 2021

What does your mdzk.toml look like? I'm not able to reproduce the panic myself... Although there is an unwrap related to loading the config from a string, it should be pretty flexible and ignore unknown tables - as long as they are valid TOML.

Panics should really not be documented, but rather considered bugs and removed ASAP

@ratsclub
Copy link
Member

ratsclub commented Nov 6, 2021

@kmaasrud I guess then problem occurs when one has [book] instead of [mdzk].

@ratsclub
Copy link
Member

ratsclub commented Nov 6, 2021

@bryanasdev000 We are on our way to update the docs, so this situation might improve a lot in the future! We are handling this error on #41 too.

@ratsclub ratsclub closed this Nov 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants