This repository was archived by the owner on Dec 3, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 566
This repository was archived by the owner on Dec 3, 2025. It is now read-only.
support for publishing standalone Markdown, static HTML, WebAssembly hosts #214
Copy link
Copy link
Closed as not planned
Closed as not planned
Copy link
Labels
Description
Some aspects of the Try .NET Markdown format make the source Markdown file less than ideal for display directly within e.g. a GitHub readme.md:
- Empty code fences referencing a backing project. These are populated at runtime by
dotnet trybut other Markdown parsers will render them as empty. While the content writer can populate them by copy-pasting from the source project, we want to avoid this maintenance burden. - add support to dotnet try Markdown for specifying certain settings as file-wide defaults #187: file-wide settings.
Additionally, we should support static site generators and content management systems by doing the Markdown-to-HTML conversion at publish time rather than expecting it to be done at runtime.
The following command line examples are just sketches. In all cases, new files are emitted to <output dir> and source Markdown files are left unchanged.
-
dotnet try publish --format Markdown --interactive:false <output dir>:- Emits a Markdown file for each source Markdown file.
- Populates code fences using the latest backing source in a format suitable for use as read-only, non-interactive documentation, e.g. in GitHub's readme or wiki.
-
dotnet try publish --format Markdown --interactive:true <output dir>:- Emits a Markdown file for each source Markdown file.
- Emits a Try .NET WebAssembly package, which contains a Blazor app capturing the backing project's NuGet dependencies.
- Populates code fences using the latest backing source.
- Replaces
--projectannotations with--packageannotations referencing to the Try .NET WebAssembly package.
-
dotnet try publish --format HTML --interactive:false <output dir>- Emits an HTML file for each source Markdown file.
- Transforms Markdown, replacing code fences with Try .NET-attributed
<pre><code>blocks containing the latest backing source.
-
dotnet try publish --format HTML --interactive:true <output dir>- Emits an HTML file for each source Markdown file.
- Creates a Try .NET WebAssembly package.
- Transforms Markdown into HTML, replacing code fences with Try .NET-attributed
<pre><code>blocks containing the latest backing source. - Replaces
data-trydotnet-packageattribute values with refences to the Try .NET WebAssembly package.
LadyNaggaga, EifelMono, swythan, rceuls, rymeskar and 10 moreealsur