diff --git a/README.md b/README.md
index e8c530f..c55ed5b 100644
--- a/README.md
+++ b/README.md
@@ -70,8 +70,8 @@ import { Image } from "vue-datocms";
export default {
components: {
- "datocms-image": Image
- }
+ "datocms-image": Image,
+ },
};
```
@@ -136,16 +136,16 @@ const query = gql`
export default {
components: {
- "datocms-image": Image
+ "datocms-image": Image,
},
data() {
return {
- data: null
+ data: null,
};
},
async mounted() {
this.data = await request({ query });
- }
+ },
};
```
@@ -243,7 +243,7 @@ const query = gql`
export default {
data() {
return {
- data: null
+ data: null,
};
},
async mounted() {
@@ -254,7 +254,272 @@ export default {
return;
}
return toHead(this.data.page.seo, this.data.site.favicon);
+ },
+};
+
+```
+
+# Structured text
+
+`` is a Vue component that you can use to render the value contained inside a DatoCMS [Structured Text field type](#).
+
+### Setup
+
+You can register the component globally so it's available in all your apps:
+
+```js
+import Vue from "vue";
+import { DatocmsStructuredTextPlugin } from "vue-datocms";
+
+Vue.use(DatocmsStructuredTextPlugin);
+```
+
+Or use it locally in any of your components:
+
+```js
+import { StructuredText } from "vue-datocms";
+
+export default {
+ components: {
+ "datocms-structured-text": StructuredText,
+ },
+};
+```
+
+## Basic usage
+
+```vue
+
+
+
+
{{ data.blogPost.title }}
+
+ {/* ->
+
Hello world!
+ */}
+
+
+
+
+
+```
+
+## Custom renderers
+
+You can also pass custom renderers for special nodes (inline records, record links and blocks) as an optional parameter like so:
+
+```vue
+
+
+