mirror of
https://github.com/jxpeng98/obsidian-to-NotionNext
synced 2026-07-30 00:48:36 +08:00
Added right share url link
This commit is contained in:
@@ -92,10 +92,8 @@ export class Upload2Notion {
|
|||||||
|
|
||||||
if(notionID){
|
if(notionID){
|
||||||
res = await this.updatePage(notionID, title, file2Block);
|
res = await this.updatePage(notionID, title, file2Block);
|
||||||
console.log(res)
|
|
||||||
} else {
|
} else {
|
||||||
res = await this.createPage(title, file2Block);
|
res = await this.createPage(title, file2Block);
|
||||||
console.log(res)
|
|
||||||
}
|
}
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
await this.updateYamlInfo(markdown, nowFile, res, app, settings)
|
await this.updateYamlInfo(markdown, nowFile, res, app, settings)
|
||||||
@@ -109,14 +107,12 @@ export class Upload2Notion {
|
|||||||
const yamlObj:any = yamlFrontMatter.loadFront(yamlContent);
|
const yamlObj:any = yamlFrontMatter.loadFront(yamlContent);
|
||||||
let {url, id} = res.json
|
let {url, id} = res.json
|
||||||
// replace www to notionID
|
// replace www to notionID
|
||||||
console.log(app)
|
|
||||||
const {notionID} = settings;
|
const {notionID} = settings;
|
||||||
if(notionID!=="") {
|
if(notionID!=="") {
|
||||||
// replace url str "www" to notionID
|
// replace url str "www" to notionID
|
||||||
url = url.replace("www.notion.so", `${notionID}.notion.site`)
|
url = url.replace("www.notion.so", `${notionID}.notion.site`)
|
||||||
}
|
}
|
||||||
yamlObj.link = url;
|
yamlObj.link = url;
|
||||||
console.log(url)
|
|
||||||
try {
|
try {
|
||||||
await navigator.clipboard.writeText(url)
|
await navigator.clipboard.writeText(url)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user