- [x]~~Support edit for database details in plugin settings. 支持编辑数据库详情~~
## How to use
If you want to use this plugin, you need to follow the following steps to set up the plugin. The steps can be divided into two parts: setting up the Notion API and setting up the plugin in Obsidian.
### setting up the Notion API
### 1. Setting up the Notion API
1. go to [Notion API](https://www.notion.com/my-integrations) to create a new integration, and **copy the token**.
- Full Name: the full name that you would like to give to the database.
- Abbreviate Name: the abbreviation that you would like to give to the database.
- Notion tags sync: whether you want to sync the tags column to Notion.
- Customise title property: whether you want to change the `title` to another name (e.g., `name`).
- Notion API token: the token you copied from the Notion API page.
- Notion Database ID: the database ID you copied from the Notion database URL. (e.g., only copy `7158cd3f70ce4f60afd9da5bdf74fd0c` between `site/` and `?`**https://jxpeng.notion.site/7158cd3f70ce4f60afd9da5bdf74fd0c?v=380317ac53734fc0b2471243c13e618f&pvs=4**)
- Notion Database ID: the database ID you copied from the Notion database URL. (e.g., only copy `7158cd3f70ce4f60afd9da5bdf74fd0c` between `site/` and `?`. `https://jxpeng.notion.site/7158cd3f70ce4f60afd9da5bdf74fd0c?v=380317ac5373sadasdas3c13e618f&pvs=4**`)
If you use [NotionNext](https://github.com/tangly1024/NotionNext) to set up your website, you can use the NotionNext database. (**All the properties are in lowercase, and you do not need to change the properties**)
Like the general database, you need to fill in the following information:
@@ -99,7 +112,8 @@ Like the general database, you need to fill in the following information:
- Notion API token: the token you copied from the Notion API page.
- Notion Database ID: the database ID you copied from the Notion database URL.
#### Custom database
#### 3️⃣ Custom database
The custom database is purely customised, and you can customise the properties you want to sync. (**All the properties are in lowercase, and you do not need to change the properties**)
@@ -112,22 +126,27 @@ The basic information is identical to the general database and NotionNext databa
- Notion Database ID: the database ID you copied from the Notion database URL.
After adding the information, You can click `Add New Property` to add the properties you want to sync. There is no limit to the number of properties you can add.
**⚠️⚠️⚠️**: **`Title column` is the main property in the Notion database, which has the open button to open the underlying page.** You can select the type of all other properties. **⚠️⚠️⚠️**
1. Use the previous created general database and rename `title` to `Name` and `tags` to `Tags` in Notion. The front matter for the custom database is as follows:
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.
@@ -228,7 +229,7 @@ export class Upload2NotionCustom extends UploadBaseCustom {
}
);
console.log(properties)
// console.log(properties)
return{
parent:{
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.