You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
after I added metadata tag in frontmatter (tried several formats, spacing) and it keeps failing:
error below
npm run dev
>[email protected] dev
> rspress dev
🔥 Rspress v1.18.1
thread 'thread '<unnamed><unnamed>' panicked at ' panicked at crates/plugin_frontmatter/src/lib.rscrates/plugin_frontmatter/src/lib.rs::1414::3636:
:
Failed to parse yaml: title: DE20020 - Failed to get application hash list.
description: Error - DE20020 - Workaround and debug for error: Failed to get application hash list.
head:
- - meta
- name: og:title
content: Error - DE20020 - Failed to get application hash list.
- - meta
- name: og:url
content: https://docs.com/guide/error/de20020。: Error { kind: SCANNER, problem: "mapping values are not allowed in this context", problem_mark: Mark { line: 2, column: 69 } }Failed to parse yaml: title: DE20019 - Snapshot upload gave no results
description: Error - DE20019 - Workaround and debug for error: snapshot upload gave no results
head:
- - meta
- name: og:title
content: Error - DE20019 - Snapshot upload gave no results
- - meta
- name: og:url
content: https://docs.com/guide/error/de20019。: Error { kind: SCANNER, problem: "mapping values are not allowed in this context", problem_mark: Mark { line: 2, column: 69 } }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5
fatal runtime error: failed to initiate panic, error 5
zsh: abort npm run dev
My frontmatter in each file looks like:
---
title: BU10013 - package.json must have a name and version
description: Error - BU10013 - Why does package.json needs to have a name and version? What happens when we don't have one?
head:
- - meta
- name: og:title
content: Error - BU10013 - package.json must have a name and version
- - meta
- name: og:url
content: https://docs.com/guide/error/bu10013
---
I have also tried this (check the spacing betwee - -
---
title: BU10013 - package.json must have a name and version
description: Error - BU10013 - Why does package.json needs to have a name and version? What happens when we don't have one?
head:
- - meta
- name: og:title
content: Error - BU10013 - package.json must have a name and version
- - meta
- name: og:url
content: https://docs.com/guide/error/bu10013
---
I think there is an error in the writing of yaml, and the yaml parse of mdx-rs conforms to the specification.
You can try this below
title: DE20019 - Snapshot upload gave no results
- description: Zephyr Error - DE20019 - Workaround and debug for error: snapshot upload gave no results+ description: "Zephyr Error - DE20019 - Workaround and debug for error: snapshot upload gave no results"
head:
- - meta
- name: og:title
content: Zephyr Error - DE20019 - Snapshot upload gave no results
- - meta
- name: og:url
content: https://docs.zephyr-cloud.io/guide/error/de20019
Can we improve the error message for yaml syntax errors
The current error messge of serde_yaml is complete and aligned with the specification of yaml, which can debug problems. We can try more on how to better show it.
Failed to parse yaml: <yaml-content>
Error { kind: SCANNER, problem: "mapping values are not allowed in this context", problem_mark: Mark { line: 2, column: 69 } }
But before that, mdx-rs should catch this panic in rust side to make it more friendly to users who doesn't know much about Rust.
Version
Details
after I added metadata tag in frontmatter (tried several formats, spacing) and it keeps failing:
error below
My frontmatter in each file looks like:
I have also tried this (check the spacing betwee
- -
Not entirely sure what did I do wrong as i was following this guide here:
https://rspress.dev/api/config/config-frontmatter#head
Reproduce link
https://github.com/ZephyrCloudIO/zephyr-documentation/tree/get-started
Reproduce Steps
clone the repo and run
npm i && npm run dev
The text was updated successfully, but these errors were encountered: