More fixes
This commit is contained in:
parent
15fa09430b
commit
6b12e21d50
54 changed files with 1665 additions and 630 deletions
|
|
@ -65,6 +65,14 @@ pub async fn og_middleware(request: Request, next: Next) -> Response {
|
|||
format!("{}/api/screenshot?og=1&{}", state.public_url, query_string)
|
||||
};
|
||||
|
||||
let og_url = if query_string.is_empty() {
|
||||
format!("{}{}", state.public_url, path)
|
||||
} else {
|
||||
format!("{}{}?{}", state.public_url, path, query_string)
|
||||
};
|
||||
|
||||
let og_logo = format!("{}/favicon.svg", state.public_url);
|
||||
|
||||
let (og_title, og_description) = if is_invite {
|
||||
(
|
||||
"You\u{2019}re invited to Perfect Postcode",
|
||||
|
|
@ -81,6 +89,8 @@ pub async fn og_middleware(request: Request, next: Next) -> Response {
|
|||
r#"<meta property="og:title" content="{og_title}" />
|
||||
<meta property="og:description" content="{og_description}" />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content="{og_url}" />
|
||||
<meta property="og:logo" content="{og_logo}" />
|
||||
<meta property="og:image" content="{og_image_url}" />
|
||||
<meta property="og:image:width" content="1200" />
|
||||
<meta property="og:image:height" content="630" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue