fix new web site

This commit is contained in:
philc 2025-02-20 20:04:06 +01:00
parent 9b64d946cd
commit b478ffcf4f

View File

@ -44,8 +44,46 @@ Wwws.getwco = (wconame, ctx) => {
console.log("@todo don't forget to manage accessright to wco in Wwws");
//check that all tpl, tpldata, ... are available for this pagename
const webconf = `../${ctx.tribe}/objects/wwws/itm/${ctx.xapp}.json`;
const webpageinit = {
dns: [],
apxtri: {
headers: {
xtrkversion: 1,
xalias: "anonymous",
xapp: "recruiter",
xdays: 0,
xhash: "anonymous",
xlang: "en",
xprofils: "anonymous",
xtribe: "smatchit",
xuuid: "0",
},
},
tailwindcsscontent: [
`../${ctx.tribe}/objects/wwws/${ctx.xapp}/src/**/*.{html,js,mustache}`,
`../${ctx.tribe}/objects/wco/**/*.{html,js,mustache}`,
"../adminapi/objects/wco/apx/*.{html,js,mustache}",
"../adminapi/objects/wco/tracker/*.{html,js,mustache}",
],
pages: {},
};
webpageinit.pages[ctx.pagename] = {
version: 1,
confpage: {
language: ["en"],
profils: ["anonymous"],
itms: {},
tpl: {},
options: {},
ref: {},
schema: [],
tpldata: {},
},
};
const wcoinfo = fs.readJSONSync(wcoconf);
const webpage = fs.readJSONSync(webconf);
const webpage = fs.existsSync(webconf)
? fs.readJSONSync(webconf)
: webpageinit;
// check that webconf for tailwindcsscontent property exist for this wco request
const pathtocheckfortw = [
`../adminapi/objects/wco/${wconame}/*.{html,js,mustache}`,