docu-notion 项目教程

docu-notion 项目教程

docu-notionDownload Notion pages as markdown and image files, preserving hierarchy and enabling workflow properties. Works with Docusaurus.项目地址:https://gitcode.com/gh_mirrors/do/docu-notion

1. 项目的目录结构及介绍

docu-notion 项目的目录结构如下:

docu-notion/
├── src/
│   ├── ...
├── .eslintignore
├── .eslintrc.js
├── .gitattributes
├── .gitignore
├── .prettierrc
├── LICENSE
├── README.md
├── docu-notion-config.ts
├── jest.config.js
├── package-lock.json
├── package.json
├── release.config.js
├── tsconfig.json
├── vite.config.ts

目录结构介绍

  • src/: 包含项目的主要源代码文件。
  • .eslintignore: 用于指定 ESLint 忽略的文件或目录。
  • .eslintrc.js: ESLint 配置文件。
  • .gitattributes: 用于指定 Git 属性。
  • .gitignore: 用于指定 Git 忽略的文件或目录。
  • .prettierrc: Prettier 配置文件。
  • LICENSE: 项目许可证文件。
  • README.md: 项目说明文档。
  • docu-notion-config.ts: docu-notion 配置文件。
  • jest.config.js: Jest 测试框架配置文件。
  • package-lock.json: 锁定项目依赖版本。
  • package.json: 项目依赖和脚本配置文件。
  • release.config.js: 发布配置文件。
  • tsconfig.json: TypeScript 配置文件。
  • vite.config.ts: Vite 构建工具配置文件。

2. 项目的启动文件介绍

项目的启动文件主要是 package.json 中的脚本部分。以下是一些关键的启动脚本:

{
  "scripts": {
    "dev": "vite",
    "build": "tsc && vite build",
    "serve": "vite preview",
    "test": "jest"
  }
}

启动脚本介绍

  • dev: 启动开发服务器。
  • build: 构建项目。
  • serve: 预览构建后的项目。
  • test: 运行测试。

3. 项目的配置文件介绍

docu-notion-config.ts

docu-notion-config.ts 是 docu-notion 项目的主要配置文件。以下是一个示例配置:

import { defineConfig } from 'docu-notion';

export default defineConfig({
  // 配置项
  notionToken: 'your-notion-token',
  rootPageId: 'your-root-page-id',
  // 其他配置项...
});

配置项介绍

  • notionToken: Notion API 的访问令牌。
  • rootPageId: Notion 页面的根页面 ID。
  • 其他配置项根据具体需求进行配置。

通过以上配置,可以实现将 Notion 页面转换为 Markdown 文件,并与 Docusaurus 集成。

docu-notionDownload Notion pages as markdown and image files, preserving hierarchy and enabling workflow properties. Works with Docusaurus.项目地址:https://gitcode.com/gh_mirrors/do/docu-notion

  • 5
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

秋玥多

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值