refactor: refactor to 11ty to support Tencent Cloud EdgeOne Maker
continuous-integration/drone/push Build is failing

This commit is contained in:
2026-11-02 17:06:03 +08:00
parent 338858bd57
commit 21253ee102
174 changed files with 22956 additions and 30 deletions
+11
View File
@@ -0,0 +1,11 @@
import Eleventy from '@11ty/eleventy';
import fs from 'node:fs';
import path from 'node:path';
const arg=process.argv.indexOf('--output');
const out=arg<0?'_site':process.argv[arg+1];
const absolute=path.resolve(out);
if(absolute!==path.resolve('_site')&&!absolute.startsWith(path.resolve('.cache')+path.sep))throw Error('Output must be _site or inside .cache');
fs.rmSync(absolute,{recursive:true,force:true});
const engine=new Eleventy('_eleventy',out,{configPath:'eleventy.config.js'});
await engine.write();