diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f4780ec..57ef9b9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,6 +10,7 @@ env: jobs: build: + name: release runs-on: ubuntu-latest steps: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..12529eb --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,33 @@ +name: Test Obsidian-to-NotionNext plugin + + +on: + push: + branches: + - "*" + +env: + PLUGIN_NAME: share-to-notionnext # Change this to match the id of your plugin. + +jobs: + build: + name: test + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: "16.x" + + - name: Build + id: build + run: | + npm install + npm run build + mkdir ${{ env.PLUGIN_NAME }} + cp main.js manifest.json ${{ env.PLUGIN_NAME }} + zip -r ${{ env.PLUGIN_NAME }}.zip ${{ env.PLUGIN_NAME }} + ls + echo "tag_name=$(git tag --sort version:refname | tail -n 1)" >> $GITHUB_OUTPUT diff --git a/README-zh.md b/README-zh.md index 8af3c43..409f201 100644 --- a/README-zh.md +++ b/README-zh.md @@ -3,6 +3,8 @@ 所以我在[原作者](https://github.com/EasyChris/obsidian-to-notion)的基础之上,增加了匹配[NotionNext](https://github.com/tangly1024/NotionNext)模板的功能。这样可以直接在Obsidian编辑,整理好之后一键发布。 ## 更新说明 +### 1.0.1 +- 修复了自定义标题在设置菜单中显示错误的问题。 ### 1.0.0 (大更新) - 这个版本开始,你可以**任意修改第一列表头的名字 (标题列,默认:'title')**。 (**注意:你必须保证你的Notion数据库中有'tags‘这一列的存在,并且在markdown文件中把`tags:`添加到你的YAML表头中。否则会返回`400 错误`。但是你可以`tags:`设置为空。**) diff --git a/README.md b/README.md index a5d1c9c..10d6daa 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,8 @@ Thus, based on the [original author's work](https://github.com/EasyChris/obsidia **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.**) diff --git a/manifest.json b/manifest.json index bb61405..160abc1 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "share-to-notionnext", "name": "Share to NotionNext", - "version": "1.0.0", + "version": "1.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.", "author": "EasyChris, jxpeng98", diff --git a/package.json b/package.json index 5fab4b9..e9a4dc5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "share-to-notionnext", - "version": "1.0.0", + "version": "1.0.1", "type": "module", "description": "Shares obsidian md file to notion with notion api for NotionNext web deploy, originally created by EasyChris/obsidian-to-notion.", "main": "main.js", diff --git a/src/ui/settingTabs.ts b/src/ui/settingTabs.ts index e8782f0..0f405ab 100644 --- a/src/ui/settingTabs.ts +++ b/src/ui/settingTabs.ts @@ -102,6 +102,13 @@ export class ObsidianSettingTab extends PluginSettingTab { this.plugin.settings.GeneralButton = value; this.updateSettingEl(CustomTitleEl, value) + // name should follow the result of the title button + if (value) { + this.updateSettingEl(CustomNameEl, this.plugin.settings.CustomTitleButton) + } else { + this.updateSettingEl(CustomNameEl, value) + } + this.updateSettingEl(notionAPIGeneralEl, value) this.updateSettingEl(databaseIDGeneralEl, value)