๐Ÿš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more โ†’
Socket
DemoInstallSign in
Socket

vue-notion

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-notion

An unofficial Notion renderer

0.2.2
Source
npm
Version published
Weekly downloads
763
-54.28%
Maintainers
1
Weekly downloads
ย 
Created
Source
vue-notion

An unofficial Notion renderer

Features ยท Install ยท Example ยท Docs ยท 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

๐ŸŒŽ SSR / Static Generation Support โ€“ Functions to work with Nuxt and other frameworks

Install

npm install vue-notion

How To

Demo

Check out the demo โœจ

Docs

The full NotionRenderer specification, Notion API information and Nuxt docs are available at docs/.

Basic Example

We can store the API response in a .json file and import it. This example is hosted at vue-notion.now.sh/basic-example.

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

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

export default {
  components: { NotionRenderer },
  data: () => ({ blockMap: null }),
  async created() {
    this.blockMap = await getPageBlocks("8c1ab01960b049f6a282dda64a94afc7");
  },
};
</script>

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

A full working example using Nuxt and static generation can be found inside the example directory.

Roadmap

Add issues, request features and upvote block types that you want to see next!

Sites using vue-notion

List of pages that are using this library.

  • StorePreviewer
  • ...if you're using vue-notion, we'd be happy to feature you here

Supported Blocks

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

Block TypeSupportedNotes
Textโœ… Yes
Headingโœ… Yes
Imageโœ… Yes
Image Captionโœ… Yes
Bulleted Listโœ… Yes
Numbered Listโœ… Yes
Quoteโœ… Yes
Calloutโœ… Yes
Columnโœ… Yes
iframeโœ… Yes
Videoโœ… YesOnly embedded videos
Dividerโœ… Yes
Linkโœ… Yes
Codeโœ… PartiallyHighlighting coming soon
Web Bookmarkโœ… Soon
Toggle Listโœ… Yes
Page Linksโœ… Yes
Headerโœ… YesEnable with fullPage
DatabasesโŒ Not planned
CheckboxโŒ Not planned
Table Of ContentsโŒ Not planned

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

Credits

FAQs

Package last updated on 17 Dec 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts