Open jeromesimeon opened 5 years ago
The Ergo REPL can now support generateText
so it could form the basis for a kind of Try It!
button in the documentation which would cover both Ergo logic and the new template syntax.
This could require a bit of design thinking (what would it look like? should it use Monaco for editing, reuse Cicero-UI components). Maybe the "Try It!" button could be added to Ergo code snippets:
Or to templates grammar examples:
Another example is the handlebars documentation with the Open in Interactive Playground!
button
https://handlebars-draft.knappi.org/guide/expressions.html#basic-usage
This could be particularly nice with a notion of plugin. Vuepress supports that (that's what Handlebars uses), but it seems to also be coming to Docusaurus v2:
https://v2.docusaurus.io/docs/advanced-plugins
See also issue #160
Another example is the handlebars documentation with the
Open in Interactive Playground!
buttonhttps://handlebars-draft.knappi.org/guide/expressions.html#basic-usage
That button keeps changing. It's now called "Template" or "Input" etc. with a "Click to try out" hover.
The Ergo online REPL is currently available at: https://ergorepl.netlify.com
It might be more useful as a kind of "Fiddle" https://jsfiddle.net and linked to the technical documentation here: https://docs.accordproject.org
Since we are using Docusaurus, a possibly nice way to do it could be similar to the ReasonML web site: https://reasonml.github.io and its "try" button!