Fix embed metadata

This commit is contained in:
Laura Hausmann 2022-11-20 23:34:41 +01:00
parent c93518845b
commit cd14ab9fab
Signed by: zotan
GPG key ID: D044E84C5BE01605
4 changed files with 9 additions and 6 deletions

View file

@ -3,6 +3,7 @@
@model IndexModel
@{
ViewData["title"] = "home";
ViewData["desc"] = "Website of a queer software, systems, and network engineer.";
var travelynx = new Database.DbConn().TravelynxInfo.ToList();
}
@ -153,4 +154,4 @@
@section postfooter {
<img src="/files/help.svg" height="450rem" title="Designed by someone I love, ~fr2">
}
}

View file

@ -4,8 +4,8 @@
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="@ViewData["card_title"]"/>
<meta name="twitter:description" content="@ViewData["card_desc"]"/>
<meta name="twitter:title" content="zotan.pw >> @ViewData["title"]"/>
<meta name="twitter:description" content="@ViewData["desc"]"/>
@if (ViewData.ContainsKey("subtitle")) {
<title>zotan.pw >> @ViewData["title"] >> @ViewData["subtitle"]</title>
}
@ -52,4 +52,4 @@
</div>
<script src="~/js/site.js"></script>
</body>
</html>
</html>

View file

@ -2,6 +2,7 @@
@model BlogModel
@{
ViewData["title"] = "blog";
ViewData["desc"] = "Blog of a disabled neurodivergent queer person unhappy with the state of the world.";
}
<p>Hey there, welcome to the blog of a disabled neurodivergent queer person unhappy with the state of the world.</p>
@ -13,4 +14,4 @@
<strong>@post.PublishedOn.ToString("yyyy-MM-dd")</strong> <a href="/blog/@post.Shorthand">@post.Title</a>
</li>
}
</ul>
</ul>

View file

@ -11,6 +11,7 @@
}
ViewData["title"] = "blog";
ViewData["subtitle"] = post.Shorthand;
ViewData["desc"] = post.Title;
#if (DEBUG)
post.UpdateContentAndMetadata();
#endif
@ -20,4 +21,4 @@
<h1 id="post">IPv6-native networking: a project report</h1>
<div align="justify">
@Html.Raw(post.Content)
</div>
</div>