Skip to content

Markdown Page Functionality - #68

Merged
par456 merged 9 commits into
mainfrom
MarkdownPagesFunctionality
Jul 10, 2026
Merged

par456 merged 9 commits into
mainfrom
MarkdownPagesFunctionality

Conversation

@ric394

@ric394 ric394 commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

resolves #67

Allows the displaying of markdown files along side the current html formatted docs.

ric394 added 5 commits July 9, 2026 17:17
- dynamically constructs menu from folder structure of html and md root folders
- retains HTML rendering as before
- Still WIP but is pretty darn close
Copilot AI review requested due to automatic review settings July 10, 2026 04:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds first-class support for browsing and rendering markdown-based documentation alongside the existing generated HTML docs, wiring both into the Blazor UI (home page + nav) and container deployment.

Changes:

  • Introduces DocsService (Markdig-powered) and a new /docs/{*DocPath} page to render markdown content from a configured filesystem root.
  • Introduces HtmlDocsService plus reusable section link components to replace hardcoded HTML doc link lists and provide a generic /html/{SectionSlug}/{Filename?} browsing experience.
  • Updates app configuration and container mounts to supply both apsim-docs-html and apsim-docs-md content at runtime.

Reviewed changes

Copilot reviewed 24 out of 25 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
Services/HtmlDocsService.cs Adds section/page discovery and HTML rendering for generated docs.
Services/DocsService.cs Adds markdown tree indexing, front-matter/title parsing, and markdown-to-HTML rendering.
Program.cs Registers the new docs services in DI.
docker-compose.yml Mounts the markdown docs folder into the container.
Components/Pages/Validation.razor Switches validation HTML rendering to use HtmlDocsService + section links.
Components/Pages/Tutorials.razor Uses the new HTML section links component for tutorials.
Components/Pages/Tutorial.razor Switches tutorial HTML rendering to HtmlDocsService.
Components/Pages/TechnicalInfo.razor Adds a new page which links into a markdown section.
Components/Pages/Models.razor Switches models HTML rendering to HtmlDocsService.
Components/Pages/Model.razor Uses the new HTML section links component for models.
Components/Pages/HtmlDocs.razor Adds a generic HTML section/page browser route.
Components/Pages/Home.razor Lists both HTML sections and markdown top-level sections on the home page.
Components/Pages/Docs.razor Adds the main markdown docs browsing/rendering route.
Components/Layout/NavMenu.razor Builds nav items dynamically from available HTML/markdown sections.
Components/Layout/ValidationLinks.razor Replaces hardcoded validation link cards with section link component usage.
Components/Layout/TutLinks.razor Replaces hardcoded tutorial link cards with section link component usage.
Components/Layout/ModelLinks.razor Replaces hardcoded model link cards with section link component usage.
Components/Layout/HtmlSectionLinks.razor New component for listing HTML pages in a section.
Components/Layout/DocSectionLinks.razor New component for listing markdown pages/directories in a section.
Components/Custom/DocLink.razor Updates namespace to APSIM.Docs.Components.Custom.
APSIM.Docs.csproj Adds Markdig package reference.
appsettings.json Adds Docs options (roots for markdown + HTML).
appsettings.Development.json Adds Docs options (roots for markdown + HTML).
.gitignore Ignores the mounted docs directories.
.dockerignore Excludes mounted docs directories from Docker build context.
remove-later.txt Removes a temporary build trigger file.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Services/HtmlDocsService.cs Resolved
Comment thread Services/HtmlDocsService.cs Resolved
Comment thread Services/DocsService.cs Resolved
Comment thread Components/Pages/Docs.razor Resolved
Comment thread Components/Layout/TutLinks.razor Resolved
Comment thread Components/Pages/Home.razor Resolved
@ric394
ric394 requested a review from par456 July 10, 2026 05:27
ric394 and others added 2 commits July 10, 2026 15:42
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@par456
par456 merged commit 77727fa into main Jul 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow markdown files to be shown

3 participants