Skip to main content

Notion2Jekyll

PyPI version

Jekyll Exporter makes your notion page to Jekyll Post Markdown file. This is using notion-py to export notion page to markdown.

Notion2Jekyll provides these features.

  1. Exports your notion page to the markdown file named as the jekyll-post title: yyyy-m-dd-<your page's title>

  2. Puts front matters to the markdown file.

  • tags

  • layout: post

  1. Download images in your notion page, and automatically set the image path in the md file

    You need to rename the path when you upload in your blog

Installation

Use the package manager pip to install notion2jekyll.

$pip install notion2jekyll

Usage_Command Line

$python -m notion2jekyll
#Markdown file name: <output file name(without .md)>
#Token_v2: <your token_v2 on notion.so>
#Notion Page Url: <your notion page to export>

Usage in Python

I changed the way to use the jekyll exporter. Please follow these examples.

With nothing

from notion2jekyll import *

export_cli()

With token_v2 & url

from notion2jekyll import *
token_v2 = #<your notion token_v2>
url = #<your notion page url>

export_out(url,token_v2)

With token_v2 & url & Notion-py Block

from notion2jekyll import *

token_v2 = #<your notion token_v2>
url = #<your notion page url>

client = NotionClient(token_v2=token_v2)
block = client.get_block(url)

export_in(block,client)

Aditional Info

  • Exporter will make the md file and images in the folder named posts and posts/<your block title>

  • The url should be the page that you want to export.

  • The front matter in the markdown will be different based on your jekyll blog variables. So, change the front matters when you finish the export, or change the code in this project.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

Metadata

Release files for notion2jekyll 0.1.6

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

Built distribution (wheel)

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

Release files / notion2jekyll-0.1.6-py3-none-any.whl

Download URL notion2jekyll-0.1.6-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1aa63edb96c98f25080348b46f4d30a6c6c5540f394add52a38cfc633af64c51
BLAKE2b-256 checksum
How to use checksums
8bf1561aa2daf9c82ac459e3c1fe2be88c8dc164c76038108df0fa4044eb12af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/47.1.1.post20200604 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

Release history Release notifications | RSS feed

This release

0.1.6 This release

1 release file

0.1.5.3

1 release file

0.1.5.2

1 release file

0.1.5.1

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

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