Link Atom and JSON feeds as alternates on home page
This commit is contained in:
parent
77f3972292
commit
df062fb86e
3 changed files with 33 additions and 26 deletions
|
@ -3,8 +3,10 @@
|
|||
|
||||
@if (Post != null)
|
||||
{
|
||||
<HeadContent>
|
||||
<OpenGraph UrlPath="@Post.Slug" Title="@Post.Title" Description="@Post.Description"
|
||||
ImagePath="@($"post-assets/{Post.Slug}/{Post.HeaderFilename}")" ImageAlt="@Post.HeaderAlt" LargeImage="true"/>
|
||||
</HeadContent>
|
||||
|
||||
<SectionContent SectionName="Header">
|
||||
@if (Post.HeaderFilename != null)
|
||||
|
|
|
@ -4,8 +4,14 @@
|
|||
@using PancakesWeb.Data
|
||||
@using PancakesWeb.Schema
|
||||
|
||||
<OpenGraph UrlPath="" Title="Home"
|
||||
<HeadContent>
|
||||
@* Feeds *@
|
||||
<link rel="alternate" type="application/atom+xml" href="/feed.atom"/>
|
||||
<link rel="alternate" type="application/feed+json" href="/feed.json"/>
|
||||
|
||||
<OpenGraph UrlPath="" Title="Home"
|
||||
Description="I'm a cat enby (they/it) from Australia that likes cats, Linux, and programming"/>
|
||||
</HeadContent>
|
||||
|
||||
<main id="main-content" class="container">
|
||||
<h1 id="pancakes">pancakes</h1>
|
||||
|
|
|
@ -1,26 +1,25 @@
|
|||
<PageTitle>@Title - pancakes</PageTitle>
|
||||
<HeadContent>
|
||||
<meta name="description" content="@Description"/>
|
||||
<meta property="og:url" content="https://pancakes.gay/@UrlPath">
|
||||
<meta property="og:site_name" content="pancakes">
|
||||
<meta property="og:title" content="@Title">
|
||||
<meta property="og:description" content="@Description">
|
||||
<meta property="og:image" content="@(Assets[ImagePath ?? "icon.webp"])">
|
||||
@if (ImageAlt != null)
|
||||
{
|
||||
|
||||
<meta name="description" content="@Description"/>
|
||||
<meta property="og:url" content="https://pancakes.gay/@UrlPath">
|
||||
<meta property="og:site_name" content="pancakes">
|
||||
<meta property="og:title" content="@Title">
|
||||
<meta property="og:description" content="@Description">
|
||||
<meta property="og:image" content="@(Assets[ImagePath ?? "icon.webp"])">
|
||||
@if (ImageAlt != null)
|
||||
{
|
||||
<meta property="og:image:alt" content="@ImageAlt">
|
||||
}
|
||||
@if (LargeImage)
|
||||
{
|
||||
}
|
||||
@if (LargeImage)
|
||||
{
|
||||
<meta property="og:type" content="article">
|
||||
<meta property="twitter:card" content="summary_large_image">
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
<meta property="og:type" content="website">
|
||||
}
|
||||
<meta name="fediverse:creator" content="@@pancakes@meow.company">
|
||||
</HeadContent>
|
||||
}
|
||||
<meta name="fediverse:creator" content="@@pancakes@meow.company">
|
||||
|
||||
@code {
|
||||
[Parameter, EditorRequired] public required string UrlPath { get; set; }
|
||||
|
|
Loading…
Add table
Reference in a new issue