Skip to content

echo724/notion2jekyll

Repository files navigation

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. Export a markdown file formatted as the jekyll-post format (yyyy-m-dd-<your page's title>) from your notion page.

  2. Makes 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_Jupyter or Ipython

from notion2jekyll import export_out from notion.client import NotionClient token_v2 = #<your notion token_v2> url = #<your notion page url> export_out(url,token_v2)
  • Exporter will make the md file and images in ./jekyllpost_output/ and ./jekyllpost_output/<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

About

Make notion page to Jekyll post format markdown.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages