make example for Python docs

This commit is contained in:
Fuma Nama
2025-04-18 09:22:52 +08:00
parent e9fc458be5
commit c50ca3f405
35 changed files with 492 additions and 189 deletions
+19
View File
@@ -0,0 +1,19 @@
import { rimraf } from 'rimraf';
import * as Python from 'fumadocs-python';
import * as fs from 'node:fs/promises';
async function generate() {
const pythonOUt = 'content/docs/httpx';
await rimraf(pythonOUt);
const content = JSON.parse((await fs.readFile('./httpx.json')).toString());
const converted = Python.convert(content, {
baseUrl: '/docs',
});
await Python.write(converted, {
outDir: pythonOUt,
});
}
void generate();