1
0
mirror of https://github.com/142vip/408CSFamily.git synced 2026-04-05 11:38:27 +08:00

feat: 修改目录结构,优化部署脚本

This commit is contained in:
妹妹下雨回不去
2023-02-06 17:56:14 +08:00
parent 1dae053473
commit aa1280912a
44 changed files with 2267 additions and 828 deletions

57
.eslintrc.js Normal file
View File

@@ -0,0 +1,57 @@
module.exports = {
env: {
browser: true,
commonjs: true,
es2021: false,
},
extends: [
"airbnb-base",
],
rules: {
"array-callback-return": "error",
indent: ["error", 4, { SwitchCase: 1 }],
"block-spacing": "error",
"brace-style": ["error", "1tbs"],
camelcase: ["error", { properties: "never" }],
"callback-return": ["error", ["cb", "callback", "next"]],
"comma-spacing": "error",
"comma-style": ["error", "last"],
"consistent-return": "error",
curly: ["error", "all"],
"default-case": "error",
"dot-notation": ["error", { allowKeywords: false }],
"eol-last": "error",
eqeqeq: "error",
"guard-for-in": "error",
"key-spacing": ["error", { beforeColon: false, afterColon: true }],
"keyword-spacing": "error",
"lines-around-comment": ["error", {
beforeBlockComment: true,
afterBlockComment: false,
beforeLineComment: true,
afterLineComment: false,
}],
"new-cap": "error",
"newline-after-var": ["error", "never"],
"new-parens": "error",
"no-array-constructor": "error",
"no-invalid-this": "error",
"no-multi-spaces": "error",
"no-redeclare": "error",
"no-return-assign": "error",
"no-spaced-func": "error",
"no-trailing-spaces": "error",
semi: "error",
"semi-spacing": "error",
quotes: ["error", "double"],
"space-before-function-paren": ["error", "never"],
"space-in-parens": "error",
"space-infix-ops": "error",
"space-unary-ops": ["error", { words: true, nonwords: false }],
"spaced-comment": "error",
yoda: ["error", "never"],
"no-mixed-requires": "error",
"handle-callback-err": ["error", "err"],
},
};

View File

@@ -1,5 +1,6 @@
## 注意vite构建需要支持node14以上安装node16较为稳妥
FROM registry.cn-hangzhou.aliyuncs.com/142vip/node:16.12.0-alpine AS build_base
LABEL version="Beta1.0" description="408CSFamily合集"
LABEL author="【Github&公众号】Rong姐姐好可爱" email="fairy@2925.com"

View File

@@ -1,4 +1,7 @@
import { hopeTheme } from "vuepress-theme-hope";
import navbar from "./config/navbar";
import sidebar from "./config/sidebar";
import {searchProPlugin} from "vuepress-plugin-search-pro";
export default {
title: "计算机应试全家桶",
@@ -23,6 +26,11 @@ export default {
],
// 参考主题https://theme-hope.vuejs.press/zh/config/intro.html#%E9%85%8D%E7%BD%AE%E6%A6%82%E5%BF%B5
theme: hopeTheme({
darkmode:"toggle",
// 支持全屏
fullscreen: true,
// 纯净模式
// pure: true,
hostname:'https://408.142vip.cn',
author:{
name:'ChuFan',
@@ -31,26 +39,32 @@ export default {
},
favicon:"/408_favicon.ico",
logo: "/assets/408_logo.png",
navbar: require("./config/navbar/index"), // 注意这个关键字有所改变
sidebar: require("./config/sidebar/index"),
navbar: navbar,
// 导航栏布局
navbarLayout:{
start: ["Brand"],
center: ["Links"],
end: ["Language","Search","Repo", "Outlook", ]
},
sidebar: sidebar,
// sidebar: "heading",
// 主题布局选项
repo: "https://github.com/mmdapl/408CSFamily",
logoDark:"/assets/408_logo.png",
// 博客配置
blog_:{
blog:{
name:'测试',
avatar:'',
description:'',
intro:'',
roundAvatar:true,
timeline:"时间轴的顶部文字",
// articleInfo:"",
// medias:{
// "BiliBili": "哔哩哔哩"
// }
articleInfo:"",
medias:{
"BiliBili": "https://space.bilibili.com/350937042?spm_id_from=333.1007.0.0"
}
},
lastUpdated: true,
lastUpdatedText: "最近更新",
@@ -66,82 +80,32 @@ export default {
searchMaxSuggestions: 10,
plugins: {
// 开启博客功能
// blog:true,
blog:true,
// 代码块
mdEnhance: {
codetabs: true,
},
copyCode: {
showInMobile:true
},
},
}),
// plugins: [
// // 全文搜索 参考配置https://github.com/vuepress/vuepress-next/blob/main/docs/.vuepress/config.ts
// ['@vuepress/docsearch',
// {
// apiKey: '<API_KEY>',
// indexName: '<INDEX_NAME>',
// locales: {
// '/': {
// placeholder: '搜索一下',
// translations: {
// button: {
// buttonText: '搜索一下',
// buttonAriaLabel: '搜索一下',
// },
// modal: {
// searchBox: {
// resetButtonTitle: '清除查询条件',
// resetButtonAriaLabel: '清除查询条件',
// cancelButtonText: '取消',
// cancelButtonAriaLabel: '取消'
// },
// startScreen: {
// recentSearchesTitle: '搜索历史',
// noRecentSearchesText: '没有搜索历史',
// saveRecentSearchButtonTitle: '保存至搜索历史',
// removeRecentSearchButtonTitle: '从搜索历史中移除',
// favoriteSearchesTitle: '收藏',
// removeFavoriteSearchButtonTitle: '从收藏中移除',
// },
// errorScreen: {
// titleText: '无法获取结果',
// helpText: '你可能需要检查你的网络连接',
// },
// footer: {
// selectText: '查询',
// selectKeyAriaLabel: 'Enter key',
// navigateText: '切换',
// navigateUpKeyAriaLabel: 'Arrow up',
// navigateDownKeyAriaLabel: 'Arrow down',
// closeText: '关闭',
// closeKeyAriaLabel: 'Escape key',
// searchByText: '技术支持',
// },
// noResultsScreen: {
// noResultsText: '无法找到相关结果',
// suggestedQueryText: '你可以尝试查询',
// openIssueText: '你认为该查询应该有结果?',
// openIssueLinkText: '点击反馈',
// },
// },
// }
// }
// }
// }],
// // other plugins
// // [
// // // 本地全文搜索
// // '@vuepress/plugin-search',
// // {
// // locales: {
// // '/': {
// // placeholder: '搜索',
// // },
// // '/zh/': {
// // placeholder: '搜索',
// // },
// // },
// // maxSuggestions: 10 // 显示最大搜索
// // },
// // ],
// ]
// 插件配置
plugins: [
searchProPlugin({
// 索引全部内容
indexContent: true,
// 为分类和标签添加索引
customFields: [
{
getter: (page) => page.frontmatter.category,
formatter: "分类:$content",
},
{
getter: (page) => page.frontmatter.tag,
formatter: "标签:$content",
},
],
}),
],
};

View File

@@ -1,73 +0,0 @@
module.exports = [
{
text: '首页',
link: '/'
},
{
text: "恶补算法",
// link: "/DS/coding/algorithm"
children: [{
text: '课本习题',
link: '/'
}, {
text: '刷题笔记',
link: '/todo'
}, {
text: '在线刷题',
children: [{
text: '杭电OJ', link: 'http://acm.hdu.edu.cn/'
},
{
text: '牛客网', link: 'https://www.nowcoder.com/'
}, {
text: 'LeetCode', link: 'https://leetcode-cn.com/'
}]
}]
},
{
text: "数据结构",
link: "/DS/basic_introduction"
},
{
text: "操作系统",
link: "/OS/"
},
{
text: "计算机组成原理",
link: "/CCP/"
},
{
text: "计算机网络",
link: "/CN/"
}, {
text: '其他资料',
children: [{
text: '考研相关',
children: [{
text: '111',
link: '/333'
}]
}, {
text: "思维导图",
children: [{
text: '数据结构',
link: '/NoteMap/DS_Map'
}, {
text: '操作系统',
link: '/NoteMap/OS_Map'
}, {
text: '计算机组成原理',
link: '/NoteMap/CCP_Map'
}, {
text: '计算机网络',
link: '/NoteMap/CN_Map'
}]
}]
},
{
text: "大事记",
link: "/Big_Event_History/"
},
];

View File

@@ -1,4 +1,5 @@
module.exports = [
// 参考https://theme-hope.vuejs.press/zh/guide/layout/navbar.html#%E5%AD%97%E7%AC%A6%E4%B8%B2%E6%A0%BC%E5%BC%8F
export default [
{
text: '主页',
link: '/'
@@ -6,7 +7,7 @@ module.exports = [
{
text: "算法恶补",
children: [{
text: '习题练手',
text: '习题狂刷',
link: '/algorithm/topic_practice'
}, {
text: '刷题笔记',

View File

@@ -1,18 +0,0 @@
module.exports = {
// "/category/": require("../../category/sidebar_contents"),
// "/DataStructure/": require("../../category/sidebar_contents"),
"/ds": require("../../ds/sidebar_contents"),
// "/OS": [
// {
// text: 'VuePress Reference',
// collapsible: true,
// children: ['/reference/cli.md', '/reference/config.md'],
// },
// {
// text: 'Bundlers Reference',
// collapsible: true,
// children: ['/reference/bundler/vite.md', '/reference/bundler/webpack.md'],
// },
// ],
};

View File

@@ -1,4 +1,4 @@
module.exports = [
export default [
{
text: '基础入门',
link: "/ds/basic_introduction",

View File

@@ -0,0 +1,3 @@
export default[
]

View File

@@ -1,52 +1,53 @@
module.exports = [
{
export default [
{
text: '基础入门',
link: "/ds/basic_introduction",
link: "/ds/basic-introduction",
collapsible: false,
children: [{
text: '1.1 基本概念',
link: '/ds/basic_introduction/1.basic_concepts.md'
link: '/ds/basic-introduction/1.basic_concepts.md'
}, {
text: '1.2 数据结构三要素',
link: '/ds/basic_introduction/2.three_elements_of_data_structure.md'
link: '/ds/basic-introduction/2.three_elements_of_data_structure.md'
}, {
text: '1.3 算法和算法评价',
link: '/ds/basic_introduction/3.algorithm_and_algorithm_evaluation.md'
link: '/ds/basic-introduction/3.algorithm_and_algorithm_evaluation.md'
}],
},
{
text: '线性表',
collapsible: true,
link: "/ds/linear_table",
link: "/ds/linear-table",
children: [{
text: '2.1 基础概念和操作',
link: '/ds/linear_table/1.basic_concept_and_operation.md'
link: '/ds/linear-table/1.basic_concept_and_operation.md'
}, {
text: '2.2 线性表的顺序表示',
link: '/ds/linear_table/2.sequential_representation.md'
link: '/ds/linear-table/2.sequential_representation.md'
}, {
text: '2.3 基础概念和操作',
link: '/ds/linear_table/3.chain_representation.md'
link: '/ds/linear-table/3.chain_representation.md'
}, {
text: '2.4 基础概念和操作',
link: '/ds/linear_table/4.double_linked_list.md'
link: '/ds/linear-table/4.double_linked_list.md'
}, {
text: '2.5 基础概念和操作',
link: '/ds/linear_table/5.circular_list.md'
link: '/ds/linear-table/5.circular_list.md'
}, {
text: '2.6 基础概念和操作',
link: '/ds/linear_table/6.static_linked_list.md'
link: '/ds/linear-table/6.static_linked_list.md'
}, {
text: '2.7 基础概念和操作',
link: '/ds/linear_table/7.comparison_of_sequential_list_and_linked_list.md'
link: '/ds/linear-table/7.comparison_of_sequential_list_and_linked_list.md'
}, {
text: '2.8 存储结构的选取',
link: '/ds/linear_table/8.selection_of_storage_structure.md'
link: '/ds/linear-table/8.selection_of_storage_structure.md'
}, {
text: '2.9 零碎知识补充',
link: '/ds/linear_table/9.piecemeal_knowledge_supplement.md'
link: '/ds/linear-table/9.piecemeal_knowledge_supplement.md'
}],
}, {
},
{
text: "栈和队列",
link: "/ds/栈和队列/",
collapsible: true,
@@ -76,4 +77,4 @@ module.exports = [
link: '/ds/栈和队列/8.特殊矩阵的压缩存储.md'
}]
}
]
]

View File

@@ -1,8 +1,7 @@
module.exports = {
// "/category/": require("../../category/sidebar_contents"),
// "/DataStructure/": require("../../category/sidebar_contents"),
"/ds": require("./ds_content.js"),
"/ds/coding": require("./algorithm_content")
import dsSidebar from "./ds.sidebar";
import algorithmSidebar from "./algorithm.sidebar";
export default{
"/ds": dsSidebar,
"/ds/coding": algorithmSidebar
};

View File

@@ -0,0 +1,2 @@
export default[]

View File

@@ -1,17 +0,0 @@
/*
* @Description:
* @Version: Beta1.0
* @Author: 【B站&公众号】Rong姐姐好可爱
* @Date: 2022-04-24 08:37:12
* @LastEditors: 【B站&公众号】Rong姐姐好可爱
* @LastEditTime: 2022-04-24 08:37:13
*/
const { path } = require('@vuepress/utils')
module.exports = {
name: 'vuepress-theme-local',
extends: '@vuepress/theme-default',
layouts: {
Layout: path.resolve(__dirname, 'layouts/Layout.vue'),
},
}

View File

@@ -1,35 +0,0 @@
<!--
* @Description:
* @Version: Beta1.0
* @Author: B站&公众号Rong姐姐好可爱
* @Date: 2022-04-24 08:37:48
* @LastEditors: B站&公众号Rong姐姐好可爱
* @LastEditTime: 2022-04-24 08:47:23
-->
<script setup>
import ParentLayout from '@vuepress/theme-default/lib/client/layouts/Layout.vue'</script>
<template>
<ParentLayout>
<template #page-bottom>
<div class="my-footer">自定义页脚</div>
</template>
<template #navbar-before>
<div class="my-footer">搜索框</div>
</template>
<template #sidebar-top>
<div class="sidebar-top">广告区域</div>
</template>
</ParentLayout>
</template>
<style lang="css">
.my-footer {
text-align: center;
}
</style>

View File

@@ -1,17 +1,16 @@
---
home: true
heroImage: https://static01.imgkr.com/temp/f0108d7c178b4ce196e43ebec14fbf23.png
heroImage: http://vuejs.org/images/logo.png
heroImageDark: http://vuejs.org/images/logo.png
heroText: 计算机应试全家桶
externalLinkIcon: false
tagline: 磨刀不误砍柴工、读完硕士再打工,笔记内容持续更新...
actions:
- text: 快速开始→
link: /guide/
type: primary
- text: 工作机会
link: /gangg
link: /work/
type: secondary
features:
- title: 基础概览
@@ -20,7 +19,6 @@ features:
details: 官方插件的基础上抽象、封装出适合自己功能的plus插件能够快速集成、使用在新的项目中。
- title: 反复反复
details: 通过以项目Demo示例的方式对框架常用的功能进行Code编写和整理提供有效且易用的代码封装。
footerColumn: 3
footerWrap:
- headline: 相关资料
@@ -70,12 +68,11 @@ footerWrap:
- title: 哔哩哔哩
link: https://space.bilibili.com/350937042
details: 不定期更新
# <a href="https://tongji.baidu.com/web/welcome/login" target="_blank">百度统计</a>
footer: Copyrights © 2015-2021 妍荣姑娘网络工作室 | <a href="https://github.com/mmdapl" target="_blank">Chu·Fan</a>
footer: <a href="https://tongji.baidu.com/web/welcome/login" target="_blank">百度统计</a> Copyrights © 2015-2021 妍荣姑娘网络工作室 | <a href="https://github.com/mmdapl" target="_blank">储凡</a>
---
---
### 本地浏览【推荐】
@@ -90,7 +87,7 @@ footer: Copyrights © 2015-2021 妍荣姑娘网络工作室 | <a href="https:
git clone https://github.com/mmdapl/408CSFamily.git
## 进入408CSFamily文件夹中
cd 408CSFamily/
cd 408CSFamily
## tips: 如果本地已经clone过仓库建议执行pull指令获取最新
git pull
@@ -99,6 +96,7 @@ git pull
pnpm install
## 执行dev指令本地启动项目打开http://localhost:4200即可访问文档
pnpm dev
```
@@ -110,7 +108,7 @@ pnpm dev
git clone https://github.com/mmdapl/408CSFamily.git
## 进入408CSFamily文件夹中
cd 408CSFamily/
cd 408CSFamily
## tips: 如果本地已经clone过仓库建议执行pull指令获取最新
git pull
@@ -156,8 +154,6 @@ yarn run dev
### 提交记录
---

View File

@@ -1,11 +1,3 @@
<!--
* @Description:
* @Version: Beta1.0
* @Author: 【B站&公众号】Rong姐姐好可爱
* @Date: 2022-04-21 23:43:19
* @LastEditors: 【B站&公众号】Rong姐姐好可爱
* @LastEditTime: 2022-04-23 18:18:09
-->
## 网站大事记

View File

@@ -1,10 +0,0 @@
/*
* @Description: 计算机组成原理 导航栏
* @Version: Beta1.0
* @Author: 【B站&公众号】Rong姐姐好可爱
* @Date: 2022-04-21 23:19:09
* @LastEditors: 【B站&公众号】Rong姐姐好可爱
* @LastEditTime: 2022-04-21 23:19:10
*/
module.exports=[
]

View File

@@ -1,12 +1,8 @@
<!--
* @Description:
* @Version: Beta1.0
* @Author: 【B站&公众号】Rong姐姐好可爱
* @Date: 2021-03-08 10:10:27
* @LastEditors: 【B站&公众号】Rong姐姐好可爱
* @LastEditTime: 2022-04-21 23:33:59
-->
---
footer: <a href="https://github.com/Mister-Hope">Mr.Hope</a>
copyrightText: MIT LICENSE
---
## 计算机网络
doing

File diff suppressed because it is too large Load Diff

View File

Before

Width:  |  Height:  |  Size: 650 KiB

After

Width:  |  Height:  |  Size: 650 KiB

View File

Before

Width:  |  Height:  |  Size: 2.0 MiB

After

Width:  |  Height:  |  Size: 2.0 MiB

View File

@@ -1,10 +0,0 @@
<!--
* @Description: 计算机网络思维导图
* @Version: Beta1.0
* @Author: 【B站&公众号】Rong姐姐好可爱
* @Date: 2022-04-21 23:21:16
* @LastEditors: 【B站&公众号】Rong姐姐好可爱
* @LastEditTime: 2022-04-21 23:21:17
-->
## 计算机网络思维导图

View File

@@ -1,10 +0,0 @@
<!--
* @Description: 数据结构思维导图
* @Version: Beta1.0
* @Author: 【B站&公众号】Rong姐姐好可爱
* @Date: 2022-04-21 23:21:49
* @LastEditors: 【B站&公众号】Rong姐姐好可爱
* @LastEditTime: 2022-04-21 23:21:49
-->
## 数据结构思维导图

2
docs/note-map/cn-map.md Normal file
View File

@@ -0,0 +1,2 @@
## 计算机网络思维导图

1
docs/note-map/ds-map.md Normal file
View File

@@ -0,0 +1 @@
## 数据结构思维导图

View File

@@ -1,15 +1,6 @@
---
title: Readme
title: 操作系统
---
<!--
* @Description:
* @Version: Beta1.0
* @Author: 【B站&公众号】Rong姐姐好可爱
* @Date: 2021-03-08 10:10:52
* @LastEditors: 【B站&公众号】Rong姐姐好可爱
* @LastEditTime: 2022-04-21 23:13:11
-->
## 操作系统
doing

View File

@@ -1,6 +1,7 @@
{
"name": "408CSFamily",
"description": "专业代号408 ,计算机基础知识点合集",
"version": "0.0.0",
"main": "index.js",
"scripts": {
"dev": "vuepress dev docs",
@@ -10,15 +11,22 @@
"github": "bash scripts/page_deploy.sh",
"clean": "find . -name \"node_modules\" -type d -exec rm -rf '{}' +"
},
"author":{
"author": {
"name": "Chu Fan",
"email": "fairy_408@2925.com",
"url": "https://github.com/142vip"
},
"devDependencies": {
"@vuepress/client": "2.0.0-beta.60",
"eslint": "8",
"eslint-config-airbnb": "^19.0.4",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-react-hooks": "^4.3.0",
"vue": "^3.2.45",
"vuepress": "2.0.0-beta.60",
"vuepress-plugin-search-pro": "^2.0.0-beta.172",
"vuepress-theme-hope": "^2.0.0-beta.171"
},
"license": "MIT"

1137
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -20,6 +20,9 @@ readonly repoAddress="registry.cn-hangzhou.aliyuncs.com/142vip/doc_book:"
## 版本号
version=${1}
## 镜像名称
imageTagName=${repoAddress}${projectName}-${version}
prepare_check(){
if test -z "${version}";then
@@ -30,7 +33,7 @@ prepare_check(){
run(){
echo -e "${successLogger}---------------- shell ${projectName} start ---------------- "
docker build -t "${repoAddress}${projectName}-${version}" .
docker build -t "${imageTagName}" .
echo -e "${successLogger}---------------- shell ${projectName} end ---------------- "
push_docker_image
}
@@ -40,14 +43,14 @@ run(){
## 推送镜像
push_docker_image(){
if [[ "$(docker images -q "${repoAddress}${projectName}-${version}" 2> /dev/null)" != "" ]];
if [[ "$(docker images -q "${imageTagName}" 2> /dev/null)" != "" ]];
then
## 推送
docker push "${repoAddress}${projectName}-${version}"
docker push "${imageTagName}"
echo -e "${successLogger}---------------- 上传镜像成功,删除本地镜像 ---------------- "
docker rmi "${repoAddress}${projectName}-${version}"
docker rmi "${imageTagName}"
else
echo -e "${errorLogger}${currentTime}:镜像${repoAddress}${projectName}-${version}不存在"
echo -e "${errorLogger}${currentTime}[镜像] ${imageTagName}不存在"
fi
exit 0
}

View File

@@ -72,7 +72,7 @@ run(){
## 删除容器
delete_container "${containerName}"
## 删除镜像
delete_image "${repoAddress}:${containerName}_${version}"
delete_image "${repoAddress}:${containerName}-${version}"
## 部署
deploy_to_ali
exit 0;