You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/index.qmd
+12-13Lines changed: 12 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,6 @@
1
1
---
2
2
title: Sverto
3
+
description: "**Sverto** is an extension for [Quarto](https://quarto.org) that lets you seamlessly write and include [Svelte](https://svelte.dev) components, like charts and other visuals, in your Quarto website."
**Sverto** is an extension for [Quarto](https://quarto.org) that lets you seamlessly write and include [Svelte](https://svelte.dev) components, like charts and other visuals, in your Quarto website.
16
-
17
-
Your Svelte components can seamlessly react to your ObservableJS code, making it quick and easy to build visuals that animate in response to [user inputs](https://observablehq.com/@observablehq/inputs?collection=@observablehq/inputs) or other changing data in your document.
12
+
Your Svelte components can seamlessly react to your ObservableJS code, making it quick and easy to build bespoke visuals that animate in response to [user inputs](https://observablehq.com/@observablehq/inputs?collection=@observablehq/inputs) or other changing data in your document.
18
13
19
14
<!-- examples here! -->
20
15
@@ -29,19 +24,21 @@ You'll need to install two things to run Sverto:
29
24
30
25
Install the project extension using:
31
26
32
-
```
27
+
```sh
33
28
quarto use template 360-info/sverto@firstrelease-docs
34
29
```
35
30
36
31
Then run:
37
32
38
-
```
33
+
```sh
39
34
npm install
40
35
```
41
36
42
37
This will add the extension itself (which includes some project scripts) to the `_extension` folder, as well as a few other files.
43
38
44
-
> **Note:** Sverto depends on running [project pre-render scripts](https://quarto.org/docs/projects/scripts.html#pre-and-post-render), so you can't currently use it with single documents.
39
+
:::{.callout-note}
40
+
Sverto depends on running [project pre-render scripts](https://quarto.org/docs/projects/scripts.html#pre-and-post-render), so you can't currently use it with single documents.
41
+
:::
45
42
46
43
## 🎉 Use
47
44
@@ -67,18 +64,20 @@ Here's the short way to add Svelte component you've written to a Quarto doc:
67
64
68
65
If you want to refer to other JavaScript libraries in your Svelte component (like d3, for example), add them to the project using `npm install package1 [package2 ...]`. For example:
69
66
70
-
```
67
+
```sh
71
68
npm install d3-scale
72
69
```
73
70
74
71
## Use pre-compiled Svelte components
75
72
76
73
If you'd prefer to compile your own Svelte components instead of letting this extension do it, you can skip steps 1 and 2 and simply refer to the compiled bundle with, for example, `Component = import("Component.js")` in an OJS block.
77
74
78
-
> **Note:** you must compile the Svelte component to an ES6 bundle, and you must enable accessors when compiling if you want to be able to update them from OJS. Refer to `_extensions/sverto/rollup.config.js` for guidance on configuring Rollup to do this.
75
+
:::{.callout-note}
76
+
You must compile the Svelte component to an ES6 bundle, and you must enable accessors when compiling if you want to be able to update them from OJS. Refer to [`_extensions/sverto/rollup.config.js`](https://github.com/360-info/sverto/blob/firstrelease/_extensions/sverto/rollup.config.js) for guidance on configuring Rollup to do this.
77
+
```
79
78
80
79
## ❓ Issues
81
80
82
81
If you have any problems with the extension, please feel free to [create an issue](https://github.com/360-info/sverto)!
83
82
84
-
Special thanks to Carlos Scheidegger from [Posit](https://posit.co) for his time and guidance in designing Sverto!
83
+
Special thanks to [Carlos Scheidegger](https://github.com/cscheid) from [Posit](https://posit.co) for his time and advice!
0 commit comments