diff --git a/server/src/html.rs b/server/src/html.rs
index 77a4b77..5968648 100644
--- a/server/src/html.rs
+++ b/server/src/html.rs
@@ -447,14 +447,14 @@ where
element_content_handlers: vec![element!("meta", |meta| {
if let Some(attr) = meta.get_attribute("property") {
let content = match attr.as_str() {
- "og:url" => &[env!("DOMAIN"), slug.as_ref()].concat(),
+ "og:url" => &["https://", env!("DOMAIN"), slug.as_ref()].concat(),
"og:type" => "article",
"og:title" => title.as_ref(),
"og:description" => description.as_ref(),
"og:image" => {
let image = image.as_ref();
if !image.is_empty() {
- image
+ &["https://", env!("DOMAIN"), image].concat()
} else {
meta.remove();
""
@@ -516,8 +516,10 @@ where
ContentType::Html,
);
Ok(())
+ }), element!("head", |head| {
+ head.append(&meta, ContentType::Html);
+ Ok(())
})],
-
..RewriteStrSettings::new()
},
)
@@ -754,7 +756,7 @@ where
element_content_handlers: vec![element!("a", move |t| {
match t.get_attribute("class") {
Some(class) => t
- .set_attribute("class", &[&class, "animated-link-underline"].concat())
+ .set_attribute("class", &[&class, " animated-link-underline"].concat())
.unwrap_or_default(),
None => {
t.set_attribute("class", "animated-link-underline")
@@ -769,12 +771,6 @@ where
.unwrap_or_default()
}
-// fn footer(input: S) -> String
-// where
-// S: AsRef,
-// {
-// }
-
pub(crate) fn sanitize>(input: S) -> String {
rewrite_str(
input.as_ref(),
diff --git a/server/src/templates/default.html b/server/src/templates/default.html
index 4d20c4a..02611af 100644
--- a/server/src/templates/default.html
+++ b/server/src/templates/default.html
@@ -2,8 +2,8 @@
-
-
+
+