From 6d658445baa7e3135a28345a975c050f5a103dff Mon Sep 17 00:00:00 2001 From: Phil Scott Date: Sat, 4 Apr 2026 20:36:18 -0400 Subject: [PATCH 01/18] Bump MyLittleContentEngine dependencies to v0.0.2-alpha.0.6, add versioned resource URLs, enable flat file redirects, and standardize trailing slashes in page routes. --- Spectre.Docs/Components/App.razor | 22 +++++++++++++------ Spectre.Docs/Components/Pages/Blog.razor | 4 ++-- Spectre.Docs/Components/Pages/CliIndex.razor | 2 +- .../Components/Pages/ConsoleIndex.razor | 2 +- Spectre.Docs/Program.cs | 1 + Spectre.Docs/Spectre.Docs.csproj | 6 ++--- 6 files changed, 23 insertions(+), 14 deletions(-) diff --git a/Spectre.Docs/Components/App.razor b/Spectre.Docs/Components/App.razor index bb60f7d..db511cd 100644 --- a/Spectre.Docs/Components/App.razor +++ b/Spectre.Docs/Components/App.razor @@ -1,12 +1,15 @@ - +@using Microsoft.AspNetCore.WebUtilities +@inject IWebHostEnvironment WebHostEnvironment + + - - - - + + + + - + - + @code { + static readonly string Version = DateTime.Now.Ticks.ToString(); + + string GetVersioned(string url) => WebHostEnvironment.IsDevelopment() + ? QueryHelpers.AddQueryString(url, "v", DateTime.Now.Ticks.ToString()) // if we are in dev mode, always cache bust + : QueryHelpers.AddQueryString(url, "v", Version); // in prod we'll use the static tick that we stored for all pages } \ No newline at end of file diff --git a/Spectre.Docs/Components/Pages/Blog.razor b/Spectre.Docs/Components/Pages/Blog.razor index 00278c5..4054dce 100644 --- a/Spectre.Docs/Components/Pages/Blog.razor +++ b/Spectre.Docs/Components/Pages/Blog.razor @@ -1,4 +1,4 @@ -@page "/blog" +@page "/blog/" @using Spectre.Console @layout BlogLayout @inject IMarkdownContentService BlogService @@ -63,7 +63,7 @@ } - diff --git a/Spectre.Docs/Components/Pages/CliIndex.razor b/Spectre.Docs/Components/Pages/CliIndex.razor index c4d8f5f..df55656 100644 --- a/Spectre.Docs/Components/Pages/CliIndex.razor +++ b/Spectre.Docs/Components/Pages/CliIndex.razor @@ -1,4 +1,4 @@ -@page "/cli" +@page "/cli/" @using Spectre.Console @inject IMarkdownContentService CliContentServices @inject ContentEngineOptions ContentEngineOptions diff --git a/Spectre.Docs/Components/Pages/ConsoleIndex.razor b/Spectre.Docs/Components/Pages/ConsoleIndex.razor index 00c1ba0..0c2b0d1 100644 --- a/Spectre.Docs/Components/Pages/ConsoleIndex.razor +++ b/Spectre.Docs/Components/Pages/ConsoleIndex.razor @@ -1,4 +1,4 @@ -@page "/console" +@page "/console/" @using Spectre.Console @inject IMarkdownContentService ConsoleContentServices @inject ContentEngineOptions ContentEngineOptions diff --git a/Spectre.Docs/Program.cs b/Spectre.Docs/Program.cs index 72e10d0..167d386 100644 --- a/Spectre.Docs/Program.cs +++ b/Spectre.Docs/Program.cs @@ -54,6 +54,7 @@ { SolutionPath = "../Spectre.Docs.slnx", }) + .WithFlatFileRedirects() // this will allow links without a trailing slash to redirect to the new URL with a trailing slash // this allows us to use blazor components within Markdown. // see https://phil-scott-78.github.io/MyLittleContentEngine/guides/markdown-extensions#blazor-within-markdown .AddMdazor() diff --git a/Spectre.Docs/Spectre.Docs.csproj b/Spectre.Docs/Spectre.Docs.csproj index c2f8a46..429ed48 100644 --- a/Spectre.Docs/Spectre.Docs.csproj +++ b/Spectre.Docs/Spectre.Docs.csproj @@ -16,9 +16,9 @@ library where if you don't reference it directly they don't include the BuildHost folders. Include for now. --> - - - + + + From 930bb2ce0a94a9f40635a606b86831fb67b4ee77 Mon Sep 17 00:00:00 2001 From: Phil Scott Date: Sat, 4 Apr 2026 21:11:13 -0400 Subject: [PATCH 02/18] Integrate SPA navigation with `SpectreArticleIslandRenderer`, add dynamic SPA resource loading, and update layouts for enhanced content rendering. --- Spectre.Docs/Components/App.razor | 10 +++++ .../Components/Layouts/MainLayout.razor | 2 +- Spectre.Docs/Content/_redirects.yml | 1 - Spectre.Docs/Program.cs | 7 +++ .../Slots/Components/SpectreArticle.razor | 45 +++++++++++++++++++ .../Slots/SpectreArticleIslandRenderer.cs | 45 +++++++++++++++++++ 6 files changed, 108 insertions(+), 2 deletions(-) create mode 100644 Spectre.Docs/Slots/Components/SpectreArticle.razor create mode 100644 Spectre.Docs/Slots/SpectreArticleIslandRenderer.cs diff --git a/Spectre.Docs/Components/App.razor b/Spectre.Docs/Components/App.razor index db511cd..067ed7c 100644 --- a/Spectre.Docs/Components/App.razor +++ b/Spectre.Docs/Components/App.razor @@ -9,6 +9,7 @@ + diff --git a/Spectre.Docs/Components/Layouts/MainLayout.razor b/Spectre.Docs/Components/Layouts/MainLayout.razor index 6f59c80..234689e 100644 --- a/Spectre.Docs/Components/Layouts/MainLayout.razor +++ b/Spectre.Docs/Components/Layouts/MainLayout.razor @@ -38,7 +38,7 @@ } -
+
@Body diff --git a/Spectre.Docs/Content/_redirects.yml b/Spectre.Docs/Content/_redirects.yml index 1ffae25..f8e3d67 100644 --- a/Spectre.Docs/Content/_redirects.yml +++ b/Spectre.Docs/Content/_redirects.yml @@ -45,7 +45,6 @@ redirects: /cli/unit-testing: /cli/how-to/testing-command-line-applications /cli/migration: /cli/ /cli/opencli: /cli/ - /cli: /cli/tutorials/quick-start-your-first-cli-app # Appendix Section /appendix/styles: /console/reference/text-style-reference diff --git a/Spectre.Docs/Program.cs b/Spectre.Docs/Program.cs index 167d386..df443de 100644 --- a/Spectre.Docs/Program.cs +++ b/Spectre.Docs/Program.cs @@ -6,12 +6,14 @@ using MyLittleContentEngine; using MyLittleContentEngine.MonorailCss; using MyLittleContentEngine.Services.Content.CodeAnalysis.Configuration; +using MyLittleContentEngine.Services.Spa; using MyLittleContentEngine.UI.Components; using Spectre.Docs.Components; using Spectre.Docs.Components.Layouts; using Spectre.Docs.Components.Reference; using Spectre.Docs.Components.Shared; using Spectre.Docs.Services; +using Spectre.Docs.Slots; var builder = WebApplication.CreateBuilder(args); @@ -55,6 +57,10 @@ SolutionPath = "../Spectre.Docs.slnx", }) .WithFlatFileRedirects() // this will allow links without a trailing slash to redirect to the new URL with a trailing slash + .WithSpaNavigation(spa => + { + spa.AddIsland(); + }) // this allows us to use blazor components within Markdown. // see https://phil-scott-78.github.io/MyLittleContentEngine/guides/markdown-extensions#blazor-within-markdown .AddMdazor() @@ -130,5 +136,6 @@ // this adds the route for styles.css which is generated dynamically based on the used // CSS classes. app.UseMonorailCss(); +app.UseSpaNavigation(); await app.RunOrBuildContent(args); \ No newline at end of file diff --git a/Spectre.Docs/Slots/Components/SpectreArticle.razor b/Spectre.Docs/Slots/Components/SpectreArticle.razor new file mode 100644 index 0000000..1f5c806 --- /dev/null +++ b/Spectre.Docs/Slots/Components/SpectreArticle.razor @@ -0,0 +1,45 @@ +@using MyLittleContentEngine.UI.Components + +
+
+
+
+

+ @Title +

+ + @if (!string.IsNullOrEmpty(Description)) + { +

+ @Description +

+ } +
+ +
+
+
+ @((MarkupString)HtmlContent) +
+
+ + +
+
+
+
+ +@code { + [Parameter] public string Title { get; set; } = ""; + [Parameter] public string Description { get; set; } = ""; + [Parameter] public string HtmlContent { get; set; } = ""; +} diff --git a/Spectre.Docs/Slots/SpectreArticleIslandRenderer.cs b/Spectre.Docs/Slots/SpectreArticleIslandRenderer.cs new file mode 100644 index 0000000..095f204 --- /dev/null +++ b/Spectre.Docs/Slots/SpectreArticleIslandRenderer.cs @@ -0,0 +1,45 @@ +using MyLittleContentEngine.Services.Content; +using MyLittleContentEngine.Services.Spa; +using Spectre.Console; + +namespace Spectre.Docs.Slots; + +internal class SpectreArticleIslandRenderer( + IMarkdownContentService consoleContentService, + IMarkdownContentService cliContentService, + ComponentRenderer renderer) : RazorIslandRenderer(renderer) +{ + public override string IslandName => "content"; + + protected override async Task?> BuildParametersAsync(string url) + { + // Try console content first, then CLI + var consoleResult = await consoleContentService.GetRenderedContentPageByUrlOrDefault(url); + if (consoleResult is not null) + { + return BuildParams( + consoleResult.Value.Page.FrontMatter.Title, + consoleResult.Value.Page.FrontMatter.Description, + consoleResult.Value.HtmlContent); + } + + var cliResult = await cliContentService.GetRenderedContentPageByUrlOrDefault(url); + if (cliResult is not null) + { + return BuildParams( + cliResult.Value.Page.FrontMatter.Title, + cliResult.Value.Page.FrontMatter.Description, + cliResult.Value.HtmlContent); + } + + return null; + } + + private static Dictionary BuildParams(string title, string description, string htmlContent) => + new() + { + [nameof(Components.SpectreArticle.Title)] = title, + [nameof(Components.SpectreArticle.Description)] = description, + [nameof(Components.SpectreArticle.HtmlContent)] = htmlContent, + }; +} From 90b54929be287e36b85a8f5d2ac0b957a2ffc57b Mon Sep 17 00:00:00 2001 From: Phil Scott Date: Wed, 3 Jun 2026 09:15:53 -0400 Subject: [PATCH 03/18] Migrate docs site from MyLittleContentEngine to Pennington Swap the content engine and modernize the build for the new pipeline: - Replace MyLittleContentEngine packages (and the Roslyn/MSBuild workspace hack) with Pennington, Pennington.MonorailCss, Pennington.UI, and Pennington.TreeSitter. Tree-sitter now backs the `:symbol` code fences in place of Roslyn analysis. - Bump target framework net10.0 -> net11.0 and SDK 10.0 -> 11.0, and set `LangVersion` to preview for Pennington's content type unions. - Rewire DI in `Program.cs` around new typed `MarkdownContentService` wrappers (`Services/PageServices.cs`) that filter the shared Pennington content pipeline by URL prefix so each source binds the right front-matter type. - Update Razor components, layouts, and all blog/cli/console markdown for the new pipeline. - Remove the obsolete island-render slots (`SpectreArticle.razor`, `SpectreArticleIslandRenderer.cs`) and `PageWrapper.razor`. - Ignore `.playwright-mcp/` and drop leftover debugging-screenshot references from the csproj. --- .gitignore | 5 +- README.md | 69 ++++--- Spectre.Docs/BlogFrontMatter.cs | 29 +-- Spectre.Docs/Components/App.razor | 5 +- .../Components/Layouts/BlogLayout.razor | 2 +- .../Components/Layouts/MainLayout.razor | 19 +- Spectre.Docs/Components/Pages/Blog.razor | 4 +- .../Components/Pages/BlogDetails.razor | 8 +- Spectre.Docs/Components/Pages/CliIndex.razor | 12 +- Spectre.Docs/Components/Pages/CliPage.razor | 19 +- .../Components/Pages/ConsoleIndex.razor | 7 +- .../Components/Pages/ConsolePage.razor | 19 +- Spectre.Docs/Components/Pages/Home.razor | 8 +- .../Shared/DocumentationPageContent.razor | 45 +++-- .../Components/Shared/PageWrapper.razor | 60 ------ .../Components/Shared/SharedFooter.razor | 2 +- .../Components/Shared/SharedHeader.razor | 11 +- Spectre.Docs/Components/_Imports.razor | 15 +- .../Content/blog/2021-07-11-hello-world.md | 8 +- ...021-07-19-spectre-console-0.41-released.md | 8 +- ...021-12-16-spectre-console-0.43-released.md | 8 +- ...022-03-27-spectre-console-0.44-released.md | 8 +- ...022-09-10-spectre-console-0.45-released.md | 8 +- ...023-01-10-spectre-console-0.46-released.md | 8 +- ...023-05-19-spectre-console-0.47-released.md | 8 +- ...023-11-22-spectre-console-0.48-released.md | 8 +- ...024-04-23-spectre-console-0.49-released.md | 8 +- ...025-04-08-spectre-console-0.50-released.md | 6 +- ...025-09-07-spectre-console-0.51-released.md | 8 +- ...025-10-10-spectre-console-0.52-released.md | 8 +- ...025-10-26-spectre-console-0.53-released.md | 8 +- ...025-11-13-spectre-console-0.54-released.md | 8 +- ...025-11-13-spectre-console-0.55-released.md | 8 +- .../how-to/async-commands-and-cancellation.md | 8 +- .../configuring-commandapp-and-commands.md | 8 +- .../how-to/customizing-help-text-and-usage.md | 12 +- .../how-to/defining-commands-and-arguments.md | 12 +- .../how-to/handling-errors-and-exit-codes.md | 8 +- .../cli/how-to/hiding-commands-and-options.md | 8 +- .../how-to/intercepting-command-execution.md | 8 +- .../cli/how-to/making-options-required.md | 4 +- .../testing-command-line-applications.md | 16 +- .../how-to/using-custom-type-converters.md | 12 +- .../using-dictionary-and-lookup-options.md | 4 +- .../cli/how-to/using-flag-arguments.md | 8 +- ...rking-with-multiple-command-hierarchies.md | 12 +- .../building-a-multi-command-cli-tool.md | 24 +-- .../dependency-injection-in-cli-apps.md | 44 ++-- .../cli/tutorials/logging-in-cli-apps.md | 30 +-- .../quick-start-your-first-cli-app.md | 8 +- .../how-to/creating-custom-renderables.md | 20 +- .../how-to/displaying-hierarchical-data.md | 16 +- .../console/how-to/displaying-tabular-data.md | 16 +- .../how-to/drawing-charts-and-diagrams.md | 16 +- .../Content/console/how-to/escaping-markup.md | 12 +- .../live-rendering-and-dynamic-updates.md | 16 +- ...organizing-layout-with-panels-and-grids.md | 16 +- .../how-to/prompting-for-user-input.md | 16 +- .../running-tasks-with-async-spinner.md | 12 +- .../console/how-to/showing-activity-status.md | 16 +- .../console/how-to/showing-progress-bars.md | 16 +- .../console/how-to/testing-console-output.md | 16 +- .../console/how-to/writing-exceptions.md | 16 +- .../Content/console/live/live-display.md | 52 ++--- Spectre.Docs/Content/console/live/progress.md | 60 +++--- Spectre.Docs/Content/console/live/status.md | 36 ++-- .../console/prompts/multi-selection-prompt.md | 56 +++--- .../console/prompts/selection-prompt.md | 56 +++--- .../Content/console/prompts/text-prompt.md | 56 +++--- .../creating-custom-renderables-tutorial.md | 12 +- ...tting-started-building-rich-console-app.md | 24 +-- .../tutorials/interactive-prompts-tutorial.md | 20 +- .../tutorials/progress-bars-tutorial.md | 24 +-- .../tutorials/status-spinners-tutorial.md | 16 +- Spectre.Docs/Content/console/widgets/align.md | 40 ++-- .../Content/console/widgets/bar-chart.md | 28 +-- .../console/widgets/breakdown-chart.md | 28 +-- .../Content/console/widgets/calendar.md | 44 ++-- .../Content/console/widgets/canvas-image.md | 56 +++--- .../Content/console/widgets/canvas.md | 36 ++-- .../Content/console/widgets/columns.md | 32 +-- .../Content/console/widgets/figlet.md | 32 +-- Spectre.Docs/Content/console/widgets/grid.md | 48 ++--- Spectre.Docs/Content/console/widgets/json.md | 40 ++-- .../Content/console/widgets/layout.md | 44 ++-- .../Content/console/widgets/markup.md | 20 +- .../Content/console/widgets/padder.md | 40 ++-- Spectre.Docs/Content/console/widgets/panel.md | 48 ++--- Spectre.Docs/Content/console/widgets/rows.md | 28 +-- Spectre.Docs/Content/console/widgets/rule.md | 32 +-- Spectre.Docs/Content/console/widgets/table.md | 56 +++--- .../Content/console/widgets/text-path.md | 24 +-- Spectre.Docs/Content/console/widgets/text.md | 56 +++--- Spectre.Docs/Content/console/widgets/tree.md | 52 ++--- Spectre.Docs/Program.cs | 189 ++++++++---------- Spectre.Docs/Services/PageServices.cs | 188 +++++++++++++++++ .../Slots/Components/SpectreArticle.razor | 45 ----- .../Slots/SpectreArticleIslandRenderer.cs | 45 ----- Spectre.Docs/Spectre.Docs.csproj | 19 +- Spectre.Docs/SpectreConsoleFrontMatter.cs | 35 +--- global.json | 2 +- 101 files changed, 1320 insertions(+), 1286 deletions(-) delete mode 100644 Spectre.Docs/Components/Shared/PageWrapper.razor create mode 100644 Spectre.Docs/Services/PageServices.cs delete mode 100644 Spectre.Docs/Slots/Components/SpectreArticle.razor delete mode 100644 Spectre.Docs/Slots/SpectreArticleIslandRenderer.cs diff --git a/.gitignore b/.gitignore index becc9ce..d57159d 100644 --- a/.gitignore +++ b/.gitignore @@ -486,4 +486,7 @@ $RECYCLE.BIN/ # MyLittleContentEngine files output/ -vcrsharp-logs/ \ No newline at end of file +vcrsharp-logs/ + +# Playwright MCP debugging artifacts (screenshots + console logs) +.playwright-mcp/ diff --git a/README.md b/README.md index eaa4ded..4e7f6ee 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,10 @@ This is the documentation website for **Spectre.Console** (rich console UI libra ## Technology Stack -- **.NET 10.0** - Blazor Server application -- **MyLittleContentEngine** - Markdown-based content management framework +- **.NET 11.0** - Blazor Server application +- **Pennington** - Markdown-based content engine for .NET - **MonorailCss** - Utility-first CSS framework -- **Roslyn** - Code analysis for live code sample integration +- **Pennington.TreeSitter** - Tree-sitter code-fragment extraction for live code samples ## Getting Started @@ -119,68 +119,71 @@ Your blog content here... Blog posts are automatically sorted by date (newest first) and appear at `/blog/your-file-name`. -## Linking to Code with xmldocid +## Linking to Code with `:symbol` fences -The site uses **Roslyn integration** to embed live code from your source files directly into documentation. This ensures code samples are always up-to-date with the actual implementation. +The site uses **Pennington.TreeSitter** to embed live code from your source files directly into documentation. This ensures code samples are always up-to-date with the actual implementation. ### Syntax -Use the special code fence `` ```csharp:xmldocid ``: +Use the special code fence `` ```csharp:symbol ``. The body is a source file path (relative to the repo root) optionally followed by `> Type.Member`: ````markdown -```csharp:xmldocid -M:Spectre.Docs.Examples.AsciiCast.Samples.ProgressSample.Run(Spectre.Console.IAnsiConsole) -M:Spectre.Docs.Examples.AsciiCast.Samples.ProgressSample.CreateTasks(Spectre.Console.ProgressContext,System.Random) +```csharp:symbol +Spectre.Docs.Examples/Showcase/ProgressSample.cs > ProgressSample.Run +Spectre.Docs.Examples/Showcase/ProgressSample.cs > ProgressSample.CreateTasks ``` ```` -### XML Doc ID Format +### Reference format -Use standard .NET XML documentation identifiers: +Address code by **file path + name path** — a name path survives the line shifts that break hard-coded ranges: -| Type | Prefix | Example | -|------|--------|---------| -| Method | `M:` | `M:Namespace.ClassName.MethodName(Param.Type)` | -| Type/Class | `T:` | `T:Spectre.Console.Examples.MyExample` | -| Property | `P:` | `P:Namespace.ClassName.PropertyName` | -| Field | `F:` | `F:Namespace.ClassName.FieldName` | +| Target | Body shape | Example | +|--------|------------|---------| +| Whole file | `` | `Spectre.Docs.Examples/Showcase/ProgressSample.cs` | +| A type | ` > Type` | `... > ProgressSample` | +| A member | ` > Type.Member` | `... > ProgressSample.Run` | +| Nested member | ` > Outer.Inner.Member` | `... > DrawCommand.Settings` | -**Finding XML Doc IDs:** +Modifiers (comma-separated, order-independent) follow the suffix: -1. Navigate to the source file containing the code -2. For methods: `M:` + full namespace + class + method name + parameter types -3. For classes: `T:` + full namespace + class name +| Modifier | Effect | +|----------|--------| +| `,bodyonly` | Render only the member body, stripping the declaration and braces | +| `,imports` | Prepend the file's top-of-file `using` statements | +| `,signatures` | Replace member bodies with `{ … }` for an outline view | +| `symbol-diff` | Emit a unified diff between two members (exactly two references) | **Example from progress.md:** ````markdown -```csharp:xmldocid -M:Spectre.Docs.Examples.AsciiCast.Samples.ProgressSample.Run(Spectre.Console.IAnsiConsole) +```csharp:symbol,bodyonly +Spectre.Docs.Examples/Showcase/ProgressSample.cs > ProgressSample.Run ``` ```` -This extracts the `Run` method from `ProgressSample.cs` and renders it with syntax highlighting. +This extracts the body of the `Run` method from `ProgressSample.cs` and renders it with syntax highlighting. ### How It Works -The site is configured to analyze the solution via Roslyn (`Program.cs:42-45`): +Tree-sitter is wired in `Program.cs`, reading source files directly — no MSBuild workspace, no compilation: ```csharp -.WithConnectedRoslynSolution(_ => new CodeAnalysisOptions +builder.Services.AddTreeSitter(treeSitter => { - SolutionPath = "../Spectre.Docs.sln", -}) + treeSitter.ContentRoot = ".."; // repo root, so fence paths resolve against the sibling example projects +}); ``` -When MyLittleContentEngine encounters `csharp:xmldocid`: -1. Parses the XML Doc ID -2. Uses Roslyn to find the symbol in the compiled solution -3. Extracts the source code +When Pennington encounters a `csharp:symbol` fence: +1. Resolves the file path relative to `ContentRoot` +2. Uses tree-sitter to locate the named member within the file +3. Extracts the source text (applying any modifiers) 4. Renders as syntax-highlighted HTML This approach provides: - **Always up-to-date code** - Changes in source automatically reflect in docs -- **Type safety** - Broken references fail at build time +- **Rename-safe references** - A name path tolerates line shifts; broken references surface in the build report - **No duplication** - Single source of truth for code diff --git a/Spectre.Docs/BlogFrontMatter.cs b/Spectre.Docs/BlogFrontMatter.cs index 2b687fd..13077a3 100644 --- a/Spectre.Docs/BlogFrontMatter.cs +++ b/Spectre.Docs/BlogFrontMatter.cs @@ -1,32 +1,23 @@ -using MyLittleContentEngine.Models; +using Pennington.FrontMatter; namespace Spectre.Console; /// -/// Front matter for blog posts in the Spectre.Console documentation +/// Front matter for blog posts in the Spectre.Console documentation. /// -public class BlogFrontMatter : IFrontMatter +public record BlogFrontMatter : IFrontMatter, ITaggable, IRedirectable { public string Title { get; init; } = "Empty title"; public string Author { get; init; } = "Spectre.Console Team"; - public string Description { get; init; } = string.Empty; + public string? Description { get; init; } public DateTime Date { get; init; } = DateTime.Now; - public bool IsDraft { get; init; } = false; + public bool IsDraft { get; init; } public string[] Tags { get; init; } = []; public string Series { get; init; } = string.Empty; public string? RedirectUrl { get; init; } - public string? Section { get; init; } - public string? Uid { get; init; } = null; + public string? SectionLabel { get; init; } + public string? Uid { get; init; } public string? Repository { get; init; } - - public Metadata AsMetadata() - { - return new Metadata() - { - Title = Title, - Description = Description, - LastMod = Date, - RssItem = true - }; - } -} \ No newline at end of file + + DateTime? IFrontMatter.Date => Date; +} diff --git a/Spectre.Docs/Components/App.razor b/Spectre.Docs/Components/App.razor index 067ed7c..b3bb0ea 100644 --- a/Spectre.Docs/Components/App.razor +++ b/Spectre.Docs/Components/App.razor @@ -8,8 +8,9 @@ - - + + + - -@code { - /// - /// The main content to display in the page body. - /// - [Parameter] - public RenderFragment? ChildContent { get; set; } - - /// - /// Optional header content (typically a PageHeader component). - /// - [Parameter] - public RenderFragment? HeaderContent { get; set; } - - /// - /// Optional outline entries for "On this page" navigation. - /// - [Parameter] - public OutlineEntry[]? Outline { get; set; } -} diff --git a/Spectre.Docs/Components/Shared/SharedFooter.razor b/Spectre.Docs/Components/Shared/SharedFooter.razor index 9354961..30d5c85 100644 --- a/Spectre.Docs/Components/Shared/SharedFooter.razor +++ b/Spectre.Docs/Components/Shared/SharedFooter.razor @@ -1,5 +1,5 @@
-

© @DateTime.Now.Year Spectre.Console Documentation. Built with MyLittleContentEngine.

+

© @DateTime.Now.Year Spectre.Console Documentation. Built with Pennington.

\ No newline at end of file diff --git a/Spectre.Docs/Components/Shared/SharedHeader.razor b/Spectre.Docs/Components/Shared/SharedHeader.razor index ff87a0f..4d3c719 100644 --- a/Spectre.Docs/Components/Shared/SharedHeader.razor +++ b/Spectre.Docs/Components/Shared/SharedHeader.razor @@ -1,6 +1,6 @@ @inject NavigationManager NavigationManager -
@@ -92,7 +92,11 @@
-
+ @* Same SPA-region treatment as the desktop nav: only the link list swaps; the nav + element (which carries data-expanded toggled by JS) stays in place. *@