diff --git a/README.md b/README.md
index 7714c2d..8883b97 100644
--- a/README.md
+++ b/README.md
@@ -57,6 +57,21 @@ This package doesn't handle the communication with the API. Check out [notion-ap
npm install vue-notion
```
+### NuxtJS Module
+```js
+// nuxt.config.js
+
+export default {
+ // ...
+ buildModules: [
+ 'vue-notion/nuxt'
+ ]
+ notion: {
+ // additionals configuration
+ }
+}
+```
+
## How To
### Docs
@@ -65,7 +80,7 @@ npm install vue-notion
More information on the `NotionRenderer` specification, syntax-highlighting, the Notion API, and integration with Nuxt can be found at [`docs/`](https://github.com/janniks/vue-notion/tree/main/docs).
-### Basic Example
+### Basic Example for Vue
This example is hosted at [vue-notion.now.sh/welcome](https://vue-notion.now.sh/welcome).
@@ -95,6 +110,33 @@ export default {
The example above uses a simple wrapper around the [notion-api-worker](https://github.com/splitbee/notion-api-worker).
It is also possible to store and use plain `.json` objects received from the Notion API.
+### Basic Example for Nuxt
+
+This example is hosted at [vue-notion.now.sh/welcome](https://vue-notion.now.sh/welcome).
+
+```vue
+
+
+
+
+
+
+
> ⚠️ Use with caution.
> The `getPageBlocks` and `getPageTable` are based on the private Notion API.
> We can not gurantee it will stay stable.
diff --git a/example/nuxt.config.js b/example/nuxt.config.js
index cae1377..edb7c51 100644
--- a/example/nuxt.config.js
+++ b/example/nuxt.config.js
@@ -1,4 +1,5 @@
export default {
+ // Telemetry (https://github.com/nuxt/telemetry)
telemetry: false,
// Target (https://go.nuxtjs.dev/config-target)
@@ -15,23 +16,11 @@ export default {
link: [{ rel: "icon", type: "image/x-icon", href: "/favicon.ico" }],
},
- // Global CSS (https://go.nuxtjs.dev/config-css)
- css: [],
-
- // Plugins to run before rendering page (https://go.nuxtjs.dev/config-plugins)
- plugins: [],
-
// Auto import components (https://go.nuxtjs.dev/config-components)
components: true,
// Modules for dev and build (recommended) (https://go.nuxtjs.dev/config-modules)
- buildModules: [],
-
- // Modules (https://go.nuxtjs.dev/config-modules)
- modules: [],
-
- // Build Configuration (https://go.nuxtjs.dev/config-build)
- build: {
- transpile: ["vue-notion"],
- },
+ buildModules: [
+ 'vue-notion/nuxt'
+ ]
};
diff --git a/example/package.json b/example/package.json
index 19cd568..8ef2ee7 100644
--- a/example/package.json
+++ b/example/package.json
@@ -11,8 +11,9 @@
"dependencies": {
"core-js": "^3.6.5",
"nuxt": "^2.14.12",
- "prismjs": "^1.22.0",
- "vue-notion": "^0.2.15"
+ "prismjs": "^1.22.0"
},
- "devDependencies": {}
+ "devDependencies": {
+ "vue-notion": "^0.2.15"
+ }
}
diff --git a/example/pages/_slug.vue b/example/pages/_slug.vue
index 3fa5386..4fdbaf2 100644
--- a/example/pages/_slug.vue
+++ b/example/pages/_slug.vue
@@ -8,24 +8,21 @@
diff --git a/example/pages/posts.vue b/example/pages/posts.vue
index e7c403a..5312253 100644
--- a/example/pages/posts.vue
+++ b/example/pages/posts.vue
@@ -35,11 +35,9 @@