Hello everyone
I’m using gray_matter to retrieve data from a Markdown file; the idea is to create my own static page, but I’m getting this error.
[lark@lark blog]$ cargo run Compiling blog v0.1.0 (/home/lark/Documents/programming/rust/blog) Finished dev profile [unoptimized + debuginfo] target(s) in 0.23s Running target/debug/blogError: Deserialize error: input contains invalid characters This is the structure of the Markdown document I’m trying to read.
--- author: proRust name: Profile date: 6/10/2026 --- # About Me content This is the structure I’m trying to parse.
use chrono::{DateTime, Utc}; use serde::{Deserialize, Serialize}; #[derive(Serialize, Deserialize, Debug)] pub struct FormatDocument { pub author: String, pub name: String, pub date: DateTime<Utc>, } The issue I’m having is with the date. I’m using the UK format and Chrono with UTC. I’m not sure if there’s another structure that would work for me, or if I should change the format of how the date is written in my Markdown document.
Many thanks to anyone who can help.
2 posts - 2 participants

