InnovationEngine icon indicating copy to clipboard operation
InnovationEngine copied to clipboard

savable code blocks

Open naman-msft opened this issue 5 months ago • 0 comments

which would enable data based codeblocks to be savable as files within docs, and the syntax for doing something like this would look like this in an exec-doc:

Plain Text

someKey:
  nestedKey: value
  deployment: true
...other keys/values...

In the same line where the codeblock type is specified yaml, you would give the codeblock an attribute save-as= and this would then allow yaml, json, and all other types of data code blocks to be both correctly rendered for reading experiences of the doc and for the innovation engine to create a file with the contents of the block before executing the doc.

It wouldn't solve the issue where files external to the document are referenced but not present during execution, but it would allow for documents to use codeblocks as a mechanism to create files and that can then be referenced by commands in the document.

Would savable codeblocks be a useful solution for the current document?

naman-msft avatar Sep 03 '24 21:09 naman-msft