Skip to content

support for publishing standalone Markdown, static HTML, WebAssembly hosts #214

@jonsequitur

Description

@jonsequitur

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:

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 --project annotations with --package annotations 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-package attribute values with refences to the Try .NET WebAssembly package.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions