fix: use area "blog" for page link
This commit is contained in:
parent
1bdd2a04f0
commit
becd70c865
|
@ -49,9 +49,10 @@ public sealed class BlogApiController : ControllerBase
|
|||
humanizedTimestamp = post.Updated?.Humanize() ?? post.Published.Humanize(),
|
||||
excerpt = _blogService.GetExcerpt(post, out bool trimmed),
|
||||
trimmed,
|
||||
url = Url.Page("/Blog/Article",
|
||||
url = Url.Page("/Article",
|
||||
new
|
||||
{
|
||||
area = "blog",
|
||||
year = post.Published.ToString("yyyy"),
|
||||
month = post.Published.ToString("MM"),
|
||||
day = post.Published.ToString("dd"),
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.RazorPages;
|
||||
using OliverBooth.Data.Blog;
|
||||
using OliverBooth.Services;
|
||||
|
@ -40,11 +40,12 @@ public class Index : PageModel
|
|||
{
|
||||
var route = new
|
||||
{
|
||||
area = "blog",
|
||||
year = post.Published.Year,
|
||||
month = post.Published.Month,
|
||||
day = post.Published.Day,
|
||||
slug = post.Slug
|
||||
};
|
||||
return Redirect(Url.Page("/Blog/Article", route)!);
|
||||
return Redirect(Url.Page("/Article", route)!);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue