Files
FrontOffice/src/FrontOffice.Main/Pages/_Host.cshtml.cs
T
masoodafar-web 2573729db5
Build and Deploy to Kubernetes / build-and-deploy (push) Has been cancelled
feat: implement SEO enhancements and sitemap generation
- Added SEO configuration settings in appsettings for both development and staging environments, including site URL, name, and default description.
- Registered SEO-related services in the dependency injection container, including `SeoMetadataProvider` and `SitemapGenerator`.
- Updated the main program to configure SEO settings and map a new endpoint for generating the sitemap.
- Enhanced the `_Host.cshtml` page to utilize SEO metadata, including title, description, and Open Graph tags, improving search engine visibility and user engagement.

These changes significantly enhance the SEO capabilities of the application, ensuring better indexing and presentation in search results.
2026-07-01 21:45:24 +03:30

22 lines
532 B
C#

using FrontOffice.Main.Utilities.Seo;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace FrontOffice.Main.Pages;
public class HostModel : PageModel
{
private readonly SeoMetadataProvider _seoMetadataProvider;
public SeoPageMetadata Seo { get; private set; } = default!;
public HostModel(SeoMetadataProvider seoMetadataProvider)
{
_seoMetadataProvider = seoMetadataProvider;
}
public async Task OnGetAsync()
{
Seo = await _seoMetadataProvider.GetForPathAsync(Request.Path);
}
}