summaryrefslogtreecommitdiff
path: root/integrations/neocities.mjs
diff options
context:
space:
mode:
Diffstat (limited to 'integrations/neocities.mjs')
-rw-r--r--integrations/neocities.mjs25
1 files changed, 0 insertions, 25 deletions
diff --git a/integrations/neocities.mjs b/integrations/neocities.mjs
deleted file mode 100644
index 9b02feb..0000000
--- a/integrations/neocities.mjs
+++ /dev/null
@@ -1,25 +0,0 @@
-import fs from 'node:fs';
-import path from 'node:path';
-import { fileURLToPath } from 'node:url';
-
-export default function neocitiesIntegration() {
- return {
- name: 'neocities',
- hooks: {
- 'astro:build:done': ({ dir }) => {
- const dirPath = typeof dir === 'string' ? dir : fileURLToPath(dir);
- const notFoundDirPath = path.join(dirPath, 'not_found');
- const notFoundIndexPath = path.join(notFoundDirPath, 'index.html');
- const targetPath = path.join(dirPath, 'not_found.html');
-
- if (fs.existsSync(notFoundIndexPath)) {
- fs.copyFileSync(notFoundIndexPath, targetPath);
- fs.rmSync(notFoundDirPath, { recursive: true, force: true });
- console.log('✅ Created not_found.html for Neocities');
- } else {
- console.log('⚠️ not_found directory not found, skipping Neocities integration');
- }
- }
- }
- };
-} \ No newline at end of file