Skip to content

Commit fa37f40

Browse files
committed
feat: init
0 parents  commit fa37f40

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+12119
-0
lines changed

.gitignore

+125
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
### Node template
2+
.idea
3+
.DS_Store
4+
dist
5+
6+
# Logs
7+
logs
8+
*.log
9+
npm-debug.log*
10+
yarn-debug.log*
11+
yarn-error.log*
12+
lerna-debug.log*
13+
.temp
14+
yarn.lock
15+
16+
# Diagnostic reports (https://nodejs.org/api/report.html)
17+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
18+
19+
# Runtime data
20+
pids
21+
*.pid
22+
*.seed
23+
*.pid.lock
24+
25+
# Directory for instrumented libs generated by jscoverage/JSCover
26+
lib-cov
27+
28+
# Coverage directory used by tools like istanbul
29+
coverage
30+
*.lcov
31+
32+
# nyc test coverage
33+
.nyc_output
34+
35+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
36+
.grunt
37+
38+
# Bower dependency directory (https://bower.io/)
39+
bower_components
40+
41+
# node-waf configuration
42+
.lock-wscript
43+
44+
# Compiled binary addons (https://nodejs.org/api/addons.html)
45+
build/Release
46+
47+
# Dependency directories
48+
node_modules/
49+
jspm_packages/
50+
51+
# Snowpack dependency directory (https://snowpack.dev/)
52+
web_modules/
53+
54+
# TypeScript cache
55+
*.tsbuildinfo
56+
57+
# Optional npm cache directory
58+
.npm
59+
60+
# Optional eslint cache
61+
.eslintcache
62+
63+
# Microbundle cache
64+
.rpt2_cache/
65+
.rts2_cache_cjs/
66+
.rts2_cache_es/
67+
.rts2_cache_umd/
68+
69+
# Optional REPL history
70+
.node_repl_history
71+
72+
# Output of 'npm pack'
73+
*.tgz
74+
75+
# Yarn Integrity file
76+
.yarn-integrity
77+
78+
# dotenv environment variables file
79+
.env
80+
.env.test
81+
82+
# parcel-bundler cache (https://parceljs.org/)
83+
.cache
84+
.parcel-cache
85+
86+
# Next.js build output
87+
.next
88+
out
89+
90+
# Nuxt.js build / generate output
91+
.nuxt
92+
dist
93+
94+
# Gatsby files
95+
.cache/
96+
# Comment in the assets line in if your project uses Gatsby and not Next.js
97+
# https://nextjs.org/blog/next-9-1#public-directory-support
98+
# assets
99+
100+
# vuepress build output
101+
.vuepress/dist
102+
103+
# Serverless directories
104+
.serverless/
105+
106+
# FuseBox cache
107+
.fusebox/
108+
109+
# DynamoDB Local files
110+
.dynamodb/
111+
112+
# TernJS port file
113+
.tern-port
114+
115+
# Stores VSCode versions used for testing VSCode extensions
116+
.vscode-test
117+
118+
# yarn v2
119+
.yarn/cache
120+
.yarn/unplugged
121+
.yarn/build-state.yml
122+
.yarn/install-state.gz
123+
.pnp.*
124+
125+
/.vuepress/dist/

.vuepress/config.ts

+137
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
import { defineConfig } from "vuepress/config";
2+
import navbar from "./navbar";
3+
import sidebar from "./sidebar";
4+
import footer from "./footer";
5+
import extraSideBar from "./extraSideBar";
6+
7+
const author = "SmallTeddy";
8+
const domain = "https://codefather.cn";
9+
const tags = ["程序员", "算法", "leetcode"];
10+
11+
export default defineConfig({
12+
title: "leetcode-practice-book",
13+
description: "A powerful practice platform for leetcode.Using any way you want to create questions.",
14+
head: [
15+
// 站点图标
16+
["link", { rel: "icon", href: "/favicon.ico" }],
17+
// SEO
18+
[
19+
"meta",
20+
{
21+
name: "keywords",
22+
content:
23+
"程序员鱼皮, 编程学习路线, 编程知识百科, Java, 编程导航, 前端, 开发, 编程分享, 项目, IT, 求职, 面经",
24+
},
25+
],
26+
// 百度统计
27+
[
28+
"script",
29+
{},
30+
`
31+
var _hmt = _hmt || [];
32+
(function() {
33+
var hm = document.createElement("script");
34+
hm.src = "https://hm.baidu.com/hm.js?2675818a983a3131404cee835018f016";
35+
var s = document.getElementsByTagName("script")[0];
36+
s.parentNode.insertBefore(hm, s);
37+
})();
38+
`,
39+
],
40+
],
41+
permalink: "/:slug",
42+
43+
// 监听文件变化,热更新
44+
extraWatchFiles: [".vuepress/*.ts", ".vuepress/sidebars/*.ts"],
45+
markdown: {
46+
// 开启代码块的行号
47+
lineNumbers: true,
48+
// 支持 4 级以上的标题渲染
49+
extractHeaders: ["h2", "h3", "h4", "h5", "h6"],
50+
},
51+
// @ts-ignore
52+
plugins: [
53+
["@vuepress/back-to-top"],
54+
// Google 分析
55+
[
56+
"@vuepress/google-analytics",
57+
{
58+
ga: "GTM-WVS9HM6W", // 补充自己的谷歌分析 ID,比如 UA-00000000-0
59+
},
60+
],
61+
["@vuepress/medium-zoom"],
62+
// https://github.com/lorisleiva/vuepress-plugin-seo
63+
[
64+
"seo",
65+
{
66+
siteTitle: (_, $site) => $site.title,
67+
title: ($page) => $page.title,
68+
description: ($page) =>
69+
$page.frontmatter.description || $page.description,
70+
author: (_, $site) => $site.themeConfig.author || author,
71+
tags: ($page) => $page.frontmatter.tags || tags,
72+
type: ($page) => "article",
73+
url: (_, $site, path) =>
74+
($site.themeConfig.domain || domain || "") + path,
75+
image: ($page, $site) =>
76+
$page.frontmatter.image &&
77+
(($site.themeConfig.domain &&
78+
!$page.frontmatter.image.startsWith("http")) ||
79+
"") + $page.frontmatter.image,
80+
publishedAt: ($page) =>
81+
$page.frontmatter.date && new Date($page.frontmatter.date),
82+
modifiedAt: ($page) => $page.lastUpdated && new Date($page.lastUpdated),
83+
},
84+
],
85+
// https://github.com/ekoeryanto/vuepress-plugin-sitemap
86+
[
87+
"sitemap",
88+
{
89+
hostname: domain,
90+
},
91+
],
92+
// https://github.com/IOriens/vuepress-plugin-baidu-autopush
93+
["vuepress-plugin-baidu-autopush"],
94+
// https://github.com/zq99299/vuepress-plugin/tree/master/vuepress-plugin-tags
95+
["vuepress-plugin-tags"],
96+
// https://github.com/znicholasbrown/vuepress-plugin-code-copy
97+
[
98+
"vuepress-plugin-code-copy",
99+
{
100+
successText: "代码已复制",
101+
},
102+
],
103+
// https://github.com/webmasterish/vuepress-plugin-feed
104+
[
105+
"feed",
106+
{
107+
canonical_base: domain,
108+
count: 10000,
109+
// 需要自动推送的文档目录
110+
posts_directories: [],
111+
},
112+
],
113+
// https://github.com/tolking/vuepress-plugin-img-lazy
114+
["img-lazy"],
115+
],
116+
// 主题配置
117+
themeConfig: {
118+
logo: "/logo.png",
119+
nav: navbar,
120+
sidebar,
121+
lastUpdated: "最近更新",
122+
123+
// GitHub 仓库位置
124+
repo: "wh131462/leetcode-practice",
125+
docsBranch: "master",
126+
127+
// 编辑链接
128+
editLinks: true,
129+
editLinkText: "完善页面",
130+
131+
// @ts-ignore
132+
// 底部版权信息
133+
footer,
134+
// 额外右侧边栏
135+
extraSideBar,
136+
},
137+
});

.vuepress/extraSideBar.ts

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/**
2+
* 额外右侧边栏
3+
*/
4+
export default [
5+
{
6+
title: "手机看",
7+
icon: "/icon/mobile.png",
8+
popoverTitle: "微信扫一扫",
9+
popoverUrl:
10+
"/qrcode-leetcode-practice.png",
11+
popoverDesc: "可以手机看或分享至朋友圈",
12+
},
13+
{
14+
title: "交流群",
15+
icon: "/icon/weixin.png",
16+
popoverTitle:
17+
'<span style="font-size:0.8rem;font-weight:bold;">扫码添加 <span style="color:red;">回复 leetcode</span>,拉你进专属编程学习交流群</span>',
18+
popoverUrl:
19+
"/qrcode-codenavhelper.png",
20+
},
21+
{
22+
title: "支持我",
23+
icon: "/icon/dianzan.png",
24+
popoverTitle:
25+
' <span style="font-size:0.8rem;font-weight:bold;">鼓励和赞赏我</span>',
26+
popoverUrl:
27+
"/qrcode-thumb.png",
28+
popoverDesc:
29+
"感谢您的支持,作者头发++",
30+
},
31+
];

.vuepress/footer.ts

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/**
2+
* 底部版权信息
3+
*/
4+
export default {
5+
friendLinks: [
6+
{
7+
label: "站长 - SmallTeddy",
8+
// icon: "/icon/user.svg",
9+
href: "https://github.com/SmallTeddy",
10+
},
11+
{
12+
label: "wh131462",
13+
href: "https://github.com/wh131462",
14+
},
15+
{
16+
label: "hedwigfang",
17+
href: "https://github.com/Hedwig-Fang",
18+
}
19+
],
20+
copyright: {
21+
href: "https://beian.miit.gov.cn/",
22+
name: "沪ICP备19026706号-6",
23+
},
24+
};

.vuepress/navbar.ts

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import {NavItem} from "vuepress/config";
2+
3+
export default [
4+
{
5+
text: "快速开始",
6+
link: '/开始/'
7+
},
8+
] as NavItem[];
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
a4b32671d3703c3969a3d20817fda860

.vuepress/public/favicon.ico

264 KB
Binary file not shown.

.vuepress/public/icon/ai.svg

+1
Loading

.vuepress/public/icon/copyright.svg

+1
Loading

.vuepress/public/icon/dianzan.png

944 Bytes
Loading

.vuepress/public/icon/message.svg

+1
Loading

.vuepress/public/icon/mobile.png

388 Bytes
Loading

.vuepress/public/icon/resume.svg

+1
Loading

.vuepress/public/icon/sketch.svg

+1
Loading

.vuepress/public/icon/user.svg

+1
Loading

.vuepress/public/icon/weixin.png

721 Bytes
Loading

.vuepress/public/icon/xiazai.png

739 Bytes
Loading

.vuepress/public/icon/xingqiu.png

1.37 KB
Loading
94.7 KB
Loading
159 KB
Loading
58.4 KB
Loading

.vuepress/public/images/lc-cli-h.png

504 KB
Loading
Loading

.vuepress/public/logo.png

2.85 KB
Loading
162 KB
Loading
2.56 KB
Loading

.vuepress/public/qrcode-thumb.png

65.5 KB
Loading

.vuepress/sidebar.ts

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import {SidebarConfig4Multiple} from "vuepress/config";
2+
3+
import roadmapSideBar from "./sidebars/roadmapSideBar";
4+
// @ts-ignore
5+
export default {
6+
"/开始/": roadmapSideBar,
7+
// 降级,默认根据文章标题渲染侧边栏
8+
"/": "auto",
9+
} as SidebarConfig4Multiple;

.vuepress/sidebars/roadmapSideBar.ts

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
export default [
2+
"",
3+
{
4+
title: "开始",
5+
collapsable: false,
6+
children: [
7+
"简介.md",
8+
"快速上手.md",
9+
],
10+
},
11+
];

0 commit comments

Comments
 (0)