Skip to content

Commit

Permalink
new idea
Browse files Browse the repository at this point in the history
  • Loading branch information
stereobooster committed Jan 1, 2025
1 parent 3c3a7c5 commit 9f05b53
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions packages/docs/src/content/docs/start-here/strategy.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,32 @@ add `fsPath` (`public/beoe`) to `.gitignore`

**Note**: if you deploy to Netlify, do not use path that starts with `.`.

### `iframe`

`iframe` is the new idea. **Not implemented**

```html
<figure class="beoe">
<iframe src="/path/to.svg" width="..." height="..." title="..."></iframe>
</figure>
```

**Note**: this strategy requires to additional options:

```js
use(rehypeDiagram, {
strategy: "iframe",
// where to store files on the disk
fsPath: "public/beoe",
// path to files in a browser
webPath: "/beoe",
});
```

add `fsPath` (`public/beoe`) to `.gitignore`

**Note**: if you deploy to Netlify, do not use path that starts with `.`.

## Pros and cons

| | `inline` | `data-url` | `file` | `iframe` (1) |
Expand Down

0 comments on commit 9f05b53

Please sign in to comment.