Record
public record DocPage : System.IEquatable<Moka.Docs.Core.Content.DocPage>
Namespace: Moka.Docs.Core.Content
Represents a single documentation page, whether from Markdown or auto-generated from API docs.
Inheritance
Implements: System.IEquatable<Moka.Docs.Core.Content.DocPage>
Properties
| Name | Description |
|---|---|
Content |
The parsed content body (HTML). |
FrontMatter |
Front matter metadata for the page. |
LastModified |
Last modified timestamp, if available. |
Origin |
The origin of this page. |
Route |
The output URL route for this page. |
SourcePath |
The source file path (relative to docs root), or null for generated pages. |
TableOfContents |
Auto-generated table of contents from headings. |
Content
PageContent DocPage.Content { get; set; }
The parsed content body (HTML).
FrontMatter
FrontMatter DocPage.FrontMatter { get; init; }
Front matter metadata for the page.
LastModified
DateTimeOffset? DocPage.LastModified { get; init; }
Last modified timestamp, if available.
Origin
PageOrigin DocPage.Origin { get; init; }
The origin of this page.
Route
string DocPage.Route { get; init; }
The output URL route for this page.
SourcePath
string? DocPage.SourcePath { get; init; }
The source file path (relative to docs root), or null for generated pages.
TableOfContents
TableOfContents DocPage.TableOfContents { get; init; }
Auto-generated table of contents from headings.
Methods
| Name | Description |
|---|---|
ToString() override |
Type Relationships
classDiagram
style DocPage fill:#f9f,stroke:#333,stroke-width:2px
DocPage ..|> DocPage~ : implements
View Source
/// <summary>
/// Represents a single documentation page, whether from Markdown or auto-generated from API docs.
/// </summary>
public sealed record DocPage
{
/// <summary>Front matter metadata for the page.</summary>
public required FrontMatter FrontMatter { get; init; }
/// <summary>The parsed content body (HTML).</summary>
public required PageContent Content { get; set; }
/// <summary>Auto-generated table of contents from headings.</summary>
public TableOfContents TableOfContents { get; init; } = TableOfContents.Empty;
/// <summary>The source file path (relative to docs root), or null for generated pages.</summary>
public string? SourcePath { get; init; }
/// <summary>The output URL route for this page.</summary>
public required string Route { get; init; }
/// <summary>The origin of this page.</summary>
public PageOrigin Origin { get; init; } = PageOrigin.Markdown;
/// <summary>Last modified timestamp, if available.</summary>
public DateTimeOffset? LastModified { get; init; }
/// <inheritdoc/>
public override string ToString() => $"DocPage({Route}, {FrontMatter.Title})";
}