Open jonsequitur opened 5 years ago
This looks really good. A couple questions: What will be a general usage pattern for the publish step.
If we go for the first case then the things might go "off-sync". And in the second case,if there are any changes that need to be published, will the build system automatically create a PR for it or directly publish the changes somehow.
Not sure if we need to think this to that extent but I was just curious 🔢
Also, we should start using "dotnet try verify" in our CI/CD pipeline for the samples or the docs folder so that we are able to have an example for others who might want to do the same.
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.
Would love this. When publishing tutorials to GitHub it would be great if they were readable straight away without installing the tool and running it. Having it done automatically also makes this a great way to validate static code in tutorials or workshops - compile behind the scenes then auto-populate with working code as part of a CI/CD step in a PR.
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
:dotnet try
but 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.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>
:dotnet try publish --format Markdown --interactive:true <output dir>
:--project
annotations with--package
annotations referencing to the Try .NET WebAssembly package.dotnet try publish --format HTML --interactive:false <output dir>
<pre><code>
blocks containing the latest backing source.dotnet try publish --format HTML --interactive:true <output dir>
<pre><code>
blocks containing the latest backing source.data-trydotnet-package
attribute values with refences to the Try .NET WebAssembly package.