Skip to content

Commit

Permalink
Update to export all assets folder to dist/docs/ root, for better…
Browse files Browse the repository at this point in the history
… configure assets cache.
  • Loading branch information
huacnlee committed Nov 23, 2023
1 parent 2473f69 commit 1a31cb8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions feishu-pages/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,15 @@ const downloadFiles = async (
for (const fileToken in fileTokens) {
const filePath = await feishuDownload(
fileToken,
path.join(path.join(docFolder, 'assets'), fileToken)
path.join(path.join(DOCS_DIR, 'assets'), fileToken)
);
if (!filePath) {
continue;
}

const extension = path.extname(filePath);

let assetURL = `./assets/${fileToken}${extension}`;
let assetURL = `/assets/${fileToken}${extension}`;

// Replase Markdown image
content = replaceLinks(content, fileToken, assetURL);
Expand Down

0 comments on commit 1a31cb8

Please sign in to comment.