feat: add meta tags for embeds outside of blog
This commit is contained in:
parent
963a335287
commit
d80a00e97e
@ -12,6 +12,11 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<meta name="color-scheme" content="dark">
|
<meta name="color-scheme" content="dark">
|
||||||
<meta name="theme-color" content="#007EC6">
|
<meta name="theme-color" content="#007EC6">
|
||||||
|
<meta property="og:image" content="@Url.Content("~/img/favicon.png")">
|
||||||
|
<meta property="twitter:image" content="@Url.Content("~/img/favicon.png")">
|
||||||
|
<meta property="og:url" content="@url">
|
||||||
|
<meta property="twitter:url" content="@url">
|
||||||
|
<meta property="twitter:card" content="summary">
|
||||||
@if (ViewData["Title"] != null)
|
@if (ViewData["Title"] != null)
|
||||||
{
|
{
|
||||||
<title>@ViewData["Title"] - Oliver Booth</title>
|
<title>@ViewData["Title"] - Oliver Booth</title>
|
||||||
@ -25,17 +30,21 @@
|
|||||||
string excerpt = BlogPostService.RenderExcerpt(post, out bool trimmed);
|
string excerpt = BlogPostService.RenderExcerpt(post, out bool trimmed);
|
||||||
<meta name="title" content="@post.Title">
|
<meta name="title" content="@post.Title">
|
||||||
<meta name="description" content="@excerpt">
|
<meta name="description" content="@excerpt">
|
||||||
<meta property="og:image" content="@Url.Content("~/img/favicon.png")">
|
|
||||||
<meta property="og:title" content="@post.Title">
|
<meta property="og:title" content="@post.Title">
|
||||||
<meta property="og:description" content="@excerpt">
|
<meta property="og:description" content="@excerpt">
|
||||||
<meta property="og:type" content="article">
|
<meta property="og:type" content="article">
|
||||||
<meta property="og:url" content="@url">
|
|
||||||
<meta property="twitter:title" content="@post.Title">
|
<meta property="twitter:title" content="@post.Title">
|
||||||
<meta property="twitter:creator" content="@post.Author.DisplayName">
|
<meta property="twitter:creator" content="@post.Author.DisplayName">
|
||||||
<meta property="twitter:description" content="@excerpt">
|
<meta property="twitter:description" content="@excerpt">
|
||||||
<meta property="twitter:image" content="@Url.Content("~/img/favicon.png")">
|
}
|
||||||
<meta property="twitter:card" content="summary">
|
else
|
||||||
<meta property="twitter:url" content="@url">
|
{
|
||||||
|
<meta name="title" content="@(ViewData["Title"] != null ? $"{ViewData["Title"]} - Oliver Booth" : "Oliver Booth")">
|
||||||
|
<meta name="description" content="Coffee enthusiast and lover of all things tech. Tech enthusiast and lover of all things coffee.">
|
||||||
|
<meta property="og:title" content="@(ViewData["Title"] != null ? $"{ViewData["Title"]} - Oliver Booth" : "Oliver Booth")">
|
||||||
|
<meta property="og:description" content="Coffee enthusiast and lover of all things tech. Tech enthusiast and lover of all things coffee.">
|
||||||
|
<meta property="twitter:title" content="@(ViewData["Title"] != null ? $"{ViewData["Title"]} - Oliver Booth" : "Oliver Booth")">
|
||||||
|
<meta property="twitter:description" content="Coffee enthusiast and lover of all things tech. Tech enthusiast and lover of all things coffee.">
|
||||||
}
|
}
|
||||||
<link rel="shortcut icon" href="/img/favicon.png" asp-append-version="true">
|
<link rel="shortcut icon" href="/img/favicon.png" asp-append-version="true">
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.1/css/bootstrap.min.css" integrity="sha512-Z/def5z5u2aR89OuzYcxmDJ0Bnd5V1cKqBEbvLOiUNWdg9PQeXVvXLI90SE4QOHGlfLqUnDNVAYyZi8UwUTmWQ==" crossorigin="anonymous" referrerpolicy="no-referrer">
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.1/css/bootstrap.min.css" integrity="sha512-Z/def5z5u2aR89OuzYcxmDJ0Bnd5V1cKqBEbvLOiUNWdg9PQeXVvXLI90SE4QOHGlfLqUnDNVAYyZi8UwUTmWQ==" crossorigin="anonymous" referrerpolicy="no-referrer">
|
||||||
|
Loading…
Reference in New Issue
Block a user