File tree 8 files changed +752
-0
lines changed
8 files changed +752
-0
lines changed Original file line number Diff line number Diff line change
1
+ node_modules
Original file line number Diff line number Diff line change
1
+ import { defineConfig } from 'vitepress'
2
+
3
+ export default defineConfig ( {
4
+ title : '个人文档' ,
5
+ description : '个人学习过程中的笔记' ,
6
+ lastUpdated : true ,
7
+ themeConfig : {
8
+ siteTitle : '个人文档' ,
9
+ outlineTitle : '本页目录' ,
10
+ outline : 'deep' ,
11
+ socialLinks :[
12
+ { icon : 'github' , link : 'https://github.com/zscumt123' }
13
+ ] ,
14
+ nav : [
15
+ { text : 'Guide' , link : '/guide' } ,
16
+ {
17
+ text : 'Dropdown Menu' ,
18
+ items : [
19
+ {
20
+ // Title for the section.
21
+ text : 'Section A Title' ,
22
+ items : [
23
+ { text : 'Section A Item A' , link : '...' } ,
24
+ { text : 'Section B Item B' , link : '...' }
25
+ ]
26
+ }
27
+ ]
28
+ } ,
29
+ {
30
+ text : 'Dropdown Menu' ,
31
+ items : [
32
+ {
33
+ // You may also omit the title.
34
+ items : [
35
+ { text : 'Section A Item A' , link : '...' } ,
36
+ { text : 'Section B Item B' , link : '...' }
37
+ ]
38
+ }
39
+ ]
40
+ }
41
+ ] ,
42
+ sidebar : [
43
+ {
44
+ text : '前端' ,
45
+ collapsible : true ,
46
+ items : [
47
+ {
48
+ text : 'Nuxt' ,
49
+ // collapsible: true,
50
+ // collapsed: true,
51
+ link :'/nuxt/' ,
52
+ items : [
53
+ { text : '快速开始' , link : '/nuxt/start' }
54
+ ]
55
+ } ,
56
+ { text : 'Vue' , link : '/item-b' }
57
+ ]
58
+ } ,
59
+ {
60
+ text : '后端' ,
61
+ collapsible : true ,
62
+ items : [
63
+ { text : 'Rust' , link : '/item-c' } ,
64
+ { text : '数据库' , link : '/item-d' }
65
+ ]
66
+ }
67
+ ] ,
68
+
69
+ }
70
+ } )
Original file line number Diff line number Diff line change
1
+ ---
2
+ layout : home
3
+ title : Docs with VitePress
4
+ editLink : true
5
+ hero :
6
+ name : learning notes
7
+ # text: 记录学习过程.
8
+ tagline : study study study
9
+ actions :
10
+ - theme : brand
11
+ text : 快速开始
12
+ link : /guide/what-is-vitepress
13
+ - theme : alt
14
+ text : View on GitHub
15
+ link : https://github.com/zscumt123
16
+ features :
17
+ - icon : ⚡️
18
+ title : Vite, The DX that can't be beat
19
+ details : Lorem ipsum...
20
+ - icon : 🖖
21
+ title : Power of Vue meets Markdown
22
+ details : Lorem ipsum...
23
+ - icon : 🛠️
24
+ title : Simple and minimal, always
25
+ details : Lorem ipsum...
26
+ ---
Original file line number Diff line number Diff line change
1
+
2
+ ## 概念
3
+ ### 客户端渲染csr
4
+ > 普通的vue单页应该,页面由js生成虚拟dom,再根据虚拟dom渲染出真实的页面,所有html的生成都是在浏览器端完成
5
+ ### 服务端渲染ssr
6
+ > node.js 服务器将基于 Vue 的组件渲染成 HTML 并传输到客户端,而不是纯 javascript。与传统的 Vue SPA 相比,使用 SSR 将带来巨大的 SEO 提升、更快的首屏加载、更好的用户体验。
7
+ ::: tip
8
+ 截至目前,Google 和 Bing 可以很好地对同步 JavaScript 应用进行索引。这里的“同步”是关键词。如果你的应用以一个 loading 动画开始,然后通过 Ajax 获取内容,爬虫并不会等到内容加载完成再抓取。也就是说,如果 SEO 对你的页面至关重要,而你的内容又是异步获取的,那么 SSR 可能是必需的。
9
+ :::
10
+ ### 静态站点生成ssg(Static-Site Generation)
11
+ > 也被称为预渲染,是另一种流行的构建快速网站的技术。如果用服务端渲染一个页面所需的数据对每个用户来说都是相同的,那么我们可以只渲染一次,提前在构建过程中完成,而不是每次请求进来都重新渲染页面。预渲染的页面生成后作为静态 HTML 文件被服务器托管。
12
+
13
+ ## Nuxt是什么
14
+ > ** 创建一个现代的应用需要什么?**
15
+ > 1 . javascript框架 ` vuejs `
16
+ > 2 . 开发时候支持热更新和生产环境打包 ` webpack5 ` 或者 ` vite `
17
+ > 3 . 最新的js语法转换 ` esbuild `
18
+ > 4 . 服务端渲染的服务器 [ h3] ( https://github.com/unjs/h3 )
19
+ > 5 . 客户端路由 ` vue-router `
20
+ > 6 . ...
Original file line number Diff line number Diff line change
1
+ # nuxt start
Original file line number Diff line number Diff line change
1
+ {
2
+ "name" : " my-doc" ,
3
+ "scripts" : {
4
+ "docs:dev" : " vitepress dev docs" ,
5
+ "docs:build" : " vitepress build docs" ,
6
+ "docs:serve" : " vitepress serve docs"
7
+ },
8
+ "version" : " 1.0.0" ,
9
+ "main" : " index.js" ,
10
+ "author" : " zs" ,
11
+ "license" : " MIT" ,
12
+ "private" : true ,
13
+ "devDependencies" : {
14
+ "vitepress" : " ^1.0.0-alpha.20" ,
15
+ "vue" : " ^3.2.40"
16
+ }
17
+ }
You can’t perform that action at this time.
0 commit comments