VuePress 1.x is a Vue-powered static site generator designed primarily for technical documentation. It enables authors to write content in Markdown and embed Vue components directly within it, offering a flexible and interactive documentation experience. The current stable version is 1.9.10, released in August 2023. Key differentiators include its Vue component-based layout system, a powerful plugin API for extending functionality, and a theming system. Since version 1.9.0, it features full TypeScript support for configuration files, and since 1.9.2, for plugins and themes, enhancing developer experience with type inference. While 1.x receives occasional bug fixes, it is officially in maintenance mode, with the core team's focus shifted to VuePress 2.x (which uses Vue 3 and ESM) and the even lighter-weight VitePress.
npm install vuepressVerified import paths — ran on the pinned version, not inferred.
Demonstrates setting up a basic VuePress 1.x project, including package.json scripts, a TypeScript-based configuration file (`config.ts`) with navigation and sidebar, and a sample Markdown page using a built-in component.
For new projects, consider `npm init vuepress@next` for VuePress 2.x or `npm init vitepress` for VitePress. For existing 1.x projects, consult the VuePress 2.x migration guide for breaking changes in APIs, configuration, and plugin/theme compatibility.
Convert `module.exports = { ... }` to `import { defineConfig } from 'vuepress'; export default defineConfig({ ... })` and rename `.js` files to `.ts` or `.mjs`.Increase Node.js memory limit (e.g., `NODE_OPTIONS=--max_old_space_size=8192 vuepress build docs`). Consider optimizing the site structure, reducing the number of generated files, or migrating to VuePress 2.x, which uses Webpack 5/Vite and is generally more efficient.
Ensure all custom components have names like `<MyComponent>` or `<my-component>`. If a component is expected to render differently on client/server or accesses browser-specific APIs, wrap it in `<ClientOnly>` component.
For Stylus, just write your `.styl` files. For other pre-processors (e.g., Sass, Less), refer to the VuePress advanced configuration guide to extend Webpack rules and install corresponding loaders (e.g., `sass-loader`, `node-sass`).
Increase Node.js memory allocation for the build command: `NODE_OPTIONS=--max_old_space_size=8192 yarn docs:build` (adjust size as needed, e.g., 4096, 12048).
Replace non-standard HTML tags with modern, semantic HTML5 elements and CSS for styling. Use the `--debug` flag during development (`vuepress dev docs --debug`) to get warning logs about unrecognized tags.
Review your file structure and ensure each Markdown file has a unique URL path. Adjust directory structure or file names to avoid path conflicts. For example, use `a/b.md` OR `a/b/index.md`, but not both if they map to the same `/a/b/` URL.
If using CloudFlare, disable 'Auto Minify' for JavaScript and HTML. For components that behave differently, wrap them in VuePress's `<ClientOnly />` component. Set `__VUE_PROD_HYDRATION_MISMATCH_DETAILS__ = true` in development for detailed browser console errors.
No dependency data recorded yet.