Consume PocketBase for posts and events, with English routes

This commit is contained in:
tleininger committed 2026-09-23 13:09:22 +02:00
1 parent c59e7a4f83
commit da87716d97
22 files changed
+278 -225

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
using Markdig;
namespace Elternbeirat.Web.Shared;
/// <summary>
/// Renders Markdown to HTML. Content now comes from PocketBase as raw Markdown
/// (the <c>body</c> field), so the pages render it at display time instead of
/// reading pre-rendered HTML from files.
/// </summary>
public static class Markdown
{
private static readonly MarkdownPipeline Pipeline =
new MarkdownPipelineBuilder().Build();
/// <summary>
/// Converts a Markdown string to HTML. Returns an empty string for
/// <c>null</c> or empty input, so callers can bind the result directly.
/// </summary>
public static string ToHtml(string? markdown) =>
string.IsNullOrEmpty(markdown)
? ""
: Markdig.Markdown.ToHtml(markdown, Pipeline);
}