You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe
Users often encounter the need to execute code blocks in Slides that are written in unsupported languages. It becomes a limitation when presenting code examples or demonstrations.
Describe the solution you'd like
Support custom shell scripts as hooks for executing code blocks in unsupported languages. This would allow users to define their own scripts to handle the execution of code in any language.
Describe alternatives you've considered
One alternative solution is to manually copy and paste code into a separate terminal or IDE to execute it. However, this disrupts the flow of the presentation and requires switching between different tools.
Additional context
As an example, consider the following shell script that could be used as a custom hook for executing code blocks written in the PlantUML language:
#!/usr/bin/env bash# Read the code block content from the first argument
code_block="$1"# Read the code block name from the second argument
code_block_name="$2"# Execute logic based on the code block namecase"$code_block_name"in"plantuml")
# Generate PlantUML diagram image from the code block content
graph="$(mktemp).png"echo"$code_block"| plantuml -tpng -p >$graph# Open the png file using the sxiv image viewer
sxiv $graph
;;
*)
echo"Unsupported language: $code_block_name"
;;
esac
The text was updated successfully, but these errors were encountered:
To implement this feature, users would include the invoker attribute in the front-matter of the Markdown file, specifying the path to their custom executor script. Here's an example:
---
invoker: /path/to/script
---
# Understanding Deployments
Relationship between a Deployment and a ReplicaSet
```plantuml
@startuml
:Deployment;
-> Create 2 Replicas;
:Replicaset;
-> Maintain;
:2 Pods;
@enduml
```
Is your feature request related to a problem? Please describe
Users often encounter the need to execute code blocks in Slides that are written in unsupported languages. It becomes a limitation when presenting code examples or demonstrations.
Describe the solution you'd like
Support custom shell scripts as hooks for executing code blocks in unsupported languages. This would allow users to define their own scripts to handle the execution of code in any language.
Describe alternatives you've considered
One alternative solution is to manually copy and paste code into a separate terminal or IDE to execute it. However, this disrupts the flow of the presentation and requires switching between different tools.
Additional context
As an example, consider the following shell script that could be used as a custom hook for executing code blocks written in the PlantUML language:
The text was updated successfully, but these errors were encountered: