Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(examples): vuepress static example #65

Merged
merged 1 commit into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions examples/vuepress-static/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules

# Azion
.edge
.vulcan

33 changes: 33 additions & 0 deletions examples/vuepress-static/docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
home: true
title: Home
heroImage: https://vuejs.press/images/hero.png
actions:
- text: Get Started
link: /get-started.html
type: primary

- text: Introduction
link: https://vuejs.press/guide/introduction.html
type: secondary

features:
- title: Simplicity First
details: Minimal setup with markdown-centered project structure helps you focus on writing.
- title: Vue-Powered
details: Enjoy the dev experience of Vue, use Vue components in markdown, and develop custom themes with Vue.
- title: Performant
details: VuePress generates pre-rendered static HTML for each page, and runs as an SPA once a page is loaded.
- title: Themes
details: Providing a default theme out of the box. You can also choose a community theme or create your own one.
- title: Plugins
details: Flexible plugin API, allowing plugins to provide lots of plug-and-play features for your site.
- title: Bundlers
details: Default bundler is Vite, while Webpack is also supported. Choose the one you like!

footer: MIT Licensed | Copyright © 2018-present VuePress Community
---

This is the content of home page. Check [Home Page Docs][default-theme-home] for more details.

[default-theme-home]: https://vuejs.press/reference/default-theme/frontmatter.html#home-page
46 changes: 46 additions & 0 deletions examples/vuepress-static/docs/get-started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Get Started

This is a normal page, which contains VuePress basics.

## Pages

You can add markdown files in your vuepress directory, every markdown file will be converted to a page in your site.

See [routing][] for more details.

## Content

Every markdown file [will be rendered to HTML, then converted to a Vue SFC][content].

VuePress support basic markdown syntax and [some extensions][synatex-extensions], you can also [use Vue features][vue-feature] in it.

## Configuration

VuePress use a `.vuepress/config.js`(or .ts) file as [site configuration][config], you can use it to config your site.

For [client side configuration][client-config], you can create `.vuepress/client.js`(or .ts).

Meanwhile, you can also add configuration per page with [frontmatter][].

## Layouts and customization

Here are common configuration controlling layout of `@vuepress/theme-default`:

- [navbar][]
- [sidebar][]

Check [default theme docs][default-theme] for full reference.

You can [add extra style][style] with `.vuepress/styles/index.scss` file.

[routing]: https://vuejs.press/guide/page.html#routing
[content]: https://vuejs.press/guide/page.html#content
[synatex-extensions]: https://vuejs.press/guide/markdown.html#syntax-extensions
[vue-feature]: https://vuejs.press/guide/markdown.html#using-vue-in-markdown
[config]: https://vuejs.press/guide/configuration.html#client-config-file
[client-config]: https://vuejs.press/guide/configuration.html#client-config-file
[frontmatter]: https://vuejs.press/guide/page.html#frontmatter
[navbar]: https://vuejs.press/reference/default-theme/config.html#navbar
[sidebar]: https://vuejs.press/reference/default-theme/config.html#sidebar
[default-theme]: https://vuejs.press/reference/default-theme/
[style]: https://vuejs.press/reference/default-theme/styles.html#style-file
20 changes: 20 additions & 0 deletions examples/vuepress-static/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "vuepress-boilerplate",
"version": "2.0.0",
"description": "A VuePress project",
"license": "MIT",
"type": "module",
"scripts": {
"docs:build": "vuepress build docs",
"docs:clean-dev": "vuepress dev docs --clean-cache",
"docs:dev": "vuepress dev docs",
"docs:update-package": "pnpm dlx vp-update"
},
"devDependencies": {
"@vuepress/bundler-vite": "^2.0.0-rc.18",
"@vuepress/theme-default": "^2.0.0-rc.18",
"vue": "^3.4.0",
"vuepress": "^2.0.0-rc.18",
"sass-embedded": "^1.80.6"
}
}
Loading