Open plaindocs opened 4 years ago
Interesting; this sounds useful. Can you describe how you would use it?
I often work with doc sets with multiple code blocks in a single page. There are a few use cases that spring to mind (and I may be slightly rusty with the capabilities of codedown), mostly from a "non-literate" point of view:
What would the interaction with Codedown look like? Are you thinking of using this as a library, or from the command line? If the CLI, would this simply be multiple invocations of codedown
with different arguments?
I'm wondering if we can build on the new --section
feature here.
I think I'd mostly be using this in CI. If you could add a config section with a commandline to pipe each each code block type to that would do most of the lifting for the first point. A do this for all .py
samples and that for all YAML samples?
Possibly with a way to override in the docs with a comment for a specific blog (but that might run into security issues)
Yeah, I see how referencing specific outputs is tricky, unless you can only show the output from the previous blog, but that would also be a good starting point.
I'll go :eyes: the --section
feature
You should be achieve this today by invoking Codedown multiple times with different language and section arguments.
If Codedown were to somehow expose the complete parse tree of the document, this could enable some more advanced/programmatic features. This reminds me of jq
.
Is there a way to easily pass each codeblock to the external parser / linter instead of passing all codeblocks from a file in one go?