Skip to content

fix doctype #1300

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pgml-dashboard/src/api/cms.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ pub struct Document {
// Gets document markdown
impl Document {
pub async fn from_path(path: &PathBuf) -> anyhow::Result<Document, std::io::Error> {
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(),
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion pgml-dashboard/src/components/layouts/head/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<meta property="og:site_name" content="PostgresML">
<meta property="og:type" content="website">
<meta property="og:title" content="<%= title %> – PostgresML">
<meta property="og:url" content="http://www.postgresML.org">
<meta property="og:url" content="http://www.postgresml.org">
<meta property="og:locale" content="en_US">

<meta name="twitter:site" content="@postgresml">
Expand Down