diff --git a/packages/@vuepress/theme-default/global-components/CodeBlock.vue b/packages/@vuepress/theme-default/global-components/CodeBlock.vue new file mode 100644 index 0000000000..fc1dc71742 --- /dev/null +++ b/packages/@vuepress/theme-default/global-components/CodeBlock.vue @@ -0,0 +1,36 @@ + + + + + diff --git a/packages/@vuepress/theme-default/global-components/CodeGroup.vue b/packages/@vuepress/theme-default/global-components/CodeGroup.vue new file mode 100644 index 0000000000..e0a340b2a1 --- /dev/null +++ b/packages/@vuepress/theme-default/global-components/CodeGroup.vue @@ -0,0 +1,90 @@ + + + + + diff --git a/packages/docs/docs/guide/getting-started.md b/packages/docs/docs/guide/getting-started.md index 8b839378ff..e2fcd4c756 100644 --- a/packages/docs/docs/guide/getting-started.md +++ b/packages/docs/docs/guide/getting-started.md @@ -13,10 +13,19 @@ The fastest way to get your VuePress project setup is to use our [create-vuepres To use it, open up your terminal in the desired directory and run the following command: + + ```bash yarn create vuepress-site [optionalDirectoryName] -# OR npx create-vuepress-site [optionalDirectoryName] ``` + + + +```bash +npx create-vuepress-site [optionalDirectoryName] +``` + + You will then have the opportunity to configure your VuePress site’s metadata such as: @@ -40,15 +49,35 @@ This section will help you build a basic VuePress documentation site from ground 2. Initialize with your preferred package manager + + + ```bash + yarn init + ``` + + + ```bash - yarn init # npm init + npm init ``` + + 3. Install VuePress locally + + + ```bash + yarn add -D vuepress + ``` + + + ```bash - yarn add -D vuepress # npm install -D vuepress + npm install -D vuepress ``` + + 4. Create your first document @@ -71,9 +100,19 @@ This section will help you build a basic VuePress documentation site from ground 6. Serve the documentation site in the local server + + + ```bash + yarn docs:dev + ``` + + + ```bash - yarn docs:dev # npm run docs:dev + npm run docs:dev ``` + + VuePress will start a hot-reloading development server at [http://localhost:8080](http://localhost:8080). diff --git a/packages/docs/docs/theme/default-theme-config.md b/packages/docs/docs/theme/default-theme-config.md index 354eb5475d..d2982c1549 100644 --- a/packages/docs/docs/theme/default-theme-config.md +++ b/packages/docs/docs/theme/default-theme-config.md @@ -559,7 +559,7 @@ This will render `.vuepress/components/SpecialLayout.vue` for the given page. ## Ejecting -You can copy the default theme source code into `.vuepress/theme` to fully customize the theme using the `vuepress eject [targetDir]` command. If you didn't install Vuepress globally, run `./node_modules/.bin/vuepress eject`. +You can copy the default theme source code into `.vuepress/theme` to fully customize the theme using the `vuepress eject [targetDir]` command. If you didn’t install VuePress globally, run `./node_modules/.bin/vuepress eject`. ::: warning Once you eject, you are on your own and **won’t** be receiving future updates or bugfixes to the default theme even if you upgrade VuePress.