mirror of
https://github.com/jxpeng98/obsidian-to-NotionNext
synced 2026-07-29 08:08:34 +08:00
remove block limit and update packages
This commit is contained in:
117
README.md
117
README.md
@@ -1,69 +1,93 @@
|
||||
# Obsidian to NotionNext
|
||||
# Obsidian to NotionNext
|
||||
|
||||
[](https://github.com/jxpeng98/obsidian-to-NotionNext/actions/workflows/test.yml)
|
||||
[](https://github.com/jxpeng98/obsidian-to-NotionNext/actions/workflows/release.yml)
|
||||
[](https://GitHub.com/jxpeng98/obsidian-to-NotionNext/releases/)
|
||||
[](https://github.com/jxpeng98/obsidian-to-NotionNext/releases)
|
||||
|
||||
[中文文档](README-zh.md)
|
||||
|
||||
Thanks to the [original author](https://github.com/EasyChris/obsidian-to-notion) for developing such a useful plugin that can synchronize Obsidian to Notion. However, the original repository can only sync Name and Tags information. For those like me who use [NotionNext](https://github.com/tangly1024/NotionNext) to set up their website, this presents some limitations. Every time I import, I need to make a lot of modifications.
|
||||
Thanks to the [original author](https://github.com/EasyChris/obsidian-to-notion) for developing such a useful plugin that can synchronize Obsidian to Notion. However, the original repository can only sync Name and Tag information. For those like me who use [NotionNext](https://github.com/tangly1024/NotionNext) to set up their website, this presents some limitations. Every time I import, I need to make a lot of modifications.
|
||||
|
||||
Thus, based on the [original author's work](https://github.com/EasyChris/obsidian-to-notion), I've added a feature to match the [NotionNext](https://github.com/tangly1024/NotionNext) template. This way, you can edit directly in Obsidian and publish with a single click after organizing.
|
||||
|
||||
**Now, support both NotionNext and General databases.**
|
||||
|
||||
## Update
|
||||
|
||||
### 1.0.1
|
||||
|
||||
- Fix the custom name element display bug in the settings.
|
||||
|
||||
### 1.0.0 (Big Update)
|
||||
|
||||
- From this version, you can **modify the first column name (title column, default: 'title')** as you want. (**Note: You need to have the 'tags' column in your Notion General database, and add `tags:` in your markdown frontmatter. If not, you will receive `network error 400`. But you can leave the `tags:` blank.**)
|
||||
|
||||

|
||||
Like this:
|
||||

|
||||
- Add a switch button to control whether display the setting tabs in the plugin settings for both NotionNext and Notion General databases.
|
||||
|
||||
- Add a switch button to control whether display the setting tabs in the plugin settings for both NotionNext and Notion General databases.
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
### 0.2.6
|
||||
|
||||
- Add a switch button to control whether to show the upload command in the command palette.
|
||||
|
||||

|
||||
If you turn off the button for the General database, you won't see the option for the General database in the upload command list.
|
||||
<!-- 
|
||||
If you turn off the button for the General database, you won't see the option for the General database in the upload command list.
|
||||
|
||||
If you turn off the button for the NotionNext database, you won't see the option for the NotionNext database in the upload command list.
|
||||
|
||||

|
||||
 -->
|
||||
|
||||
### 0.2.3
|
||||
|
||||
- Fix the bug, now you can update normally.
|
||||
|
||||
### 0.2.2
|
||||
- Support both NotionNext and General Notion database.
|
||||
- You can have one NotionNext and one General Notion database.
|
||||
|
||||
- Support both NotionNext and General Notion database.
|
||||
- You can have one NotionNext and one General Notion database.
|
||||
- General Notion database can only have `title` and `tags` columns, and `tags` columns should be the multi-selected property. **the name of the columns is case sensitive. You should use small letter.**
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
### 0.2.1
|
||||
### 0.2.1
|
||||
|
||||
- Restructure the code
|
||||
|
||||
### 0.2.0
|
||||
|
||||
- From this version, the interactive logic has been rewritten. When you click the ribbon icon, it will display the sync command for all presetting NotionNext databases. You can choose the database you want to sync to. **However, only NotionNext database is supported for now.**
|
||||
|
||||
### 0.1.10
|
||||
|
||||
- Fix the Chinese support in the settings.
|
||||
|
||||
### 0.1.8
|
||||
|
||||
- Rebuild the uploadCommand function, and add one button to select the different databases. **However, only NotionNext database is supported for now.**
|
||||
|
||||
### 0.1.7
|
||||
|
||||
- [x] Removed the `convert tag` option. Now, you can directly add tags in the YAML front matter. If you don't want to add tags, you can delete the tags in the YAML front matter or leave the tags blank.
|
||||
|
||||
|
||||
## How to Use
|
||||
|
||||
### Precautions
|
||||
|
||||
For now, this plugin is exclusively for [NotionNext](https://github.com/tangly1024/NotionNext). If you're not using this template, you'll keep receiving `error 400`.
|
||||
|
||||
For those without a NotionNext requirement, please use the original [Obsidian-to-notion](https://github.com/EasyChris/obsidian-to-notion).
|
||||
|
||||
### Pre-Installation Steps
|
||||
|
||||
Before installing the plugin, you must have set up the following:
|
||||
|
||||
1. Your NotionNext database.
|
||||
2. According to the original author's readme.md, set up the Notion API, and it should already be associated with your NotionNext repository.
|
||||
3. NotionNext Database ID
|
||||
@@ -78,30 +102,36 @@ Before installing the plugin, you must have set up the following:
|
||||
- summary
|
||||
- password
|
||||
- icon
|
||||
|
||||
|
||||
From version 0.0.6, I also add the following contents:
|
||||
- titleicon: the unique icon for each post, it can only support emoji currently.
|
||||
- cover url: the cover image for each post, it should be end with a type of image, such as .jpg, .png, .gif, etc.
|
||||
- titleicon: the unique icon for each post, it can only support emoji currently.
|
||||
- cover url: the cover image for each post, it should be end with a type of image, such as .jpg, .png, .gif, etc.
|
||||
|
||||
**If you've directly copied the NotionNext template, these contents should already exist. I've made changes to this plugin based on the original author's work. All you need to ensure is that your database has the above content, and every letter is in lowercase!!!**
|
||||
|
||||
**⚠️⚠️⚠️: All headers are in lowercase!!! The order doesn't matter!**
|
||||
|
||||
### Plugin Installation
|
||||
|
||||
#### Install via Community Plugins
|
||||
|
||||
Open `Obsidian settings -> Community Plugins -> Browse -> NotionNext -> Share to NotionNext`
|
||||
|
||||
#### Mannually Install
|
||||
|
||||
1. Close Obsidian.
|
||||
2. Download the plugin file from Release and unzip it into your Obsidian plugin directory.
|
||||
3. Re-open Obsidian, go to settings, and enable the plugin.
|
||||
4. In the settings, find Obsidian to NotionNext, and enter your NotionNext Database ID and API token.
|
||||
|
||||
### How to Use
|
||||
|
||||
### Using the Plugin
|
||||
|
||||
In the repository, I have uploaded a template which you can directly copy into your template folder. After that, use Obsidian's template feature to create a new note with one click.
|
||||
|
||||
If you don't want to use the template, you can also directly create a new file in Obsidian and then copy the content below. Then save it.
|
||||
|
||||
```markdown
|
||||
---
|
||||
# default value has been set.
|
||||
@@ -131,6 +161,7 @@ tags:
|
||||
Contents Below
|
||||
|
||||
```
|
||||
|
||||
Usage of the template is as follows:
|
||||

|
||||
|
||||
@@ -144,13 +175,13 @@ Usage of the template is as follows:
|
||||
Many Thanks for the original author's work. I've only made some changes to the original author's work. If you find this plugin useful, please give the [original author](https://github.com/EasyChris/obsidian-to-notion) a star.
|
||||
|
||||
# Obsidian to Notion
|
||||
|
||||
[](https://github.com/Easychris/obsidian-to-notion/actions/workflows/CI.yml)
|
||||
[](https://github.com/Easychris/obsidian-to-notion/actions/workflows/release.yml)
|
||||
[](https://raw.githubusercontent.com/EasyChris/obsidian-to-notion/master/LICENSE)
|
||||
[](https://GitHub.com/Easychris/obsidian-to-notion/releases/)
|
||||
[](https://github.com/Easychris/obsidian-to-notion/releases)
|
||||
|
||||
|
||||
Share of obsidian to Notion [中文文档](README-zh.md)
|
||||
|
||||
Sharing files from Obsidian to Notion with a single click, and Obsidian will automatically add the Notion share link
|
||||
@@ -160,7 +191,9 @@ You are welcome to offer it a star if it can benefit you.
|
||||

|
||||
|
||||
# TODO
|
||||
|
||||
### [TODO Board](https://github.com/users/EasyChris/projects/3/views/1)
|
||||
|
||||
- [x] support for custom page banner
|
||||
- [x] update the exsit page
|
||||
- [x] support for mult language
|
||||
@@ -169,41 +202,47 @@ You are welcome to offer it a star if it can benefit you.
|
||||
- [x] support tags thank for [@jannikbuscha](https://github.com/jannikbuscha)
|
||||
- [ ] transfer the bi-link format like [[]] into the format that Notion supports.
|
||||
|
||||
|
||||
# How to use
|
||||
|
||||
## Install the plugin
|
||||
|
||||
### Marketplace download
|
||||
|
||||
Open obsidian setting -> Add plugin -> Search -> notion
|
||||
|
||||

|
||||
|
||||
### BRAT
|
||||
|
||||
Enter `BRAT` into the plugin market center to find it.
|
||||
Add `EasyChris/obsidian-to-notion` to the list of BRAT plugins that have been installed.
|
||||
Return to the plugin center and turn it on.
|
||||
|
||||
### Manual installation
|
||||
|
||||
```
|
||||
cd YOUR_OBSIDIAN_FOLDER/.obsidian/plugins/
|
||||
git clone https://github.com/EasyChris/obsidian-to-notion.git
|
||||
```
|
||||
|
||||
|
||||
## Apply Notion API
|
||||
|
||||
Official reference documentation: [https://developers.notion.com/docs](https://developers.notion.com/docs)
|
||||
### Step 1: Create integration.
|
||||
|
||||
### Step 1: Create integration
|
||||
|
||||
Go to [https://www.notion.com/my-integrations](https://www.notion.com/my-integrations)
|
||||
Once created, copy `secrets toekn`
|
||||

|
||||
|
||||
#### Note:
|
||||
#### Note
|
||||
|
||||
database first custom name must be "Name", otherwise sync to notion will be failed
|
||||
|
||||

|
||||
|
||||
|
||||
|
||||
### Step 2: Share a database with your integration
|
||||
|
||||
Create a new page (with public permissions)
|
||||
Create a new database in the page -> you need `full page database`
|
||||

|
||||
@@ -220,25 +259,25 @@ https://www.notion.so/myworkspace/a8aec43384f447ed84390e8e42c2e089?v=...
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Open the plugin configuration
|
||||
|
||||
Fill the configuration with the `NOTION_API_KEY` and `DATABASE_ID` you got
|
||||

|
||||
|
||||
## Upload file content to notion
|
||||
|
||||
Click the uploadCommand notion button
|
||||

|
||||
A share link will be automatically generated after successful uploadCommand
|
||||

|
||||
|
||||
|
||||
## Banner URL [option]
|
||||
Banner url must be a image url like: https://i.imgur.com/xxx.jpg
|
||||
|
||||
Banner url must be a image url like: <https://i.imgur.com/xxx.jpg>
|
||||
If you don't want to use banner, leave it blank
|
||||
|
||||
|
||||
## Convert Tags [option]
|
||||
|
||||
Transfer the Obsidian tags to the Notion table.
|
||||
It requires the column with the name 'Tags'.
|
||||

|
||||
@@ -247,11 +286,11 @@ Add tags to your notion page
|
||||
|
||||

|
||||
|
||||
* open plugin convert tags
|
||||
- open plugin convert tags
|
||||
|
||||

|
||||
|
||||
* add tags in the head
|
||||
- add tags in the head
|
||||
|
||||
```markdown
|
||||
---
|
||||
@@ -262,7 +301,6 @@ this is test tags
|
||||
|
||||
```
|
||||
|
||||
|
||||
```markdown
|
||||
---
|
||||
tags:
|
||||
@@ -275,26 +313,22 @@ this is test tags
|
||||
|
||||

|
||||
|
||||
Thanks for [@jannikbuscha](https://github.com/jannikbuscha) contribution
|
||||
|
||||
Thanks for [@jannikbuscha](https://github.com/jannikbuscha) contribution
|
||||
|
||||
## Notion ID [option]
|
||||
|
||||
Notion ID is the your notion site ID that you want to share the file to.
|
||||
if you don't write it, notion will share to the default link like:
|
||||
https://www.notion.so/myworkspace/a8aec43384f447ed84390
|
||||
that visit this page need to redirect to your site url
|
||||
if you write the Notion ID, it will share to the page link like:
|
||||
https://your_user_name.notion.site/myworkspace/a8aec43384f447ed84390.
|
||||
if you don't write it, notion will share to the default link like:
|
||||
<https://www.notion.so/myworkspace/a8aec43384f447ed84390>
|
||||
that visit this page need to redirect to your site url
|
||||
if you write the Notion ID, it will share to the page link like:
|
||||
<https://your_user_name.notion.site/myworkspace/a8aec43384f447ed84390>.
|
||||
The visiter don't need to redirect url.
|
||||
|
||||
|
||||
|
||||
## Sync image to Notion
|
||||
|
||||
To sync images to your oss or cos bucket, use the [Obsidian Image Auto Upload Plugin](https://github.com/renmu123/obsidian-image-auto-upload-plugin).
|
||||
|
||||
|
||||
|
||||
# Development
|
||||
|
||||
```
|
||||
@@ -309,6 +343,7 @@ yarn dev
|
||||
node update-version.js
|
||||
./release.sh
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user