Skip to content
This repository has been archived by the owner on Nov 9, 2023. It is now read-only.

Commit

Permalink
Merge pull request #25 from zxcvbnmzsedr/refactor_style
Browse files Browse the repository at this point in the history
删除html的返回,看了思源 的 源码 目前无法通过思源进行实现
  • Loading branch information
zxcvbnmzsedr authored Jun 14, 2022
2 parents f7c9526 + 631a67e commit ae5cf9b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions siyuan.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ async function getSiYuanPost({box}) {
return await Promise.all(siYuanBox.data.map(async (siYuanBoxData) => {
const {id, content, created} = siYuanBoxData;
const {data} = await getData('export/exportMdContent', {id});
const htmlResult = await getData('filetree/getDoc', {id, k: '', mode: 0, size: 99999});
// const htmlResult = await getData('filetree/getDoc', {id, k: '', mode: 0, size: 99999});

const contentType = data.hPath.split('/')[1];
if (contentType === 'posts') {
Expand Down Expand Up @@ -71,7 +71,7 @@ async function getSiYuanPost({box}) {
}
return {
...siYuanBoxData,
html: htmlResult.data.content,
html: '<div></div>',
title: content,
template,
slug: slug ? slug : data.hPath,
Expand Down Expand Up @@ -167,9 +167,9 @@ const parseTreeForPath = (arr, p) => {
return loop(p)
}

const fs = require('fs')
// const fs = require('fs')

// getSiYuanTopic({box: '20220420112442-p6q6e8w'})
// .then(e => fs.writeFileSync(path.join('.', 'index.json'), JSON.stringify(e[1])))
getSiYuanPost({box: '20220420112442-p6q6e8w'})
.then(e => fs.writeFileSync(path.join('.', 'index.json'), JSON.stringify(e)))
// getSiYuanPost({box: '20220420112442-p6q6e8w'})
// .then(e => fs.writeFileSync(path.join('.', 'index.json'), JSON.stringify(e)))

0 comments on commit ae5cf9b

Please sign in to comment.