Coder Social home page Coder Social logo

notion-x's Introduction

notion-x

My customization of NotionX's react-notion-x. Personal use only!

See it in action?

Install

You have to install Tailwind CSS in your project.

๐Ÿšจ You have to install globally Nodejs >=18 (recommend using nvm) and Yarn first.

Install this repo as a submodule in your project under the root folder.

npm i --g yarn
npm i -g rimraf
# first install only
git submodule add https://github.com/dinhanhthi/notion-x.git

# in case your repo has already added this repo as a submodule
# and this is the first time you clone your repo to local
git submodule update --init --recursive

# to update submodule
git submodule update --recursive --remote

You have to install the packages lised in package.json for both "dependencies" and "devDependencies".

You have to have following environment variables (put them in .env.local),

NOTION_TOKEN = "secret_xxx"
NOTION_VERSION = "2022-06-28"
# For Unofficial Posts DB
NOTION_API_WEB = "https://www.notion.so/api/v3"
SPACE_ID = "xxx"
SOURCE_ID = "xxx"
COLLECTION_VIEW_ID = "xxx"
# "dev" or "prod"
ENV_MODE = "dev"

Put in your tsconfig.json,

"compilerOptions": {
  "paths": {
    "@/*": ["./*"],
    "@notion-x/*": ["./notion-x/*"]
  }
}

Put below line in tailwind.config.ts,

{
  content: ['./notion-x/**/*.{js,ts,jsx,tsx,mdx,css,scss}']
}

๐Ÿ’ก Tip: You can edit the files in the submodule BUT don't commit and push it. After finishing editing, just cd notion-x and then git checkout <file-path> to discard all changes.

Update something new (for me only)

Read the steps in the repo dinhanhthi.com.

notion-x's People

Contributors

dinhanhthi avatar thi-ideta avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

phanhavn

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.