Skip to content

Commit dddf741

Browse files
committed
添加 vuepress
1 parent 70c9713 commit dddf741

33 files changed

+15902
-9
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
.cache
3+
.temp

docs/.vuepress/config.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import { defineHopeConfig } from "vuepress-theme-hope";
2+
import themeConfig from "./themeConfig";
3+
4+
export default defineHopeConfig({
5+
base: "/",
6+
7+
dest: "./dist",
8+
9+
head: [
10+
[
11+
"link",
12+
{
13+
rel: "stylesheet",
14+
href: "//at.alicdn.com/t/font_2410206_mfj6e1vbwo.css",
15+
},
16+
],
17+
],
18+
19+
locales: {
20+
"/": {
21+
lang: "zh-CN",
22+
},
23+
},
24+
25+
themeConfig,
26+
});

docs/.vuepress/navbar.ts

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
import { defineNavbarConfig } from "vuepress-theme-hope";
2+
3+
export default defineNavbarConfig([
4+
"/",
5+
"/home",
6+
{ text: "使用指南", icon: "creative", link: "/guide/" },
7+
{
8+
text: "博文",
9+
icon: "edit",
10+
prefix: "/posts/",
11+
children: [
12+
{
13+
text: "文章 1-4",
14+
icon: "edit",
15+
prefix: "article/",
16+
children: [
17+
{ text: "文章 1", icon: "edit", link: "article1" },
18+
{ text: "文章 2", icon: "edit", link: "article2" },
19+
"article3",
20+
"article4",
21+
],
22+
},
23+
{
24+
text: "文章 5-12",
25+
icon: "edit",
26+
children: [
27+
{
28+
text: "文章 5",
29+
icon: "edit",
30+
link: "article/article5",
31+
},
32+
{
33+
text: "文章 6",
34+
icon: "edit",
35+
link: "article/article6",
36+
},
37+
"article/article7",
38+
"article/article8",
39+
],
40+
},
41+
{ text: "文章 9", icon: "edit", link: "article9" },
42+
{ text: "文章 10", icon: "edit", link: "article10" },
43+
"article11",
44+
"article12",
45+
],
46+
},
47+
{
48+
text: "主题文档",
49+
icon: "note",
50+
link: "https://vuepress-theme-hope.github.io/v2/zh/",
51+
},
52+
]);

docs/.vuepress/public/favicon.ico

66.1 KB
Binary file not shown.

docs/.vuepress/public/logo.png

92 KB
Loading

docs/.vuepress/public/logo.svg

Lines changed: 1 addition & 0 deletions
Loading

docs/.vuepress/sidebar.ts

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import { defineSidebarConfig } from "vuepress-theme-hope";
2+
3+
export default defineSidebarConfig([
4+
"",
5+
"home",
6+
"slide",
7+
{
8+
text: "如何使用",
9+
icon: "creative",
10+
prefix: "guide/",
11+
link: "guide/",
12+
children: "structure",
13+
},
14+
{
15+
text: "文章",
16+
icon: "note",
17+
prefix: "posts/",
18+
children: [
19+
{
20+
text: "文章 1-4",
21+
icon: "note",
22+
collapsable: true,
23+
prefix: "article/",
24+
children: ["article1", "article2", "article3", "article4"],
25+
},
26+
{
27+
text: "文章 5-12",
28+
icon: "note",
29+
children: [
30+
{
31+
text: "文章 5-8",
32+
icon: "note",
33+
collapsable: true,
34+
prefix: "article/",
35+
children: ["article5", "article6", "article7", "article8"],
36+
},
37+
{
38+
text: "文章 9-12",
39+
icon: "note",
40+
children: ["article9", "article10", "article11", "article12"],
41+
},
42+
],
43+
},
44+
],
45+
},
46+
]);

docs/.vuepress/styles/index.scss

Whitespace-only changes.

docs/.vuepress/styles/palette.scss

Whitespace-only changes.

docs/.vuepress/themeConfig.ts

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
import { defineThemeConfig } from "vuepress-theme-hope";
2+
import navbar from "./navbar";
3+
import sidebar from "./sidebar";
4+
5+
export default defineThemeConfig({
6+
hostname: "https://vuepress-theme-hope-v2-demo.mrhope.site",
7+
8+
author: {
9+
name: "Mr.Hope",
10+
url: "https://mrhope.site",
11+
},
12+
13+
iconPrefix: "iconfont icon-",
14+
15+
logo: "/logo.svg",
16+
17+
repo: "https://github.com/vuepress-theme-hope/vuepress-theme-hope",
18+
19+
docsDir: "demo/src",
20+
21+
// navbar
22+
navbar: navbar,
23+
24+
// sidebar
25+
sidebar: sidebar,
26+
27+
footer: "默认页脚",
28+
29+
displayFooter: true,
30+
31+
pageInfo: ["Author", "Original", "Date", "Category", "Tag", "ReadingTime"],
32+
33+
blog: {
34+
description: "一个前端开发者",
35+
intro: "/intro.html",
36+
medias: {
37+
Baidu: "https://example.com",
38+
Bitbucket: "https://example.com",
39+
Dingding: "https://example.com",
40+
Discord: "https://example.com",
41+
Dribbble: "https://example.com",
42+
Email: "https://example.com",
43+
Evernote: "https://example.com",
44+
Facebook: "https://example.com",
45+
Flipboard: "https://example.com",
46+
Gitee: "https://example.com",
47+
GitHub: "https://example.com",
48+
Gitlab: "https://example.com",
49+
Gmail: "https://example.com",
50+
Instagram: "https://example.com",
51+
Lines: "https://example.com",
52+
Linkedin: "https://example.com",
53+
Pinterest: "https://example.com",
54+
Pocket: "https://example.com",
55+
QQ: "https://example.com",
56+
Qzone: "https://example.com",
57+
Reddit: "https://example.com",
58+
Rss: "https://example.com",
59+
Steam: "https://example.com",
60+
Twitter: "https://example.com",
61+
Wechat: "https://example.com",
62+
Weibo: "https://example.com",
63+
Whatsapp: "https://example.com",
64+
Youtube: "https://example.com",
65+
Zhihu: "https://example.com",
66+
},
67+
},
68+
69+
encrypt: {
70+
config: {
71+
"/guide/encrypt.html": ["1234"],
72+
},
73+
},
74+
75+
plugins: {
76+
blog: {
77+
autoExcerpt: true,
78+
},
79+
80+
// 你也可以使用 Waline
81+
comment: {
82+
type: "giscus",
83+
repo: "vuepress-theme-hope/giscus-discussions",
84+
repoId: "R_kgDOG_Pt2A",
85+
category: "Announcements",
86+
categoryId: "DIC_kwDOG_Pt2M4COD69",
87+
},
88+
89+
mdEnhance: {
90+
enableAll: true,
91+
presentation: {
92+
plugins: ["highlight", "math", "search", "notes", "zoom"],
93+
},
94+
},
95+
},
96+
});

docs/README.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
---
2+
home: true
3+
layout: Blog
4+
icon: home
5+
title: 博客主页
6+
heroImage: /logo.svg
7+
heroText: 你博客的名称
8+
heroFullScreen: true
9+
tagline: 你可以在这里放置你的口号与标语
10+
projects:
11+
- icon: project
12+
name: 项目名称
13+
desc: 项目详细描述
14+
link: https://你的项目链接
15+
16+
- icon: link
17+
name: 链接名称
18+
desc: 链接详细描述
19+
link: https://链接地址
20+
21+
- icon: book
22+
name: 书籍名称
23+
desc: 书籍详细描述
24+
link: https://你的书籍链接
25+
26+
- icon: article
27+
name: 文章名称
28+
desc: 文章详细描述
29+
link: https://你的文章链接
30+
31+
- icon: friend
32+
name: 伙伴名称
33+
desc: 伙伴详细介绍
34+
link: https://你的伙伴链接
35+
36+
- icon: /logo.svg
37+
name: 自定义项目
38+
desc: 自定义详细介绍
39+
link: https://你的自定义链接
40+
41+
footer: 自定义你的页脚文字
42+
---
43+
44+
这是一个博客主页。
45+
46+
要使用此布局,你应该在页面前端设置 `layout: Blog``home: true`
47+
48+
相关配置文档请见 [博客主页](https://vuepress-theme-hope.github.io/v2/zh/guide/blog/home/)

docs/bottom.md

Lines changed: 0 additions & 9 deletions
This file was deleted.

docs/guide/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
index: false
3+
icon: creative
4+
category:
5+
- 使用指南
6+
---
7+
8+
# 主要功能与配置演示
9+
10+
- [页面展示](page.md)
11+
12+
- [Markdown 展示](markdown.md)
13+
14+
- [禁用展示](disable.md)
15+
16+
- [加密展示](encrypt.md)

docs/guide/disable.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
index: 3
3+
title: 组件禁用
4+
icon: config
5+
category:
6+
- 使用指南
7+
tag:
8+
- 禁用
9+
10+
navbar: false
11+
sidebar: false
12+
13+
breadcrumb: false
14+
pageInfo: false
15+
contributors: false
16+
editLink: false
17+
lastUpdated: false
18+
prev: false
19+
next: false
20+
comment: false
21+
footer: false
22+
23+
backtotop: false
24+
---
25+
26+
你可以通过设置页面的 Frontmatter,在页面禁用一些功能。
27+
28+
<!-- more -->
29+
30+
本页面应当禁用了:
31+
32+
- 导航栏
33+
- 侧边栏
34+
- 路径导航
35+
- 页面信息
36+
- 贡献者
37+
- 编辑此页链接
38+
- 更新时间
39+
- 上一篇/下一篇 链接
40+
- 评论
41+
- 页脚
42+
- 返回顶部按钮

docs/guide/encrypt.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
icon: lock
3+
category:
4+
- 使用指南
5+
tag:
6+
- 文章加密
7+
---
8+
9+
# 密码加密的文章
10+
11+
实际的文章内容。
12+
13+
段落 1 文字段落 1 文字段落 1 文字段落 1 文字段落 1 文字段落 1 文字段落 1 文字段落 1 文字段落 1 文字段落 1 文字段落 1 文字段落 1 文字。
14+
15+
段落 2 文字段落 2 文字段落 2 文字段落 2 文字段落 2 文字段落 2 文字段落 2 文字段落 2 文字段落 2 文字段落 2 文字段落 2 文字段落 2 文字段落 2 文字段落 2 文字。

0 commit comments

Comments
 (0)