Skip to content

Commit d6914eb

Browse files
committed
fixes
1 parent cedafc2 commit d6914eb

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

.github/workflows/ci.yml

+3
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,8 @@ jobs:
6060
# java-version: "21"
6161
# - uses: ts-graphviz/setup-graphviz@v2
6262

63+
# for d2
64+
- run: curl -fsSL https://d2lang.com/install.sh | sh -s --
65+
6366
- name: Test
6467
run: pnpm test

packages/rehype-d2/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ which can look like this:
2222

2323
## Usage
2424

25-
You need to install Java and Graphviz in order to use this plugin.
25+
You need to install [D2](https://d2lang.com/tour/install) in order to use this plugin. **But** they are working on [WASM version](https://github.com/terrastruct/d2/discussions/234#discussioncomment-11286029), so hopefully this will change soon.
2626

2727
```js
2828
import rehypeD2 from "@beoe/rehype-d2";
@@ -40,4 +40,4 @@ It support caching the same way as [@beoe/rehype-code-hook](/packages/rehype-cod
4040
## TODO
4141

4242
- [ ] documentation
43-
- [ ] note about `d2` executable
43+
- [ ] publish

packages/rehype-d2/src/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ export type RehypeD2Config = {
3232
* be carefull. It may break some diagrams
3333
*/
3434
svgo?: SvgoConfig | boolean;
35-
strategy?: "inline" | "img";
35+
strategy?: "inline" | "img" | "img-class-dark-mode";
3636
d2Options?: D2Options;
3737
};
3838

3939
type RenderOptions = D2Options & {
4040
svgo?: SvgoConfig | boolean;
41-
strategy?: "inline" | "img";
41+
strategy?: "inline" | "img" | "img-class-dark-mode";
4242
};
4343

4444
function image({

0 commit comments

Comments
 (0)