notion2html

module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2022 License: MIT

README

notion2html

Generates a static website from Notion and watches for changes.

Command line arguments

Generate once
notion2html generate -o <output_dir> -t <access_token> [-f|--force]

Here:

  • -o <output_dir> - path to output directory
  • -t <access_token> - access token for Notion
  • -f, --force - disable incremental update
Watch for changes
notion2html watch -o <output_dir> -t <access_token> [-p <period>]

Here:

  • -o <output_dir> - path to output directory
  • -t <access_token> - access token for Notion
  • -p <period> - watch timer period (by default - 10m)

Run in Docker

Use the following docker compose file as a reference:

version: '2.4'
services:
    notion2html:
        build: .
        image: notion2html:latest
        container_name: notion2html
        restart: always
        environment:
            # Access token for Notion (required)
            NOTION_API_TOKEN: '<access_token>'
            # Watch timer period (optional, '10m' by default)
            TIMER_PERIOD: '10m'
            # Path to output directory (optional, '/out' by default)
            OUTPUT_DIR: '/out'
        volumes:
            # Output directory mapping
            - ./out:/out

License

MIT

Directories

Path Synopsis
cmd
notion2html command
internal
ast

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL