SEO optimization on the hosted pages

This commit is contained in:
2025-11-22 16:45:44 +08:00
parent c62ed191f3
commit 3800dae8b7
5 changed files with 164 additions and 3 deletions

View File

@@ -0,0 +1,12 @@
using DysonNetwork.Shared.Models;
using Microsoft.AspNetCore.Mvc;
namespace DysonNetwork.Zone.SEO;
public static class SnPostExtensions
{
public static string AsUrl(this SnPost post, string host, string scheme)
{
return $"{scheme}://{host}/p/{post.Slug ?? post.Id.ToString()}";
}
}