Skip to content

Commit cce4a89

Browse files
committed
chore: init
1 parent f9bda59 commit cce4a89

File tree

19 files changed

+1951
-3
lines changed

19 files changed

+1951
-3
lines changed

.github/workflows/deploy.yml

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Deploy EasyTemplate Docs to Pages
2+
3+
on:
4+
# 在针对 `main` 分支的推送上运行。
5+
push:
6+
branches: [main]
7+
8+
# 允许你从 Actions 选项卡手动运行此工作流程
9+
workflow_dispatch:
10+
11+
# 设置 GITHUB_TOKEN 的权限,以允许部署到 GitHub Pages
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
# 只允许同时进行一次部署,跳过正在运行和最新队列之间的运行队列
18+
# 但是,不要取消正在进行的运行,因为我们希望允许这些生产部署完成
19+
concurrency:
20+
group: pages
21+
cancel-in-progress: false
22+
23+
jobs:
24+
# 构建工作
25+
build:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v4
30+
with:
31+
fetch-depth: 0 # 如果未启用 lastUpdated,则不需要
32+
- uses: pnpm/action-setup@v3 # 使用 pnpm
33+
- name: Setup Node
34+
uses: actions/setup-node@v4
35+
with:
36+
node-version: 20
37+
cache: pnpm
38+
- name: Setup Pages
39+
uses: actions/configure-pages@v4
40+
- name: Install dependencies
41+
run: pnpm install
42+
- name: Build with VitePress
43+
run: pnpm docs:build
44+
- name: Upload artifact
45+
uses: actions/upload-pages-artifact@v3
46+
with:
47+
path: .vitepress/dist
48+
49+
# 部署工作
50+
deploy:
51+
environment:
52+
name: github-pages
53+
url: ${{ steps.deployment.outputs.page_url }}
54+
needs: build
55+
runs-on: ubuntu-latest
56+
name: Deploy
57+
steps:
58+
- name: Deploy to GitHub Pages
59+
id: deployment
60+
uses: actions/deploy-pages@v4

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.vitepress/dist
2+
.vitepress/cache
3+
node_modules

.vitepress/config.ts

+199
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,199 @@
1+
import { defineConfig, DefaultTheme } from 'vitepress'
2+
3+
const Guides: DefaultTheme.NavItemWithLink[] = [
4+
{ text: '介绍', link: '/guide/' },
5+
]
6+
7+
const vue3VantMobile: DefaultTheme.NavItemWithLink[] = [
8+
{ text: '概述', link: '/vue3-vant-mobile/' },
9+
]
10+
11+
const vue3VarletMobile: DefaultTheme.NavItemWithLink[] = [
12+
{ text: '概述', link: '/vue3-varlet-mobile/' },
13+
]
14+
15+
const nuxt3VantMobile: DefaultTheme.NavItemWithLink[] = [
16+
{ text: '概述', link: '/nuxt3-vant-mobile/' },
17+
]
18+
19+
const vue3ElementAdmin: DefaultTheme.NavItemWithLink[] = [
20+
{ text: '概述', link: '/vue3-element-admin/' },
21+
]
22+
23+
const vue3AntdvMobile: DefaultTheme.NavItemWithLink[] = [
24+
{ text: '概述', link: '/vue3-antdv-admin/' },
25+
]
26+
27+
const Nav: DefaultTheme.NavItem[] = [
28+
{
29+
text: '快速开始',
30+
items: [
31+
{
32+
text: '指南',
33+
items: Guides,
34+
},
35+
],
36+
activeMatch: '^/guide/',
37+
},
38+
39+
{
40+
text: '移动模板',
41+
items: [
42+
{
43+
text: 'vue3-vant-mobile',
44+
link: '/vue3-vant-mobile/',
45+
},
46+
{
47+
text: 'vue3-varlet-mobile',
48+
link: '/vue3-varlet-mobile/',
49+
},
50+
{
51+
text: 'nuxt3-vant-mobile',
52+
link: '/nuxt3-vant-mobile/',
53+
},
54+
]
55+
},
56+
{
57+
text: '中后台模版',
58+
items: [
59+
{
60+
text: 'vue3-antdv-admin',
61+
link: '/vue3-antdv-admin/',
62+
},
63+
{
64+
text: 'vue3-element-admin',
65+
link: '/vue3-element-admin/',
66+
}
67+
]
68+
},
69+
]
70+
71+
const SidebarGuide: DefaultTheme.SidebarItem[] = [
72+
{
73+
text: '指南',
74+
items: Guides,
75+
},
76+
{
77+
text: '移动模板',
78+
items: [
79+
{
80+
text: 'vue3-vant-mobile',
81+
link: '/vue3-vant-mobile/',
82+
},
83+
{
84+
text: 'vue3-varlet-mobile',
85+
link: '/vue3-varlet-mobile/',
86+
},
87+
{
88+
text: 'nuxt3-vant-mobile',
89+
link: '/nuxt3-vant-mobile/',
90+
},
91+
],
92+
},
93+
{
94+
text: '中后台模板',
95+
items: [
96+
{
97+
text: 'vue3-antdv-admin',
98+
link: '/vue3-antdv-admin/',
99+
},
100+
{
101+
text: 'vue3-element-admin',
102+
link: '/vue3-element-admin/',
103+
},
104+
],
105+
}
106+
]
107+
108+
const vue3VantMobileSidebarConfig: DefaultTheme.SidebarItem[] = [
109+
{
110+
text: 'vue3-vant-mobile',
111+
collapsed: false,
112+
items: vue3VantMobile,
113+
},
114+
]
115+
116+
const vue3VarletMobileSidebarConfig: DefaultTheme.SidebarItem[] = [
117+
{
118+
text: 'vue3-varlet-mobile',
119+
collapsed: false,
120+
items: vue3VarletMobile,
121+
},
122+
]
123+
124+
const nuxt3VantMobileSidebarConfig: DefaultTheme.SidebarItem[] = [
125+
{
126+
text: 'nuxt3-vant-mobile',
127+
collapsed: false,
128+
items: nuxt3VantMobile,
129+
},
130+
]
131+
132+
const vue3AntdvMobileSidebarConfig: DefaultTheme.SidebarItem[] = [
133+
{
134+
text: 'vue3-antdv-admin',
135+
collapsed: false,
136+
items: vue3AntdvMobile,
137+
},
138+
]
139+
140+
const vue3ElementAdminSidebarConfig: DefaultTheme.SidebarItem[] = [
141+
{
142+
text: 'vue3-element-admin',
143+
collapsed: false,
144+
items: vue3ElementAdmin,
145+
},
146+
]
147+
148+
149+
export default defineConfig({
150+
title: 'EasyTemplate',
151+
152+
lastUpdated: true,
153+
cleanUrls: true,
154+
metaChunk: true,
155+
156+
head: [
157+
['link', { rel: 'icon', type: 'image/svg+xml', href: '/logo.svg' }],
158+
['link', { rel: 'icon', type: 'image/png', href: '/logo.png' }],
159+
['meta', { name: 'theme-color', content: '#55a578' }],
160+
['meta', { property: 'og:type', content: 'website' }],
161+
['meta', { property: 'og:locale', content: 'zh' }],
162+
['meta', { property: 'og:title', content: 'EasyTemplate | Out of the box Vue 3 template' }],
163+
['meta', { property: 'og:site_name', content: 'EasyTemplate' }],
164+
// ['meta', { property: 'og:url', content: '' }],
165+
],
166+
167+
themeConfig: {
168+
logo: { src: '/logo.svg', width: 24, height: 24 },
169+
170+
search: {
171+
provider: 'local',
172+
},
173+
174+
socialLinks: [
175+
{ icon: 'github', link: 'https://github.com/easy-temps' }
176+
],
177+
178+
nav: Nav,
179+
180+
sidebar: {
181+
'/guide/': SidebarGuide,
182+
'/vue3-vant-mobile/': vue3VantMobileSidebarConfig,
183+
'/vue3-varlet-mobile/': vue3VarletMobileSidebarConfig,
184+
'/nuxt3-vant-mobile/': nuxt3VantMobileSidebarConfig,
185+
'/vue3-antdv-admin/': vue3AntdvMobileSidebarConfig,
186+
'/vue3-element-admin/': vue3ElementAdminSidebarConfig,
187+
},
188+
189+
editLink: {
190+
pattern: 'https://github.com/easy-temps/easy-docs/edit/main/:path',
191+
text: '在 GitHub 上编辑此页面',
192+
},
193+
194+
footer: {
195+
message: '基于 MIT 许可发布',
196+
copyright: '版权所有 © 2022-2024 EasyTemplate',
197+
},
198+
}
199+
})

.vitepress/theme/custom.css

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
/**
2+
* Customize default theme styling by overriding CSS variables:
3+
* https://github.com/vuejs/vitepress/blob/main/src/client/theme-default/styles/vars.css
4+
*/
5+
6+
/**
7+
* Colors
8+
* -------------------------------------------------------------------------- */
9+
10+
:root {
11+
--vp-c-brand-1: #51a13c;
12+
--vp-c-brand-light: #79c961;
13+
--vp-c-brand-lighter: #a1f287;
14+
--vp-c-brand-dark: #277b16;
15+
--vp-c-brand-darker: #005700;
16+
--vp-c-brand-next: #55a578;
17+
18+
--vp-c-indigo-1: #005700;
19+
--vp-c-indigo-2: #277b16;
20+
--vp-c-indigo-3: #a1f287;
21+
}
22+
23+
/**
24+
* Component: Button
25+
* -------------------------------------------------------------------------- */
26+
27+
:root {
28+
--vp-button-brand-border: var(--vp-c-brand-light);
29+
--vp-button-brand-text: var(--vp-c-white);
30+
--vp-button-brand-bg: var(--vp-c-brand-light);
31+
--vp-button-brand-hover-border: var(--vp-c-brand-1);
32+
--vp-button-brand-hover-text: var(--vp-c-white);
33+
--vp-button-brand-hover-bg: var(--vp-c-brand-1);
34+
--vp-button-brand-active-border: var(--vp-c-brand-light);
35+
--vp-button-brand-active-text: var(--vp-c-white);
36+
--vp-button-brand-active-bg: var(--vp-c-brand-1);
37+
}
38+
39+
40+
/**
41+
* Component: Home
42+
* -------------------------------------------------------------------------- */
43+
44+
:root {
45+
--vp-home-hero-name-color: transparent;
46+
--vp-home-hero-name-background: -webkit-linear-gradient(
47+
120deg,
48+
var(--vp-c-brand-1) 30%,
49+
var(--vp-c-brand-next)
50+
);
51+
--vp-home-hero-image-background-image: linear-gradient(
52+
-45deg,
53+
var(--vp-c-brand-1) 30%,
54+
var(--vp-c-brand-next)
55+
);
56+
--vp-home-hero-image-filter: blur(80px);
57+
}
58+
59+
@media (min-width: 640px) {
60+
:root {
61+
--vp-home-hero-image-filter: blur(120px);
62+
}
63+
}
64+
65+
@media (min-width: 960px) {
66+
:root {
67+
--vp-home-hero-image-filter: blur(120px);
68+
}
69+
}

.vitepress/theme/index.ts

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import DefaultTheme from 'vitepress/theme'
2+
3+
import './custom.css'
4+
5+
export default DefaultTheme

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
MIT License
1+
# MIT License
22

33
Copyright (c) 2024 Easy.Template
44

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
# easy-docs
2-
📗 Easy Template 官方文档
1+
# Easy Docs
2+
3+
Easy Template 官方文档

guide/index.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# 快速开始

index.md

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
layout: home
3+
4+
title: EasyTemplate
5+
titleTemplate: Out of the box Vue 3 template
6+
7+
hero:
8+
name: EasyTemplate
9+
text: 开箱即用的 Vue 3 移动、中后台模板
10+
tagline: 帮助你快速完成业务开发
11+
actions:
12+
- theme: brand
13+
text: 快速开始
14+
link: /guide/
15+
- theme: alt
16+
text: GitHub
17+
link: https://github.com/easy-temps
18+
image:
19+
src: /logo.svg
20+
alt: EasyTemplate
21+
22+
23+
features:
24+
- icon:
25+
title: 专注与您的业务
26+
details: 选择合适的模板,即可轻松创建移动 Web,和完善的中后台管理系统
27+
- icon: 🚀
28+
title: 享受 Vue 3 无可比拟的体验
29+
details: 集成了好用的 Vue 3 插件生态,快速进行业务代码的开发和构建
30+
- icon: 🚩
31+
title: Vant & Varlet 官方社区推荐
32+
details: Vue3 生态组件库作者推荐,比官方 Demo 更具特色 和 指导意义
33+
- icon: 📝
34+
title: 不断增加地 Demo 示例组件
35+
details: 国际化、暗黑模式、KeepAlive、Unocss、Echarts 等等
36+
---

nuxt3-vant-mobile/index.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# nuxt3 vant mobile
2+
3+
> ✍ 还未编写,敬请期待

0 commit comments

Comments
 (0)