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(templates/vuepress): Vuepress Boilerplate #170

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
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
4 changes: 4 additions & 0 deletions templates/vuepress/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"name": "Vuepress"
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Main Edge Deploy

on:
pull_request:
types:
- closed
branches:
- "main"

jobs:
deploy:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest

permissions:
contents: write

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install NPM dependencies
run: npm i

- name: Install Azion CLI
run: |
curl -o azionlinux https://downloads.azion.com/linux/x86_64/azion
sudo mv azionlinux /usr/bin/azion
sudo chmod u+x /usr/bin/azion

- name: Azion Action Deploy
run: |
azion -t ${{ secrets.AZION_PERSONAL_TOKEN }}
azion deploy
7 changes: 7 additions & 0 deletions templates/vuepress/vuepress-boilerplate/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
docs/.vuepress/
node_modules

# Azion
.edge
.vulcan

8 changes: 8 additions & 0 deletions templates/vuepress/vuepress-boilerplate/azion.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export default {
build: {
preset: {
name: 'vuepress'
}
}
}

33 changes: 33 additions & 0 deletions templates/vuepress/vuepress-boilerplate/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 templates/vuepress/vuepress-boilerplate/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
8 changes: 8 additions & 0 deletions templates/vuepress/vuepress-boilerplate/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "VuePress Boilerplate",
"message": "Deploy new VuePress applications to run directly on the edge",
"preset": "vuepress",
"mode": "deliver",
"path": "/vuepress-boilerplate"
}

20 changes: 20 additions & 0 deletions templates/vuepress/vuepress-boilerplate/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
Loading