littlebot
Published on 2025-04-13 / 3 Visits
0

【源码】基于VS Code的Notion代码存储插件

项目简介

本项目是一个VS Code插件,主要用于帮助用户将VS Code中的代码片段便捷地发送到Notion页面,实现代码在Notion中的整理与保存。

项目的主要特性和功能

  1. 指导创建Notion集成:为用户详细引导在Notion中创建Integration并获取API Token的操作。
  2. 协助获取Page ID:帮助用户找到Notion Page ID,以此建立与插件的集成链接。
  3. 插件配置指导:说明在VS Code中配置插件各项参数,如Page ID、Token、UserID等的方法。
  4. 便捷代码发送:用户在VS Code中选中代码片段,右键选择“sendCodeToNotion”,即可将代码发送至Notion页面。

安装使用步骤

假设用户已下载本项目的源码文件: 1. 确保已安装VS Code。 2. 在VS Code的扩展商店中搜索并安装“codeToNotion”插件。 3. 按照教程创建Notion Integration,获取API Token、Page ID和UserID: - 创建Notion Integration:在浏览器搜索“notion my integrations”或访问https://www.notion.so/my-integrations,创建新的Integration,选择工作区、命名并保存Secrets Token(即Notion API Token)。 - 获取Notion Page ID:回到Notion创建新页面,页面URL末尾的代码即为Page ID,在页面右侧三点处添加之前创建的Integration。 - 获取UserID:进入“Settings & Members”,打开F12开发者工具,进入“My Account”,检查“authGetLoginConfiguration”的响应,找到并复制userId。 4. 在VS Code中配置“codeToNotion”插件,填入Page ID、Token和UserID。 5. 选中要保存的代码,右键选择“sendCodeToNotion”,输入存储名称并选择代码类型,即可将代码发送到Notion页面。

注意:具体步骤可能因Notion和VS Code的版本不同而有所差异,用户需根据实际环境调整操作。

下载地址

点击下载 【提取码: 4003】【解压密码: www.makuang.net】