Skip to content

Commit

Permalink
Merge pull request #105 from hejialianghe/feature/algorithm
Browse files Browse the repository at this point in the history
adjustment structure
  • Loading branch information
hejialianghe authored Aug 4, 2024
2 parents b02776a + 6e58807 commit 3072bef
Show file tree
Hide file tree
Showing 20 changed files with 1,175 additions and 1,046 deletions.
143 changes: 15 additions & 128 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
const path = require('path')
const {NavItemsZH,SidebarZH,NavItemsEN,SidebarEN} = require('./config/index')

module.exports = {
title: 'web全栈体系',
description: 'Hello, my friend!',
Expand Down Expand Up @@ -50,139 +52,24 @@ module.exports = {
src: '/weixin.jpeg',
},
],
nav: [
{
text: 'GitHub',
link: 'https://github.com/hejialianghe/Senior-FrontEnd',
},
{ text: 'Blog', link: 'http://youliaowu.com/' },
{ text: 'Gitee', link: 'https://gitee.com/hejialianghe/Senior-FrontEnd' },
],
sidebar: [
{
title: '指南',
collapsable: false,
children: [['guide/', '介绍']],
},
{
title: 'JavaScript进阶',
collapsable: false,
children: [
['jsadvanced/', '前言'],
['jsadvanced/function', '函数'],
['jsadvanced/asyncpro', '异步编程'],
['jsadvanced/designpattern', '设计模式'],
],
},
{
title: '计算机网络',
collapsable: false,
children: [
['computerNetwork/protocal', '网络协议'],
['computerNetwork/network-actual', '网络请求实战'],
['computerNetwork/security', '网络安全与攻防'],
['computerNetwork/browser-status', '浏览器状态同步和路由'],
['computerNetwork/tools', '工具链和其他'],
],
},
{
title: 'Vue',
collapsable: false,
children: [
['vue/', '前言'],
['vue/vueBase', 'vue基础'],
['vue/vueComponents', '探索vue的组件世界'],
['vue/sourceCode', '部分源码解析'],
['vue/serverSideRender', '服务端渲染'],
],
},
{
title: 'Vue2.0源码',
collapsable: false,
children: [
['vue2.0/', '前言'],
['vue2.0/dataResponse', '响应式'],
['vue2.0/virtualdomAndDiff', 'virtualdom和DIff'],
],
},
{
title: 'react',
collapsable: false,
children: [
['react/', '入门介绍'],
['react/react-base', '步入react'],
['react/react-positive', 'react正篇'],
['react/react-ecology', 'react生态'],
['react/react-principle', 'react原理'],
['react/react-state-mana', 'react状态管理'],
['react/react-actualCombat', 'react高级实战'],
['react/react-hooks', 'react-hooks'],
],
},
{
title: 'Node.js进阶',
collapsable: false,
children: [
['node/', 'Node.js基础'],
['node/koa', 'koa'],
['node/egg', '企业级框架egg'],
],
},
{
title: '工程化',
collapsable: false,
children: [
['engineering/script', '脚本世界'],
['engineering/coding-standards', '规范先行'],
['engineering/quality-code', '质量代码'],
['engineering/design', '工程设计'],
['engineering/ctg-art', '构建艺术'],
['engineering/auto-deploy', '持续集成与部署'],
['engineering/git', 'Git操作'],
['engineering/tool', '效率工具'],
],
},
{
title: '小程序',
collapsable: false,
children: [['applets/performance', '小程序进阶']],
},
{
title: '数据结构与算法',
collapsable: false,
children: [
['algorithm/complexity', '复杂度'],
['algorithm/dataStructure', '数据结构'],
['algorithm/thinking', '解题思路'],
['algorithm/sort', '排序算法专题'],
['algorithm/base', '真题'],
],
},
{
title: '项目实战',
collapsable: false,
children: [
['projectPractice/isomorphism', '认识同构及原理'],
['projectPractice/demo', '实现一个同构的demo'],
['projectPractice/nextjs', 'Nextjs'],
],
},
{
title: '杂项',
collapsable: false,
children: [
['sundry/react', 'react杂项'],
],
},
],
locales: {
'/': {
selectText: '选择语言',
label: '简体中文',
selectText: '选择语言',
ariaLabel: '选择语言',
editLinkText: '在 GitHub 上编辑此页',
lastUpdated: '上次更新',
nav: NavItemsZH,
sidebar: SidebarZH
},
'/en/': {
selectText: 'Languages',
'/en-US/': {
label: 'English',
selectText: 'Languages',
ariaLabel: 'Select language',
editLinkText: 'Edit this page on GitHub',
lastUpdated: 'Last Updated',
nav: NavItemsEN,
sidebar: SidebarEN,
},
},
},
Expand Down
13 changes: 13 additions & 0 deletions docs/.vuepress/config/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

const NavItemsZH = require('./nav/zh')
const SidebarZH = require('./sidebar/zh')
const NavItemsEN = require('./nav/en')
const SidebarEN = require('./sidebar/en')


module.exports ={
NavItemsZH,
SidebarZH,
NavItemsEN,
SidebarEN
}
29 changes: 29 additions & 0 deletions docs/.vuepress/config/nav/en.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
const NavItemsEN = [
{
text: 'Algorithm Booklet',
link: '/en-US/algorithm/complexity.html'
},
{
text: 'Web System',
link: '/en-US/guide/'
},
{
text: 'Framework Principles',
link: '/en-US/fp/react/build-react.html'
},
{
text: 'code',
items: [
{
text: 'GitHub',
link: 'https://github.com/hejialianghe/Senior-FrontEnd'
},
{
text: 'Gitee',
link: 'https://gitee.com/hejialianghe/Senior-FrontEnd'
}
]
}
]

module.exports = NavItemsEN
21 changes: 21 additions & 0 deletions docs/.vuepress/config/nav/zh.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
const NavItemsZH = [
{
text: '算法小册',
link: '/algorithm/complexity.html'
},
{
text: 'web体系',
link: '/guide/'
},
{
text: '框架原理',
link: '/fp/react/build-react.html'
},
{
text: 'GitHub',
link: 'https://github.com/hejialianghe/Senior-FrontEnd',
},
{ text: 'Gitee', link: 'https://gitee.com/hejialianghe/Senior-FrontEnd' },
]

module.exports = NavItemsZH
37 changes: 37 additions & 0 deletions docs/.vuepress/config/sidebar/en.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
const { getGuideSidebar } = require('./shared')

const SidebarEN = {
'/en-US/algorithm/': [{
title: 'Data Structures and Algorithms',
collapsable: false,
children: [
['complexity', 'Complexity'],
['dataStructure', 'Data Structure'],
['thinking', 'Problem-Solving Approach'],
['sort', 'Sorting Algorithms'],
['base', 'Real Questions'],
],
}],
"/en-US/fp/": [
{
title: 'React',
collapsable: false,
children: [
['react/build-react', '[Translation]build-your-own-react'],
['react/react-hooks', 'React Hooks'],
],
},
{
title: 'Vue2',
collapsable: false,
children: [
['vue2/', 'Introduction'],
['vue2/dataResponse', 'Reactivity'],
['vue2/virtualdomAndDiff', 'Virtual DOM and Diff'],
],
},
],
'/en-US/': getGuideSidebar(),
}

module.exports = SidebarEN
99 changes: 99 additions & 0 deletions docs/.vuepress/config/sidebar/shared.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@

function getGuideSidebar () {
const sidebar = [
{
title: '指南',
collapsable: false,
children: [['guide/', '介绍']],
},
{
title: 'JavaScript进阶',
collapsable: false,
children: [
['jsadvanced/', '前言'],
['jsadvanced/function', '函数'],
['jsadvanced/asyncpro', '异步编程'],
['jsadvanced/designpattern', '设计模式'],
],
},
{
title: '计算机网络',
collapsable: false,
children: [
['computerNetwork/protocal', '网络协议'],
['computerNetwork/network-actual', '网络请求实战'],
['computerNetwork/security', '网络安全与攻防'],
['computerNetwork/browser-status', '浏览器状态同步和路由'],
['computerNetwork/tools', '工具链和其他'],
],
},
{
title: 'Vue',
collapsable: false,
children: [
['vue/', '前言'],
['vue/vueBase', 'vue基础'],
['vue/vueComponents', '探索vue的组件世界'],
['vue/sourceCode', '部分源码解析'],
['vue/serverSideRender', '服务端渲染'],
],
},
{
title: 'react',
collapsable: false,
children: [
['react/', '入门介绍'],
['react/react-base', '步入react'],
['react/react-positive', 'react正篇'],
['react/react-ecology', 'react生态'],
['react/react-principle', 'react原理'],
['react/react-state-mana', 'react状态管理'],
['react/react-actualCombat', 'react高级实战'],
['react/react-hooks', 'react-hooks'],
],
},
{
title: 'Node.js进阶',
collapsable: false,
children: [
['node/', 'Node.js基础'],
['node/koa', 'koa'],
['node/egg', '企业级框架egg'],
],
},
{
title: '工程化',
collapsable: false,
children: [
['engineering/script', '脚本世界'],
['engineering/coding-standards', '规范先行'],
['engineering/quality-code', '质量代码'],
['engineering/design', '工程设计'],
['engineering/ctg-art', '构建艺术'],
['engineering/auto-deploy', '持续集成与部署'],
['engineering/git', 'Git操作'],
['engineering/tool', '效率工具'],
],
},
{
title: '小程序',
collapsable: false,
children: [['applets/performance', '小程序进阶']],
},
{
title: '项目实战',
collapsable: false,
children: [
['projectPractice/isomorphism', '认识同构及原理'],
['projectPractice/demo', '实现一个同构的demo'],
['projectPractice/nextjs', 'Nextjs'],
],
}
]

return sidebar
}

module.exports = {
getGuideSidebar
}
Loading

0 comments on commit 3072bef

Please sign in to comment.