Skip to content

Commit

Permalink
edit
Browse files Browse the repository at this point in the history
  • Loading branch information
Its-Just-Nans committed Dec 14, 2024
1 parent 84c4ae8 commit 5b7598b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const pathToBuild = path.join(pathToProject, config.buildDir);
const pathToTemplate = path.join(pathToProject, config.templateDir);
const keyword = require("./datas.json");

const articleDir = "golb-articles"
const CleanCSS = require("clean-css");
const showdown = require("showdown");
const showdownKatex = require("showdown-katex");
Expand Down Expand Up @@ -212,7 +213,7 @@ const moveFile = async () => {
};

const copyDataFolder = async () => {
const list = await fs.readdir("./articles/");
const list = await fs.readdir(`./${articleDir}/`);
for (const oneFolder of list) {
const pathFile = path.join(__dirname, "articles", oneFolder);
const statOfElement = await fs.lstat(pathFile);
Expand All @@ -223,7 +224,7 @@ const copyDataFolder = async () => {
const statOfElement2 = await fs.lstat(pathFile2);
if (statOfElement2.isDirectory() && oneElement == "data") {
// we move
await copyDir(`./articles/${oneFolder}/data`, path.join(config.buildDir, "data"));
await copyDir(`./${articleDir}/${oneFolder}/data`, path.join(config.buildDir, "data"));
}
}
}
Expand Down

0 comments on commit 5b7598b

Please sign in to comment.