mirror of
https://github.com/jxpeng98/obsidian-to-NotionNext
synced 2026-07-29 08:08:34 +08:00
Added upload image readme
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -20,3 +20,4 @@ data.json
|
||||
|
||||
# Exclude macOS Finder (System Explorer) View States
|
||||
.DS_Store
|
||||
.history
|
||||
@@ -86,6 +86,10 @@ Notion ID是你想分享文件的页面ID。
|
||||
如果你不写它,notion将分享到默认的链接,如:https://www.notion.so/myworkspace/a8aec43384f447ed84390,访问这个页面将重定向到你的网站页面。
|
||||
如果你写了Notion ID,它将分享到页面链接如:https://your_user_name.notion.site/myworkspace/a8aec43384f447ed84390。不需要重定向网址。
|
||||
|
||||
## 同步图片
|
||||
|
||||
使用 [Obsidian Image Auto Upload Plugin](https://github.com/renmu123/obsidian-image-auto-upload-plugin) 插件,配置你自己的 cos 或者 oss,将图片存储到你自己的云存储,然后在 obsidian 中使用图片链接即可。该插件会自动帮你上传图片,并替换成链接。
|
||||
|
||||
# 请我喝杯咖啡
|
||||
|
||||
[顿顿饭](https://dun.mianbaoduo.com/@easy)
|
||||
|
||||
@@ -100,6 +100,9 @@ if you write the Notion ID, it will share to the page link like:
|
||||
https://your_user_name.notion.site/myworkspace/a8aec43384f447ed84390.
|
||||
The visiter don't need to redirect url.
|
||||
|
||||
## Sync image to Notion
|
||||
|
||||
To sync images to your oss or cos bucket, use the [Obsidian Image Auto Upload Plugin](https://github.com/renmu123/obsidian-image-auto-upload-plugin).
|
||||
|
||||
# Buy me a cup of coffee.
|
||||
|
||||
|
||||
@@ -125,9 +125,6 @@ export class Upload2Notion {
|
||||
// if __content have start \n remove it
|
||||
const __content_remove_n = __content.replace(/^\n/, '')
|
||||
const content = '---\n' +yamlhead_remove_n +'\n---\n' + __content_remove_n;
|
||||
// const fullPath = this.getFilePath(nowFile);
|
||||
//write content fo file
|
||||
// fs.writeFileSync(fullPath, content);
|
||||
try {
|
||||
await nowFile.vault.modify(nowFile, content)
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user