From 96b1ef96f364030d2158e45b4d964a709a3f2c53 Mon Sep 17 00:00:00 2001 From: Montana Low Date: Tue, 23 Jan 2024 12:02:10 -0800 Subject: [PATCH] fix doctype --- pgml-dashboard/src/api/cms.rs | 6 +++--- pgml-dashboard/src/components/layouts/head/template.html | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pgml-dashboard/src/api/cms.rs b/pgml-dashboard/src/api/cms.rs index e7d436965..f97cd4775 100644 --- a/pgml-dashboard/src/api/cms.rs +++ b/pgml-dashboard/src/api/cms.rs @@ -115,9 +115,9 @@ pub struct Document { // Gets document markdown impl Document { pub async fn from_path(path: &PathBuf) -> anyhow::Result { - debug!("path: {:?}", path); + debug!("path: {path:?}"); - let regex = regex::Regex::new(r#".*/pgml-cms/([^"]*)/(.*)\.md"#).unwrap(); + let regex = regex::Regex::new(r#".*/pgml-cms/([^\/"]*)/(.*)(\.md)"#).unwrap(); let doc_type = match regex.captures(&path.clone().display().to_string()) { Some(c) => DocType::from_str(&c[1]).ok(), @@ -195,7 +195,7 @@ impl Document { if image.contains(default_image) { None } else { - Some(format!("{}{}", config::site_domain(), image)) + Some(format!("{}/{}", config::site_domain(), image)) } } None => None, diff --git a/pgml-dashboard/src/components/layouts/head/template.html b/pgml-dashboard/src/components/layouts/head/template.html index e848c9da6..973cf27a6 100644 --- a/pgml-dashboard/src/components/layouts/head/template.html +++ b/pgml-dashboard/src/components/layouts/head/template.html @@ -25,7 +25,7 @@ - +