Skip to content

一个 hexo 导入到 NotionNext 或 Nobelium database 的工具

License

Notifications You must be signed in to change notification settings

zhangweidev/hexo2notionnext

Repository files navigation

Hexo to NotionNext

一个简单的 hexo 导入到 NotionNextnobelium database 的库

使用

在使用此库之前,您需要完成以下准备工作:

  1. Notion Database

    notionnext: https://tangly1024.com/article/vercel-deploy-notion-next

    nobelium: https://github.com/craigary/nobelium

  2. Hexo 博客的 _post 目录

  3. 安装

pip install hexo2notionnext 
  1. 在安装完库之后,创建配置文件 config.yaml 的配置
token_v2: <your_token>
database_url: <your_notion_database_url>
hexo_post_path: <your_hexo_post_path>
sulg_format: ':year-:day-:month-:name'
type: notionnext # or nobelium 
  • token_v2 notion.so cookie 中 token_v2 的值

  • database_url 如果没有, duplicate 下面的到你的 notion notionNext Duplicate 这个 notionNext Notion template

nobelium Duplicate 这个 nobeliumNotion template

  1. 配置完成后,使用以下命令将Hexo文章导入到NotionNext 的 database 中:
hexo2notionnext -c config.yaml 

问题

  • For those getting 'HTTPError( requests.exceptions.HTTPError: Invalid input.)' 出现这个问题
  1. 在终端上运行 pip show notion
  2. 获取 notion 包位置并访问其内容(例如/usr/local/lib/python3.9/site-packages/notion )。
  3. store.py 第 280 行更改为 limit: 100 paperboi/kindle2notion#14

感谢

https://github.com/Cobertos/md2notion

https://github.com/jamalex/notion-py

许可证

The MIT License.

About

一个 hexo 导入到 NotionNext 或 Nobelium database 的工具

Resources

License

Stars

Watchers

Forks

Packages

No packages published