gatsby-plugin-klipse
Adds code REPLs in markdown using Klipse
Install
npm install --save gatsby-plugin-klipse
How to use
plugins: [
{
resolve: 'gatsby-plugin-klipse',
options: {
classPrefix: '',
klipseSettings: { ... },
klipseVersion: '7.5.0',
externalScripts: [],
}
}
]
Usage in Markdown
This will create a JavaScript REPL
```eval-js
1 + 1
```
This will create a Ruby REPL
```eval-ruby
[ 1, 2 ] * 3
```
The text that you pass after the backticks needs to match the part after selector_
keys in this object, these are default selectors used by the plugin:
{
selector: '.klipse',
selector_brainfuck: '.klipse-brainfuck',
selector_es2017: '.klipse-es2017',
selector_eval_cpp: '.klipse-cpp',
selector_eval_html: '.klipse-html',
selector_eval_js: '.klipse-eval-js',
selector_eval_lambdaway: '.klipse-lambdaway',
selector_eval_markdown: '.klipse-markdown',
selector_eval_ocaml: '.klipse-ocaml',
selector_eval_php: '.klipse-eval-php',
selector_eval_python_client: '.klipse-python',
selector_eval_reason: '.klipse-reason',
selector_eval_ruby: '.klipse-eval-ruby',
selector_eval_scheme: '.klipse-scheme',
selector_google_charts: '.klipse-google-charts',
selector_js: '.klipse-js',
selector_jsx: '.klipse-jsx',
selector_oblivion: '.klipse-oblivion',
selector_react: '.klipse-react',
selector_reagent: '.klipse-reagent',
selector_render_jsx: '.klipse-render-jsx',
selector_sql: '.klipse-sql',
selector_transpile_jsx: '.klipse-transpile-jsx',
selector_transpile_ocaml: '.klipse-transpile-ocaml',
selector_transpile_reason: '.klipse-transpile-reason',
selector_transpile_reason_to_ocaml: '.klipse-transpile-reason-to-ocaml',
}