github maaslalani/slides v0.4.0

latest releases: v0.9.0, v0.8.0, v0.7.3...
3 years ago

Changelog

Pre-processing

slides now has the ability to have commands run and executed before presenting slides (pre-processing).
To use this feature, you must:

  • Use a file for your slides (no stdin, for security reasons)
  • chmod +x file.md, change file permissions to be able to execute code on slides (for security reasons)

In your slides.md, you can write a code block with this structure (use tildes ~). When you go to present slides (that are executable, chmod +x slides.md), slides will parse the code block and run the command to run and pass in the text inside the code block as stdin to the command. The entire code block will then be replace by the stdout of the command you want to run.

~~~command to run
stdin
~~~

This allows you to:

  • Import text from other files with
~~~xargs cat
examples/import.md
~~~
  • Render GraphViz graphs with graph-easy
~~~graph-easy --as=boxart
[ A ] -> [ B ]
~~~
  • A lot more...

(If you come up with useful pre-processing commands/examples, please contribute to https://github.com/maaslalani/slides/blob/main/examples/preprocess.md)

Other changes

  • slides added to nixpkgs-unstable @ v0.3.0
  • Added support for javascript code execution (using node)
  • Added support for elixir code execution (thanks to @suzaku)
  • ✋ Breaking: Removed ~~~ as a slide delimiter (for pre-processing), use --- always instead.
  • Code block execution results are no longer rendered as Markdown. (thanks to @suzaku)
  • Fix bug to be able to parse code blocks without trailing new lines. (thanks to @suzaku)

Don't miss a new slides release

NewReleases is sending notifications on new releases.