Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
stereobooster committed Nov 20, 2024
1 parent cedafc2 commit d6914eb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,8 @@ jobs:
# java-version: "21"
# - uses: ts-graphviz/setup-graphviz@v2

# for d2
- run: curl -fsSL https://d2lang.com/install.sh | sh -s --

- name: Test
run: pnpm test
4 changes: 2 additions & 2 deletions packages/rehype-d2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ which can look like this:

## Usage

You need to install Java and Graphviz in order to use this plugin.
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.

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

- [ ] documentation
- [ ] note about `d2` executable
- [ ] publish
4 changes: 2 additions & 2 deletions packages/rehype-d2/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ export type RehypeD2Config = {
* be carefull. It may break some diagrams
*/
svgo?: SvgoConfig | boolean;
strategy?: "inline" | "img";
strategy?: "inline" | "img" | "img-class-dark-mode";
d2Options?: D2Options;
};

type RenderOptions = D2Options & {
svgo?: SvgoConfig | boolean;
strategy?: "inline" | "img";
strategy?: "inline" | "img" | "img-class-dark-mode";
};

function image({
Expand Down

0 comments on commit d6914eb

Please sign in to comment.