Open ax0l0tl opened 4 years ago
Very nice!
This sounds like it relates to the publish feature we outlined last year (#214) but haven't gotten to.
If you're interested in making a PR, it would be appreciated and we'll be happy to help.
Hi @jonsequitur, thanks for linking #214, I missed that one. I would make a pull request perhaps with a reduced feature set of publish leaving out the --interactive switch. How can I do that? As far as I can see I need to be able to push to a feature branch or similar.
@ax0l0tl I guess you might be new to working with GitHub. You'll need to fork this repo, push to a branch on a fork, and then make a PR here. Here is a guide on forking: https://guides.github.com/activities/forking/
Problem I want to use .net interactive documentation to write my documentation but markdown doc files should still display my code samples when viewed in an environment without try .net hosting (git hub README or simple markdown viewer). Right now I have to copy the sample regions manually from the C# projects to markdcown code blocks to make sure the samples are visible without try .net, which is error-prone and inconvenient.
Suggestion I would like to use the global dotnet try tool to keep my markdown in sync with the sample code. It would be great to have a sync command that just copies the referenced regions into the markdown code blocks. Usage would be similar to the existing verify command:
dotnet try sync
Even if the docs are never used as interactive docs one gets the great advantage of writing sample code with compiler support. So no more broken code samples in the documentation.
Basic implementation I created a basic implementation with the current try dotnet version. It is working for me and perhaps it is useful to start with (unfortunately pull requests are not possible at the moment):