Compare commits

...

3 Commits
1.1.1 ... 1.1.2

Author SHA1 Message Date
Jiaxin Peng
913fa4dd03 Update version to 1.1.2 2023-12-06 15:22:53 +00:00
Jiaxin Peng
f638310f31 modify workflow 2023-12-06 15:22:09 +00:00
Jiaxin Peng
c2421f7a84 add the property 'status' for NotionNext 2023-12-06 15:19:57 +00:00
7 changed files with 31 additions and 5 deletions

View File

@@ -4,7 +4,6 @@ on:
push: push:
branches: branches:
- "*" - "*"
- "!master"
env: env:
PLUGIN_NAME: share-to-notionnext # Change this to match the id of your plugin. PLUGIN_NAME: share-to-notionnext # Change this to match the id of your plugin.

View File

@@ -5,6 +5,17 @@
所以我在[原作者](https://github.com/EasyChris/obsidian-to-notion)的基础之上,增加了匹配[NotionNext](https://github.com/tangly1024/NotionNext)模板的功能。这样可以直接在Obsidian编辑整理好之后一键发布。 所以我在[原作者](https://github.com/EasyChris/obsidian-to-notion)的基础之上,增加了匹配[NotionNext](https://github.com/tangly1024/NotionNext)模板的功能。这样可以直接在Obsidian编辑整理好之后一键发布。
## 更新说明 ## 更新说明
### 1.1.2
- 修复了一个拼写错误,导致无法同步`status`到NotionNext。现在你可以使用`stats`或者`status`来同步文章的状态到NotionNext。这个更新不会影响到同步到General数据库的功能。
- **`stats``status`都可以使用,但是你只能使用其中一个。**
```yaml
stats: Draft # Draft, Invisible, Published, default is Draft 默认是Draft
# or
status: Draft # Draft, Invisible, Published, default is Draft 默认是Draft
# both of them will work, but you can only use one of them.
```
### 1.1.1 ### 1.1.1
- 修复了在日语系统下,无法显示设置按钮的错误。 - 修复了在日语系统下,无法显示设置按钮的错误。
- 增加日语翻译。 - 增加日语翻译。

View File

@@ -14,6 +14,20 @@ Thus, based on the [original author's work](https://github.com/EasyChris/obsidia
**Now, support both NotionNext and General databases.** **Now, support both NotionNext and General databases.**
## Update ## Update
### 1.1.2
- Fix the typo that you cannot sync the markdown file `status` in the frontmatter to NotionNext. You can use `stats` or `status` to sync the status of the post to NotionNext. This update will not affect the function of syncing to General database.
- 修复了一个拼写错误,导致无法同步`status`到NotionNext。现在你可以使用`stats`或者`status`来同步文章的状态到NotionNext。这个更新不会影响到同步到General数据库的功能。
- **Both `stats` and `status` will work, but you can only use one of them.**
- **`stats``status`都可以使用,但是你只能使用其中一个。**
For example,
```yaml
stats: Draft # Draft, Invisible, Published, default is Draft 默认是Draft
# or
status: Draft # Draft, Invisible, Published, default is Draft 默认是Draft
# both of them will work, but you can only use one of them.
```
### 1.1.1 ### 1.1.1
- Fix the setting display bug in Japanese. - Fix the setting display bug in Japanese.
- Add Japanese translation. - Add Japanese translation.

View File

@@ -1,7 +1,7 @@
{ {
"id": "share-to-notionnext", "id": "share-to-notionnext",
"name": "Share to NotionNext", "name": "Share to NotionNext",
"version": "1.1.1", "version": "1.1.2",
"minAppVersion": "0.0.1", "minAppVersion": "0.0.1",
"description": "Shares obsidian md file to notion with notion api for NotionNext web deploy, originally created by EasyChris/obsidian-to-notion.", "description": "Shares obsidian md file to notion with notion api for NotionNext web deploy, originally created by EasyChris/obsidian-to-notion.",
"author": "EasyChris, jxpeng98", "author": "EasyChris, jxpeng98",

View File

@@ -1,6 +1,6 @@
{ {
"name": "share-to-notionnext", "name": "share-to-notionnext",
"version": "1.1.1", "version": "1.1.2",
"type": "module", "type": "module",
"description": "Shares obsidian md file to notion with notion api for NotionNext web deploy, originally created by EasyChris/obsidian-to-notion.", "description": "Shares obsidian md file to notion with notion api for NotionNext web deploy, originally created by EasyChris/obsidian-to-notion.",
"main": "main.js", "main": "main.js",

View File

@@ -251,6 +251,7 @@ export class Upload2NotionNext extends UploadBaseNext {
file2Block file2Block
); );
} }
if (res.status === 200) { if (res.status === 200) {
await updateYamlInfo(markdown, nowFile, res, app, this.plugin) await updateYamlInfo(markdown, nowFile, res, app, this.plugin)
} else { } else {

View File

@@ -13,6 +13,7 @@ export async function getNowFileMarkdownContentNext(
let type = ''; let type = '';
let slug = ''; let slug = '';
let stats = ''; let stats = '';
let status = '';
let category = ''; let category = '';
let summary = ''; let summary = '';
let paword = ''; let paword = '';
@@ -26,7 +27,7 @@ export async function getNowFileMarkdownContentNext(
tags = FileCache.frontmatter.tags; tags = FileCache.frontmatter.tags;
type = FileCache.frontmatter.type; type = FileCache.frontmatter.type;
slug = FileCache.frontmatter.slug; slug = FileCache.frontmatter.slug;
stats = FileCache.frontmatter.stats; stats = FileCache.frontmatter.stats || FileCache.frontmatter.status;
category = FileCache.frontmatter.category; category = FileCache.frontmatter.category;
summary = FileCache.frontmatter.summary; summary = FileCache.frontmatter.summary;
paword = FileCache.frontmatter.password; paword = FileCache.frontmatter.password;