All Projects → janniks → Vue Notion

janniks / Vue Notion

Licence: other
A fast Vue renderer for Notion pages

Projects that are alternatives of or similar to Vue Notion

k-domains
A simple module to manage multiple subdomains with just one project
Stars: ✭ 41 (-88.05%)
Mutual labels:  nuxt, nuxtjs
admin-null-nuxt
Admin Null — Free Nuxt Bulma Admin Dashboard (with dark mode)
Stars: ✭ 39 (-88.63%)
Mutual labels:  nuxt, nuxtjs
nuxt-blog
📝 Personal blog built with Nuxt.js and wordpress rest api
Stars: ✭ 13 (-96.21%)
Mutual labels:  nuxt, nuxtjs
nuxt-feature-toggle
The nuxt feature toggle module
Stars: ✭ 78 (-77.26%)
Mutual labels:  nuxt, nuxtjs
Nuxt7
📱 Full Featured iOS & Android PWA Apps with Nuxt.js and Framework7
Stars: ✭ 282 (-17.78%)
Mutual labels:  nuxt, nuxtjs
nuxt-mobile-detect
Nuxt mobile and device detection plugin for client side and SSR
Stars: ✭ 24 (-93%)
Mutual labels:  nuxt, nuxtjs
test-utils
Test utilities for Nuxt.js
Stars: ✭ 100 (-70.85%)
Mutual labels:  nuxt, nuxtjs
task-manager
Open-source task manager based on Kanban. Made with vue.js, koa2, mongodb\mongoose.
Stars: ✭ 23 (-93.29%)
Mutual labels:  nuxt, nuxtjs
Nuxt Ssr Firebase
Nuxt.js Universal App with SSR via Firebase Functions and Firebase Hosting
Stars: ✭ 273 (-20.41%)
Mutual labels:  nuxt, nuxtjs
Nuxt Webfontloader
Efficient web font loading has never been easier!
Stars: ✭ 264 (-23.03%)
Mutual labels:  nuxt, nuxtjs
nuxt-babel
Use normal .babelrc file with your Nuxt app
Stars: ✭ 32 (-90.67%)
Mutual labels:  nuxt, nuxtjs
Blog Front
blog-front @nuxt
Stars: ✭ 305 (-11.08%)
Mutual labels:  nuxt, nuxtjs
jooger.me
👍 My personal website,powered by @nuxt
Stars: ✭ 39 (-88.63%)
Mutual labels:  nuxt, nuxtjs
global-components
Module to register global components for Nuxt.js
Stars: ✭ 57 (-83.38%)
Mutual labels:  nuxt, nuxtjs
isnuxt3ready
A community-built compatibility guide for Nuxt 3 modules
Stars: ✭ 106 (-69.1%)
Mutual labels:  nuxt, nuxtjs
nuxt wp
Repo for my blog series on a building a site with WordPress REST API, Vue, and Nuxt.js
Stars: ✭ 41 (-88.05%)
Mutual labels:  nuxt, nuxtjs
awrora-starter
Landing page template built with one of most popular javascript library Vue.JS, Vuetify (Material Design) and Nuxt.JS with SSR.
Stars: ✭ 38 (-88.92%)
Mutual labels:  nuxt, nuxtjs
separate-env-module
Tear your variables apart!
Stars: ✭ 53 (-84.55%)
Mutual labels:  nuxt, nuxtjs
nuxt-star-admin-extra
Admin Template base on Vue StarAdmin with improved on design and served using Nuxt.js
Stars: ✭ 19 (-94.46%)
Mutual labels:  nuxt, nuxtjs
Graphcms Examples
Example projects to help you get started with GraphCMS
Stars: ✭ 295 (-13.99%)
Mutual labels:  nuxt, nuxtjs
vue-notion

An unofficial Notion renderer

Features · Install · Docs · Examples · Credits

Package version Compressed size MIT license Follow on Twitter


A Vue renderer for Notion pages. Use Notion as CMS for your blog, documentation or personal site.

vue-notion was ported to Vue from react-notion (developed by Splitbee 🐝 – a fast, reliable, free, and modern analytics for any team)

This package doesn't handle the communication with the API. Check out notion-api-worker from Splitbee for an easy solution.

Created by Jannik Siebert

Features

🎯 Accurate – Results are almost identical

🎨 Custom Styles – Styles are easily adaptable. Optional styles included

🔮 Syntax-Highlighting – Beautiful themeable code highlighting using Prism.js

🌎 SSR / Static Generation Support – Functions to work with NuxtJS and other frameworks

Install

Vue

npm install vue-notion

NuxtJS Module

Install as a dev-dependency and add "vue-notion/nuxt" to the buildModules array in nuxt.config.js.

npm install vue-notion --save-dev
// nuxt.config.js
export default {
  // ...
  buildModules: ["vue-notion/nuxt"],
};

Docs

  • NotionRenderer: docs/
  • Syntax-Highlighting in Code Blocks (with Prism.js): docs/
  • Notion API: docs/
  • Nuxt: docs/

Check out a full working demo at vue-notion.now.sh ✨ The code for the demo is in example/.

Examples

These examples use a simple wrapper around the notion-api-worker to access the Notion page data. It is also possible to store a page received from the Notion API in .json and use it without the async/await part.

Use the getPageBlocks and getPageTable methods with caution! They are based on the private Notion API. We can NOT guarantee that it will stay stable. The private API is warpped by notion-api-worker. If you use these methods a lot, please consider hosting you own instance, as described in docs#notion-api.

Basic Example for Vue

This example is a part of example/ and is hosted at vue-notion.now.sh/vue.

<template>
  <NotionRenderer :blockMap="blockMap" fullPage />
</template>

<script>
import { NotionRenderer, getPageBlocks } from "vue-notion";

export default {
  components: { NotionRenderer },
  data: () => ({ blockMap: null }),
  async created() {
    // get Notion blocks from the API via a Notion pageId
    this.blockMap = await getPageBlocks("8c1ab01960b049f6a282dda64a94afc7");
  },
};
</script>

<style>
@import "vue-notion/src/styles.css"; /* optional Notion-like styles */
</style>

Basic Example for NuxtJS

This example is a part of example/ and is hosted at vue-notion.now.sh/nuxt.

<template>
  <NotionRenderer :blockMap="blockMap" fullPage />
</template>

<script>
export default {
  data: () => ({ blockMap: null }),
  async asyncData({ $notion }) {
    // use Notion module to get Notion blocks from the API via a Notion pageId
    const blockMap = await $notion.getPageBlocks(
      "8c1ab01960b049f6a282dda64a94afc7"
    );
    return { blockMap };
  },
};
</script>

<style>
@import "vue-notion/src/styles.css"; /* optional Notion-like styles */
</style>

Issues & Roadmap

Add issues and request features that you want to see implemented next!

Sites using vue-notion

List of pages that are using this library.

Supported Blocks

Most common block types are supported. We happily accept pull requests to add support for the missing blocks.

Block Type Supported Notes
Text ✅ Yes
Heading ✅ Yes
Image ✅ Yes
Image Caption ✅ Yes
Bulleted List ✅ Yes
Numbered List ✅ Yes
Quote ✅ Yes
Callout ✅ Yes
Column ✅ Yes
iframe ✅ Yes
Video ✅ Yes Only embedded videos
Divider ✅ Yes
Link ✅ Yes
Code ✅ Yes
Web Bookmark ✅ Yes
Toggle List ✅ Yes
Page Links ✅ Yes
Cover ✅ Yes Enable with fullPage
Equations ✅ Planned
Databases ❌ Not planned
Checkbox ❌ Not planned
Table Of Contents ❌ Not planned

Please, feel free to open an issue if you notice any important blocks missing or anything wrong with existing blocks.

Credits

License ⚖️

MIT © Jannik Siebert

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].