Link Atom and JSON feeds as alternates on home page

This commit is contained in:
pancakes 2025-09-16 15:59:21 +10:00
parent 77f3972292
commit df062fb86e
Signed by: pancakes
SSH key fingerprint: SHA256:yrp4c4hhaPoPG07fb4QyQIgAdlbUdsJvUAydJEWnfTw
3 changed files with 33 additions and 26 deletions

View file

@ -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)

View file

@ -4,8 +4,14 @@
@using PancakesWeb.Data
@using PancakesWeb.Schema
<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>

View file

@ -1,5 +1,5 @@
<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">
@ -20,7 +20,6 @@
<meta property="og:type" content="website">
}
<meta name="fediverse:creator" content="@@pancakes@meow.company">
</HeadContent>
@code {
[Parameter, EditorRequired] public required string UrlPath { get; set; }