Molbap's picture
Molbap HF Staff
push a bunch of updates
e903a32
raw
history blame
2.07 kB
# 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