From 9be679f456d6098a74af28dc64f25428b7201d66 Mon Sep 17 00:00:00 2001 From: Jiaxin Peng Date: Thu, 10 Aug 2023 09:44:06 +0100 Subject: [PATCH] amend the template --- .github/workflows/release.yml | 11 +++++++++++ README-zh.md | 25 ++++++++++++++++--------- README.md | 23 +++++++++++++++-------- manifest.json | 2 +- obsidian template.md | 15 --------------- obsidian_template.md | 20 ++++++++++++++++++++ package.json | 2 +- 7 files changed, 64 insertions(+), 34 deletions(-) delete mode 100644 obsidian template.md create mode 100644 obsidian_template.md diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d2a80ad..92d8030 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -75,6 +75,17 @@ jobs: asset_name: manifest.json asset_content_type: application/json + - name: Upload markdown template + id: upload-md + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./obsidian_template.md + asset_name: template.md + asset_content_type: text/markdown + # - name: Upload styles.css # id: upload-css # uses: actions/upload-release-asset@v1 diff --git a/README-zh.md b/README-zh.md index a5307e4..28dab81 100644 --- a/README-zh.md +++ b/README-zh.md @@ -41,24 +41,31 @@ ### 使用插件 在仓库中我上传了一个模板,你可以直接复制到你的模板文件夹中。然后使用Obsidian的模板功能一键生成新笔记。 + 如果你不想使用模板,你也可以直接在Obsidian中创建一个新的文件,然后复制下边的内容。然后保存。 ```markdown --- -type: Post # Post or Page, the default is Post -slug: test # slug for url, the default is -stats: Draft # Draft, Invisible, Published -category: test -summary: this is a summary for test post -icon: fa-solid fa-camera # you can ignore this -password: "1234" # if you donot want to set password, you can delete this line +# default value has been set. +# for any unwanted value, you can delete it or set it to empty. +# for example, if you donot want to set password, you can delete password: "1234" or set it to password: "" +# 我已经在插件中设置了默认值,如果有不需要的选项,可以直接删除。 +# 例如你不需要密码选项,你可以将password: "1234"删除,或者将它设置为空。 +type: Post # Post or Page, default is Post, 默认是Post +slug: test # slug for url, default is empty, 默认是空 +stats: Draft # Draft, Invisible, Published, default is Draft, 默认是Draft +category: test # default is 'Obsidian', 默认是'Obsidian' +summary: this is a summary for test post # default is empty, 默认是空 +icon: fa-solid fa-camera # you can ignore this, default is empty, 默认是空,可直接删除 +password: "1234" # if you donot want to set password, you can delete this line, default is empty, 默认是空,可直接删除 +# 现在必须开启tags选项,否则会报错 tags: - - test # tags for post + - test # tags for post - web # add more tags if you want --- - Contents Below + ``` 模板使用如下: ![](https://img.jxpeng.dev/2023/08/5ba5e7aeb86650c060c620786371717c.mp4) diff --git a/README.md b/README.md index f42741e..6cde9e5 100644 --- a/README.md +++ b/README.md @@ -45,19 +45,26 @@ In the repository, I have uploaded a template which you can directly copy into y 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 --- -type: Post # Post or Page, the default is Post -slug: test # slug for url, the default is -stats: Draft # Draft, Invisible, Published -category: test -summary: this is a summary for test post -icon: fa-solid fa-camera # you can ignore this -password: "1234" # if you donot want to set password, you can delete this line +# default value has been set. +# for any unwanted value, you can delete it or set it to empty. +# for example, if you donot want to set password, you can delete password: "1234" or set it to password: "" +# 我已经在插件中设置了默认值,如果有不需要的选项,可以直接删除。 +# 例如你不需要密码选项,你可以将password: "1234"删除,或者将它设置为空。 +type: Post # Post or Page, default is Post, 默认是Post +slug: test # slug for url, default is empty, 默认是空 +stats: Draft # Draft, Invisible, Published, default is Draft, 默认是Draft +category: test # default is 'Obsidian', 默认是'Obsidian' +summary: this is a summary for test post # default is empty, 默认是空 +icon: fa-solid fa-camera # you can ignore this, default is empty, 默认是空,可直接删除 +password: "1234" # if you donot want to set password, you can delete this line, default is empty, 默认是空,可直接删除 +# 现在必须开启tags选项,否则会报错 tags: - - test # tags for post + - test # tags for post - web # add more tags if you want --- Contents Below + ``` Usage of the template is as follows: ![](https://img.jxpeng.dev/2023/08/189384bf03c562030f4828343e1b7a6c.gif) diff --git a/manifest.json b/manifest.json index 2870299..e457860 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "id": "share-to-notionnext", "name": "Share to NotionNext", - "version": "0.0.4", + "version": "0.0.5", "minAppVersion": "0.0.1", "description": "This is a plugin for Obsidian. This plugin shares obsidian md file to notion with notion api for NotionNext web deploy.", "author": "jxpeng98", diff --git a/obsidian template.md b/obsidian template.md deleted file mode 100644 index 6bf6ed9..0000000 --- a/obsidian template.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -type: Post // Post or Page -slug: test // slug for url -stats: Draft // Draft, Invisible, Published -category: test -summary: this is a summary for test post -icon: fa-solid fa-camera // you can ignore this -password: "1234" // if you donot want to set password, you can delete this line -tags: - - test // tags for post - - web // add more tags if you want ---- - - -Contents Below diff --git a/obsidian_template.md b/obsidian_template.md new file mode 100644 index 0000000..671585b --- /dev/null +++ b/obsidian_template.md @@ -0,0 +1,20 @@ +--- +# default value has been set. +# for any unwanted value, you can delete it or set it to empty. +# for example, if you donot want to set password, you can delete password: "1234" or set it to password: "" +# 我已经在插件中设置了默认值,如果有不需要的选项,可以直接删除。 +# 例如你不需要密码选项,你可以将password: "1234"删除,或者将它设置为空。 +type: Post # Post or Page, default is Post, 默认是Post +slug: test # slug for url, default is empty, 默认是空 +stats: Draft # Draft, Invisible, Published, default is Draft, 默认是Draft +category: test # default is 'Obsidian', 默认是'Obsidian' +summary: this is a summary for test post # default is empty, 默认是空 +icon: fa-solid fa-camera # you can ignore this, default is empty, 默认是空,可直接删除 +password: "1234" # if you donot want to set password, you can delete this line, default is empty, 默认是空,可直接删除 +# 现在必须开启tags选项,否则会报错 +tags: + - test # tags for post + - web # add more tags if you want +--- + +Contents Below diff --git a/package.json b/package.json index 84691af..078f0db 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "share-to-notionnext", - "version": "0.0.4", + "version": "0.0.5", "type": "module", "description": "This is a plugin for Obsidian. This plugin share obsidian md file to notion with notion api for NotionNext web deploy.", "main": "main.js",