diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 99f9e01..fef495a 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -25,10 +25,10 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v3 with: - node-version: '16' + node-version: '18' # Updated to Node.js 18 - name: Install dependencies - run: npm install + run: npm ci working-directory: './docs' - name: Build documentation diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000..04c04a9 --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,3 @@ +node_modules/ +package-lock.json +.vuepress/dist/ diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index 8944f73..a6148cb 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -1,25 +1,32 @@ -module.exports = { - title : 'Micromissiles Unity Project', - description : 'Documentation for the Micromissiles Unity project', - base : '/micromissiles-unity/', - themeConfig : { - navbar : - [ - {text : 'Home', link : '/'}, { - text : 'Keybinds and Controls', - link : '/Keybinds_and_Controls.html' - }, - { - text : 'Simulation Configuration Guide', - link : '/Simulation_Config_Guide.html' - }, - {text : 'Simulation Logging', link : '/Simulation_Logging.html'}, { - text : 'Coverage Reports', - link : '/coverage/' - }, // Link to coverage reports - ], - sidebar : 'auto', - }, - // Add this to ensure INDEX.md is used as the home page - patterns : ['INDEX.md', '**/*.md', '**/*.vue'], -} \ No newline at end of file +module.exports = async () => { + const { viteBundler } = await import('@vuepress/bundler-vite') + + return { + title : 'Micromissiles Unity Project', + description : 'Documentation for the Micromissiles Unity project', + base : './', + themeConfig : { + navbar : + [ + {text : 'Home', link : '/'}, { + text : 'Keybinds and Controls', + link : '/Keybinds_and_Controls.html' + }, + { + text : 'Simulation Configuration Guide', + link : '/Simulation_Config_Guide.html' + }, + {text : 'Simulation Logging', link : '/Simulation_Logging.html'}, { + text : 'Coverage Reports', + link : '/coverage/' + }, // Link to coverage reports + ], + sidebar : 'auto', + }, + bundler: viteBundler(), + public: '../images', + // Add this to ensure INDEX.md is used as the home page + patterns : ['INDEX.md', '**/*.md', '**/*.vue'], + } +} + diff --git a/docs/package.json b/docs/package.json index 240d53b..dd843e9 100644 --- a/docs/package.json +++ b/docs/package.json @@ -3,7 +3,10 @@ "docs:dev": "vuepress dev .", "docs:build": "vuepress build ." }, + "dependencies": { + "vuepress": "^1.9.10" + }, "devDependencies": { - "vuepress": "^2.0.0-beta.51" + "@vuepress/bundler-vite": "^2.0.0-rc.16" } -} \ No newline at end of file +}