Vue-notion is a Vue.js component library designed to render content from Notion pages within a Vue 3 application. It parses Notion's block structure, typically obtained via the Notion API, and translates it into interactive Vue components, enabling developers to display rich text, images, lists, code blocks, and other Notion content types directly in their web apps. The current stable version is 3.0.0, released recently to target lower ES features for broader browser and environment compatibility. While there isn't a strict, regular release cadence, the project receives updates to introduce new features and fix bugs, as evidenced by patches for issues like the `??` operator bug in earlier versions and fixes for empty table rows. Key differentiators include its tight integration with Vue 3's reactivity system, support for custom component overrides via `blockOverrides` to highly customize the rendering of specific Notion block types, and an `imageOptions` API for advanced image handling. It also seamlessly integrates with `@janniks/vue3-katex` for mathematical equation rendering, offering a comprehensive solution for Notion content display.
npm install vue-notionVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to import and use the `NotionRenderer` component with mock Notion block data. It includes necessary CSS for KaTeX and sets up a basic Vue 3 application to display rendered content, highlighting various block types including code and equations.
Review the official `vue-notion` documentation and GitHub changelog for detailed migration guides specific to 3.0.0. Test your application extensively after upgrading.
Install `@janniks/vue3-katex` via npm or yarn (`npm install @janniks/vue3-katex`) and ensure `import '@janniks/vue3-katex/dist/katex.min.css';` is included in your main application entry file or a global stylesheet.
Upgrade to `vue-notion@^1.5.0` or `vue-notion@^3.0.0` to resolve issues related to the nullish coalescing operator.
Ensure your `vue-notion` version is `^1.4.2` or later to utilize the `blockOverrides` functionality for custom block rendering.
Ensure you have `import { NotionRenderer } from 'vue-notion';` in your script, and it's either globally registered or registered in the `components` option of the parent component, e.g., `{ components: { NotionRenderer } }`.Install `@janniks/vue3-katex` (`npm install @janniks/vue3-katex`) and add `import '@janniks/vue3-katex/dist/katex.min.css';` to your main application entry point (e.g., `main.js` or `App.vue`'s `<script setup>` or `<style>`).