update setup scripts

This commit is contained in:
somrat sorkar 2023-07-08 10:16:38 +06:00
parent e2374f93c3
commit b96065c6fc
2 changed files with 2 additions and 8 deletions

View File

@ -2,10 +2,7 @@ const fs = require("fs");
const path = require("path");
const getFolderName = (rootfolder) => {
const configPath = path.join(
rootfolder,
"exampleSite/config/_default/hugo.toml"
);
const configPath = path.join(rootfolder, "exampleSite/hugo.toml");
const getConfig = fs.readFileSync(configPath, "utf8");
const match = getConfig.match(/theme\s*=\s*\[?"([^"\]]+)"\]?/);
let selectedTheme = null;

View File

@ -14,10 +14,7 @@ const deleteFolder = (folderPath) => {
};
const getFolderName = (rootfolder) => {
const configPath = path.join(
rootfolder,
"exampleSite/config/_default/hugo.toml"
);
const configPath = path.join(rootfolder, "exampleSite/hugo.toml");
const getConfig = fs.readFileSync(configPath, "utf8");
const match = getConfig.match(/theme\s*=\s*\[?"([^"\]]+)"\]?/);
let selectedTheme = null;