Skip to main content

mkdocs-notion-plugin

Release Build status Python codecov License

A MkDocs plugin that integrates Notion content into your documentation.

⚠️ Development Phase Warning

This project is currently in active development and NOT ready for production use. Features may be incomplete, APIs may change without notice, and stability is not guaranteed. Use at your own risk and expect breaking changes between versions.

We welcome feedback and contributions, but please do not use this in production environments yet.

Features

  • Fetch content from Notion databases
  • Cache Notion content locally for faster builds
  • Seamless integration with MkDocs

Installation

pip install mkdocs-notion-plugin

Configuration

Add the plugin to your mkdocs.yml:

plugins:
  - notion:
      # Notion configuration (only required for deployment)
      notion_token: your-notion-integration-token  # optional
      parent_page_id: your-parent-page-id          # optional
      version: your-version                        # optional
      cache_dir: .notion_cache                     # optional
      deploy_on_build: false                       # optional

Configuration for Deployment

The following configuration is only required when using mkdocs notion-deploy:

  • notion_token: Your Notion integration token. Create one at https://www.notion.so/my-integrations
  • parent_page_id: The ID of the Notion page where your documentation will be deployed
  • version: Version identifier for your documentation

Optional Configuration

  • cache_dir: Directory to store cached Notion content (default: .notion_cache)
  • deploy_on_build: Whether to automatically deploy to Notion during build (default: false)

Note: You can use mkdocs build and mkdocs serve without any Notion configuration. The Notion settings are only validated when you run mkdocs notion-deploy.

Usage

  1. Create a Notion integration and get your token
  2. Share your Notion database with the integration
  3. Configure the plugin in your mkdocs.yml
  4. Deploy your documentation using one of these methods:

Build and deploy separately for better control:

# Build your documentation
mkdocs build

# Deploy to Notion
mkdocs notion-deploy

# Or if using Poetry for development
poetry run mkdocs notion-deploy

Method 2: Automatic Deployment

Enable automatic deployment during build by adding deploy_on_build: true to your configuration:

plugins:
  - notion:
      notion_token: your-notion-integration-token
      parent_page_id: your-parent-page-id
      version: your-version
      deploy_on_build: true  # Enable automatic deployment

Then simply run:

mkdocs build

Command Options

The notion-deploy command supports several options:

mkdocs notion-deploy --help

Options:
  -f, --config-file FILE  Provide a specific MkDocs config file
  -s, --strict            Enable strict mode (abort on warnings)
  -v, --verbose           Enable verbose output
  -q, --quiet             Silence warnings
  --clean / --dirty       Remove old files before building (default: clean)

Development

# Install dependencies
poetry install

# Run tests
poetry run pytest

# Format code
poetry run black .

License

MIT License


Repository initiated with fpgmaas/cookiecutter-poetry.

Change

Metadata

Release files for mkdocs_notion_plugin 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mkdocs_notion_plugin 0.0.7
File Size Uploaded Provenance
mkdocs_notion_plugin-0.0.7.tar.gz 16.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mkdocs_notion_plugin 0.0.7
File Interpreter ABI Platform
mkdocs_notion_plugin-0.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 33.1 kB

Release files / mkdocs_notion_plugin-0.0.7.tar.gz

Download URL mkdocs_notion_plugin-0.0.7.tar.gz
Size 16.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ee7cb0a6e0772961710779fdf605896918d444a7f401a754ceae58a29af28a86
BLAKE2b-256 checksum
How to use checksums
28a6d55473d45c925fca7ed8a771153cd8684cac3503adc6e2a089d2879c1365
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.4 CPython/3.11.13 Linux/6.11.0-1018-azure

Release files / mkdocs_notion_plugin-0.0.7-py3-none-any.whl

Download URL mkdocs_notion_plugin-0.0.7-py3-none-any.whl
Size 16.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
875beb89efc832ae632e031cb67a3aa7725b0c062bb214768a786f80854176fe
BLAKE2b-256 checksum
How to use checksums
3391f7033ced7918818be642d993fd46c1b0f60128cb8008a0f2f14310b5e907
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.4 CPython/3.11.13 Linux/6.11.0-1018-azure

Security for mkdocs_notion_plugin 0.0.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page