26 lines
839 B
C#
26 lines
839 B
C#
namespace Elternbeirat.Web.Services;
|
|
|
|
/// <summary>
|
|
/// A static content page, read from a Markdown file in <c>Content/pages/</c>.
|
|
/// The file name (without extension) is the slug.
|
|
/// </summary>
|
|
public sealed class Page
|
|
{
|
|
/// <summary>
|
|
/// URL identifier of the page, taken from the file name without umlauts
|
|
/// (e.g. <c>vorstandsteam</c>). It appears in the route <c>/{slug}</c>.
|
|
/// </summary>
|
|
public required string Slug { get; init; }
|
|
|
|
/// <summary>
|
|
/// Display title from the YAML front matter (<c>titel:</c>). Falls back to
|
|
/// the slug when no title is set.
|
|
/// </summary>
|
|
public required string Title { get; init; }
|
|
|
|
/// <summary>
|
|
/// The page body rendered from Markdown to HTML (front matter excluded).
|
|
/// </summary>
|
|
public required string ContentHtml { get; init; }
|
|
}
|