amend the template

This commit is contained in:
Jiaxin Peng
2023-08-10 09:44:06 +01:00
parent a0f5d2d51b
commit 9be679f456
7 changed files with 64 additions and 34 deletions

View File

@@ -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

View File

@@ -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
- web # add more tags if you want
---
Contents Below
```
模板使用如下:
![](https://img.jxpeng.dev/2023/08/5ba5e7aeb86650c060c620786371717c.mp4)

View File

@@ -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
- web # add more tags if you want
---
Contents Below
```
Usage of the template is as follows:
![](https://img.jxpeng.dev/2023/08/189384bf03c562030f4828343e1b7a6c.gif)

View File

@@ -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",

View File

@@ -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

20
obsidian_template.md Normal file
View File

@@ -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

View File

@@ -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",