Use AstroWind template to improve the home page

Imported from 7cafd1db3b
This commit is contained in:
Nigel Breslaw 2025-06-23 12:44:13 +03:00 committed by Olivier Goffart
parent 7cd8194e1c
commit 9711a625e7
77 changed files with 7249 additions and 280 deletions

View file

@ -0,0 +1,21 @@
// Copyright © onWidget <https://github.com/onwidget>
// SPDX-License-Identifier: MIT
import fs from "node:fs";
import yaml from "js-yaml";
const loadConfig = async (configPathOrData: string | object) => {
if (typeof configPathOrData === "string") {
const content = fs.readFileSync(configPathOrData, "utf8");
if (
configPathOrData.endsWith(".yaml") ||
configPathOrData.endsWith(".yml")
) {
return yaml.load(content);
}
return content;
}
return configPathOrData;
};
export default loadConfig;