@uselab/vue-islands 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +27 -0
- package/package.json +9 -4
package/README.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# vue-islands
|
|
2
2
|
|
|
3
|
+
## A lightweight solution for adding SEO-friendly Vue interactivity to server-generated HTML.
|
|
4
|
+
|
|
5
|
+
`vue-islands` lets you use regular HTML as the foundation of your pages and progressively hydrate individual parts with Vue.
|
|
6
|
+
Rather than making your entire page a Vue application, you can add interactive Vue components exactly where you need them.
|
|
7
|
+
|
|
8
|
+
This makes it a great fit for applications where SEO is important, but a full SSR setup would be unnecessary or isn’t an option.
|
|
9
|
+
Keep your existing backend, server-side templates, or static HTML, and enhance specific parts of the page with interactive Vue components.
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<div data-component="my-widget">
|
|
13
|
+
<h2 data-props="title=text-content">Hello world</h2>
|
|
14
|
+
<p data-props="description=text-content">
|
|
15
|
+
This content is SEO-friendly.
|
|
16
|
+
</p>
|
|
17
|
+
</div>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Why Vue Islands?
|
|
21
|
+
|
|
22
|
+
- **SEO-friendly**: Because the page is server-rendered, search engines can index it without needing to execute JavaScript.
|
|
23
|
+
Only the interactive parts are hydrated with Vue.
|
|
24
|
+
- **Progressive hydration**: hydrate only the parts of the page that need to be interactive.
|
|
25
|
+
- **Use any Vue component**: use Vue Islands with your existing Vue components without requiring a specific component structure.
|
|
26
|
+
- **Works with your existing stack**: use your current backend, templating system, or static HTML.
|
|
27
|
+
- **100% W3C-valid HTML**: islands are defined using valid HTML that remains fully semantic.
|
|
28
|
+
- **Lazy-loadable**: components can be loaded only when they’re needed.
|
|
29
|
+
|
|
3
30
|
Progressively mount Vue components ("islands") into server-rendered semantic HTML, using
|
|
4
31
|
`data-component` attributes to declare which elements should become Vue components.
|
|
5
32
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uselab/vue-islands",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Progressively mount Vue components (\"islands\") into server-rendered semantic HTML using data attributes.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -9,10 +9,15 @@
|
|
|
9
9
|
},
|
|
10
10
|
"keywords": [
|
|
11
11
|
"vue",
|
|
12
|
-
"
|
|
13
|
-
"
|
|
12
|
+
"vue3",
|
|
13
|
+
"W3C",
|
|
14
|
+
"seo",
|
|
14
15
|
"progressive-enhancement",
|
|
15
|
-
"
|
|
16
|
+
"progressive-hydration",
|
|
17
|
+
"hydration",
|
|
18
|
+
"ssr",
|
|
19
|
+
"server-side-rendering",
|
|
20
|
+
"html"
|
|
16
21
|
],
|
|
17
22
|
"type": "module",
|
|
18
23
|
"main": "./dist/vue-islands.js",
|