File size: 2,067 Bytes
e903a32 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# Notion to MDX Toolkit - Environment Variables
# Copy this file to .env and fill in your actual values
# ===========================================
# NOTION API CONFIGURATION
# ===========================================
# Your Notion Integration Token
# Get this from: https://www.notion.so/my-integrations
# Format: secret_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
NOTION_TOKEN=secret_your_notion_integration_token_here
# ===========================================
# OPTIONAL CONFIGURATION
# ===========================================
# Custom output directory (optional)
# Default: ./output
# OUTPUT_DIR=./my-custom-output
# Custom input configuration file (optional)
# Default: ./input/pages.json
# INPUT_CONFIG=./my-pages.json
# ===========================================
# USAGE EXAMPLES
# ===========================================
# 1. Basic usage:
# NOTION_TOKEN=secret_xxx node index.mjs
# 2. With custom paths:
# NOTION_TOKEN=secret_xxx OUTPUT_DIR=./converted node index.mjs
# 3. Test access to a page:
# NOTION_TOKEN=secret_xxx node test-access.mjs
# ===========================================
# SETUP INSTRUCTIONS
# ===========================================
# 1. Create a Notion integration:
# - Go to https://www.notion.so/my-integrations
# - Click "New integration"
# - Give it a name (e.g., "MDX Converter")
# - Select your workspace
# - Click "Submit"
# - Copy the "Internal Integration Token"
# 2. Share your Notion pages with the integration:
# - Open your Notion page
# - Click "Share" (top right)
# - Click "Invite"
# - Search for your integration name
# - Select it and give "Can read content" permission
# - Click "Invite"
# 3. Configure your pages in input/pages.json:
# {
# "pages": [
# {
# "id": "your-notion-page-id",
# "title": "Page Title",
# "slug": "page-slug"
# }
# ]
# }
# 4. Run the conversion:
# cp env.example .env
# # Edit .env with your actual token
# node index.mjs --clean
|