diff --git a/docs/__tests__/buildNav.test.js b/docs/__tests__/buildNav.test.js
deleted file mode 100644
index 26a57684..00000000
--- a/docs/__tests__/buildNav.test.js
+++ /dev/null
@@ -1,34 +0,0 @@
-const { buildNav } = require('../src/generator');
-
-test('generates navigation tree', () => {
- const pages = [
- { file: 'guide/install.md', data: { title: 'Install', order: 1 } },
- { file: 'guide/usage.md', data: { title: 'Usage', order: 2 } },
- { file: 'guide/nested/info.md', data: { title: 'Info', order: 1 } }
- ];
- const tree = buildNav(pages);
- const guide = tree.find(n => n.name === 'guide');
- expect(guide).toBeDefined();
- expect(guide.children.length).toBe(3);
- const install = guide.children.find(c => c.name === 'install.md');
- expect(install.path).toBe('/guide/install.html');
-});
-
-test('adds display names and section flags', () => {
- const pages = [
- { file: '02-api.md', data: { title: 'API', order: 2 } },
- { file: '01-guide/index.md', data: { title: 'Guide', order: 1 } },
- { file: '01-guide/setup.md', data: { title: 'Setup', order: 2 } },
- { file: 'index.md', data: { title: 'Home', order: 10 } }
- ];
- const nav = buildNav(pages);
- expect(nav[0].name).toBe('index.md');
- const guide = nav.find(n => n.name === '01-guide');
- expect(guide.displayName).toBe('Guide');
- expect(guide.isSection).toBe(true);
- const api = nav.find(n => n.name === '02-api.md');
- expect(api.displayName).toBe('API');
- // alphabetical within same order
- expect(nav[1].name).toBe('01-guide');
- expect(nav[2].name).toBe('02-api.md');
-});
diff --git a/docs/__tests__/loadConfig.test.js b/docs/__tests__/loadConfig.test.js
deleted file mode 100644
index d96b23f5..00000000
--- a/docs/__tests__/loadConfig.test.js
+++ /dev/null
@@ -1,13 +0,0 @@
-const fs = require('fs');
-const path = require('path');
-const loadConfig = require('../src/config/loadConfig');
-
-test('loads configuration and merges defaults', () => {
- const dir = fs.mkdtempSync(path.join(__dirname, 'cfg-'));
- const file = path.join(dir, 'config.yaml');
- fs.writeFileSync(file, 'site:\n title: Test Site\n');
- const cfg = loadConfig(file);
- expect(cfg.site.title).toBe('Test Site');
- expect(cfg.navigation.search).toBe(true);
- fs.rmSync(dir, { recursive: true, force: true });
-});
diff --git a/docs/__tests__/pluginHooks.test.js b/docs/__tests__/pluginHooks.test.js
deleted file mode 100644
index dd0dfb54..00000000
--- a/docs/__tests__/pluginHooks.test.js
+++ /dev/null
@@ -1,23 +0,0 @@
-const fs = require('fs');
-const path = require('path');
-const loadPlugins = require('../src/config/loadPlugins');
-
-test('plugin hook modifies data', async () => {
- const dir = fs.mkdtempSync(path.join(require('os').tmpdir(), 'plugins-'));
- const pluginFile = path.join(dir, 'test.plugin.js');
- fs.writeFileSync(
- pluginFile,
- "module.exports = { onParseMarkdown: ({ content }) => ({ content: content + '!!' }) };\n"
- );
-
- const plugins = loadPlugins({ pluginsDir: dir, plugins: ['test.plugin'] });
- let data = { content: 'hello' };
- for (const plugin of plugins) {
- if (typeof plugin.onParseMarkdown === 'function') {
- const res = await plugin.onParseMarkdown(data);
- if (res !== undefined) data = res;
- }
- }
- expect(data.content).toBe('hello!!');
- fs.rmSync(dir, { recursive: true, force: true });
-});
diff --git a/docs/__tests__/renderMarkdown.test.js b/docs/__tests__/renderMarkdown.test.js
deleted file mode 100644
index 58c4c8f1..00000000
--- a/docs/__tests__/renderMarkdown.test.js
+++ /dev/null
@@ -1,77 +0,0 @@
-jest.mock('@11ty/eleventy', () => {
- const fs = require('fs');
- const path = require('path');
- return class Eleventy {
- constructor(input, output) {
- this.input = input;
- this.output = output;
- }
- setConfig() {}
- async write() {
- const walk = d => {
- const entries = fs.readdirSync(d, { withFileTypes: true });
- let files = [];
- for (const e of entries) {
- const p = path.join(d, e.name);
- if (e.isDirectory()) files = files.concat(walk(p));
- else if (p.endsWith('.md')) files.push(p);
- }
- return files;
- };
- for (const file of walk(this.input)) {
- const rel = path.relative(this.input, file).replace(/\.md$/, '.html');
- const dest = path.join(this.output, rel);
- fs.mkdirSync(path.dirname(dest), { recursive: true });
- fs.writeFileSync(dest, '
', `${snippet}`) }; - } -}; diff --git a/docs/starter/config.yaml b/docs/starter/config.yaml deleted file mode 100644 index ac007ebf..00000000 --- a/docs/starter/config.yaml +++ /dev/null @@ -1,6 +0,0 @@ -site: - title: "Archivox Docs" - description: "Simple static docs." - -navigation: - search: true diff --git a/docs/starter/content/01-getting-started/01-install.md b/docs/starter/content/01-getting-started/01-install.md deleted file mode 100644 index 74133364..00000000 --- a/docs/starter/content/01-getting-started/01-install.md +++ /dev/null @@ -1,3 +0,0 @@ -# Install - -Run `npm install` then `npm run build` to generate your site. diff --git a/docs/starter/content/01-getting-started/index.md b/docs/starter/content/01-getting-started/index.md deleted file mode 100644 index 4af530b2..00000000 --- a/docs/starter/content/01-getting-started/index.md +++ /dev/null @@ -1,3 +0,0 @@ -# Getting Started - -This section helps you begin with Archivox. diff --git a/docs/starter/content/index.md b/docs/starter/content/index.md deleted file mode 100644 index c880922a..00000000 --- a/docs/starter/content/index.md +++ /dev/null @@ -1,3 +0,0 @@ -# Welcome to Archivox - -This is your new documentation site. Start editing files in the `content/` folder. diff --git a/docs/starter/package.json b/docs/starter/package.json deleted file mode 100644 index e5fdc394..00000000 --- a/docs/starter/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "my-archivox-site", - "private": true, - "scripts": { - "dev": "eleventy --serve", - "build": "node node_modules/archivox/src/generator/index.js" - }, - "dependencies": { - "archivox": "*" - } -} diff --git a/docs/templates/layout.njk b/docs/templates/layout.njk deleted file mode 100644 index 109ef522..00000000 --- a/docs/templates/layout.njk +++ /dev/null @@ -1,23 +0,0 @@ - - -
- - -
- - -
-