✨ SEO optimization on the hosted pages
This commit is contained in:
12
DysonNetwork.Zone/SEO/SnPostExtensions.cs
Normal file
12
DysonNetwork.Zone/SEO/SnPostExtensions.cs
Normal 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()}";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user