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
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).
83
+
> Check out a full working demo at [vue-notion.now.sh](https://vue-notion.now.sh/) ✨
84
+
> The code for the demo is in [`example/`](https://github.com/janniks/vue-notion/tree/main/example).
67
85
68
-
### Basic Example
86
+
##Examples
69
87
70
-
This example is hosted at [vue-notion.now.sh/welcome](https://vue-notion.now.sh/welcome).
88
+
These examples use a simple wrapper around the [`notion-api-worker`](https://github.com/splitbee/notion-api-worker).
89
+
It is also possible to store a page received from the Notion API in `.json` and use it without the `async/await` part.
90
+
91
+
### Basic Example for Vue
92
+
93
+
This example is a part of [`example/`](https://github.com/janniks/vue-notion/tree/main/example) and is hosted at [vue-notion.now.sh/vue](https://vue-notion.now.sh/vue).
71
94
72
95
```vue
73
96
<template>
@@ -92,17 +115,39 @@ export default {
92
115
</style>
93
116
```
94
117
95
-
The example above uses a simple wrapper around the [notion-api-worker](https://github.com/splitbee/notion-api-worker).
96
-
It is also possible to store and use plain `.json` objects received from the Notion API.
118
+
### Basic Example for NuxtJS
119
+
120
+
This example is a part of [`example/`](https://github.com/janniks/vue-notion/tree/main/example) and is hosted at [vue-notion.now.sh/nuxt](https://vue-notion.now.sh/nuxt).
121
+
122
+
```vue
123
+
<template>
124
+
<NotionRenderer :blockMap="blockMap" fullPage />
125
+
</template>
97
126
98
-
> ⚠️ Use with caution.
127
+
<script>
128
+
export default {
129
+
data: () => ({ blockMap: null }),
130
+
async asyncData({ $notion }) {
131
+
// use Notion module to get Notion blocks from the API via a Notion pageId
> The `getPageBlocks` and `getPageTable` are based on the private Notion API.
100
-
> We can not gurantee it will stay stable.
147
+
> We can NOT guarantee that it will stay stable.
101
148
> The private API is warpped by [notion-api-worker](https://github.com/splitbee/notion-api-worker).
102
149
> If you use these methods a lot, please consider hosting you own instance, as described in [`docs#notion-api`](https://github.com/janniks/vue-notion/tree/main/docs#notion-api).
103
150
104
-
A [full working example using Nuxt and static generation](https://vue-notion.now.sh/) can be found inside the `example` directory.
105
-
106
151
## Roadmap
107
152
108
153
[Add issues](https://github.com/janniks/vue-notion/issues/new), request features and upvote [block types](https://github.com/janniks/vue-notion/issues?q=is%3Aissue+is%3Aopen+label%3Ablock) that you want to see next!
@@ -118,42 +163,45 @@ List of pages that are using this library.
118
163
119
164
Most common block types are supported. We happily accept pull requests to add support for the missing blocks.
Please, feel free to [open an issue](https://github.com/janniks/vue-notion/issues/new) if you notice any missing blocks or anything wrong with existing blocks.
Please, feel free to [open an issue](https://github.com/janniks/vue-notion/issues/new) if you notice any important blocks missing or anything wrong with existing blocks.
0 commit comments