Compare commits
2 Commits
e9d9836238
...
cd0f38764d
Author | SHA1 | Date | |
---|---|---|---|
cd0f38764d | |||
7bd1c5a45a |
@ -27,10 +27,11 @@ public class RawArticle : PageModel
|
||||
{
|
||||
if (!_blogService.TryGetBlogPost(year, month, day, slug, out BlogPost? post))
|
||||
{
|
||||
Response.StatusCode = 404;
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
Response.Headers.Add("Content-Type", "text/plain; charset=utf-8");
|
||||
|
||||
using Utf8ValueStringBuilder builder = ZString.CreateUtf8StringBuilder();
|
||||
builder.AppendLine("# " + post.Title);
|
||||
if (_blogService.TryGetAuthor(post, out Author? author))
|
||||
@ -42,6 +43,6 @@ public class RawArticle : PageModel
|
||||
|
||||
builder.AppendLine();
|
||||
builder.AppendLine(post.Body);
|
||||
return Content(builder.ToString(), "text/plain");
|
||||
return Content(builder.ToString());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user