rename config.toml to hugo.toml
This commit is contained in:
@@ -4,7 +4,7 @@ const path = require("path");
|
||||
const getFolderName = (rootfolder) => {
|
||||
const configPath = path.join(
|
||||
rootfolder,
|
||||
"exampleSite/config/_default/config.toml"
|
||||
"exampleSite/config/_default/hugo.toml"
|
||||
);
|
||||
const getConfig = fs.readFileSync(configPath, "utf8");
|
||||
const match = getConfig.match(/theme\s*=\s*\[?"([^"\]]+)"\]?/);
|
||||
|
@@ -3,12 +3,20 @@ const path = require("path");
|
||||
|
||||
const rootDirs = ["assets/scss", "layouts"];
|
||||
const configFiles = [
|
||||
{
|
||||
filePath: "tailwind.config.js",
|
||||
patterns: ["darkmode:\\s*{[^}]*},", 'darkMode:\\s*"class",'],
|
||||
},
|
||||
{
|
||||
filePath: "exampleSite/tailwind.config.js",
|
||||
patterns: ["darkmode:\\s*{[^}]*},", 'darkMode:\\s*"class",'],
|
||||
},
|
||||
{
|
||||
filePath: "exampleSite/config.toml",
|
||||
filePath: "hugo.toml",
|
||||
patterns: ["\\S*\\.darkmode[^\\]]*\\]\\n*([\\s\\S]*?)(?=\\[|$)"],
|
||||
},
|
||||
{
|
||||
filePath: "exampleSite/hugo.toml",
|
||||
patterns: ["\\S*\\.darkmode[^\\]]*\\]\\n*([\\s\\S]*?)(?=\\[|$)"],
|
||||
},
|
||||
];
|
||||
|
@@ -16,7 +16,7 @@ const deleteFolder = (folderPath) => {
|
||||
const getFolderName = (rootfolder) => {
|
||||
const configPath = path.join(
|
||||
rootfolder,
|
||||
"exampleSite/config/_default/config.toml"
|
||||
"exampleSite/config/_default/hugo.toml"
|
||||
);
|
||||
const getConfig = fs.readFileSync(configPath, "utf8");
|
||||
const match = getConfig.match(/theme\s*=\s*\[?"([^"\]]+)"\]?/);
|
||||
@@ -53,9 +53,10 @@ const setupTheme = () => {
|
||||
"tailwind.config.js",
|
||||
"postcss.config.js",
|
||||
"go.mod",
|
||||
"config.toml",
|
||||
"hugo.toml",
|
||||
"assets",
|
||||
"config",
|
||||
"data",
|
||||
"content",
|
||||
"i18n",
|
||||
"static",
|
||||
|
Reference in New Issue
Block a user