Skip to content

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

slidev-addon-nix-runner

Nix runner for the Monaco Runner feature in Slidev. Code is evaluated in the browser using Tvix and WebAssembly through nix-eval.

Usage

Install the addon:

npm install slidev-addon-nix-runner

Add it to the frontmatter in slides.md:

---
addons:
  - slidev-addon-nix-runner

nix:
  # Force lazy lists and attribute sets before displaying them. Default: true
  strict: true
---

Use the monaco-run directive with a Nix code block:

```nix {monaco-run}
let
  greeting = "Hello, Slidev!";
in
{
  inherit greeting;
  answer = 6 * 7;
}
```

Evaluation output is printed below the editor. Nix warnings and errors are shown in yellow and red respectively.

About

Slidev addon that evaluates Nix code in Monaco code runners

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages