From 02fe013a5b572cefd2b2b39f752cde291e551cdf Mon Sep 17 00:00:00 2001 From: yunnysunny Date: Sat, 8 Feb 2025 17:23:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E7=A9=BA=E7=99=BD=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- text/.vuepress/config.js | 8 ++++++-- text/.vuepress/toc.js | 5 ++++- text/14_node_log_and_monitor.md | 12 ++++++------ text/images 1.md | 0 text/images 2.md | 0 text/images.md | 0 6 files changed, 16 insertions(+), 9 deletions(-) delete mode 100644 text/images 1.md delete mode 100644 text/images 2.md delete mode 100644 text/images.md diff --git a/text/.vuepress/config.js b/text/.vuepress/config.js index 8af465e..ac3bedf 100644 --- a/text/.vuepress/config.js +++ b/text/.vuepress/config.js @@ -36,6 +36,10 @@ module.exports = { extendMarkdown: md => { md.use(require('markdown-it-disable-url-encode')); }, + headers: { + // 用到哪一级就提取哪一级 + level: [2, 3, 4, 5, 6], + }, },  themeConfig: { sidebar: [ @@ -43,11 +47,11 @@ module.exports = { title: '基础教程', // 必要的 // path: '/', // 可选的, 标题的跳转链接,应为绝对路径且必须存在 collapsable: false, // 可选的, 默认值是 true, - sidebarDepth: 3, // 可选的, 默认值是 1 + sidebarDepth: 4, // 可选的, 默认值是 1 children: toc } ], - sidebarDepth: 3, + sidebarDepth: 4,    logo: '/images/logo.png', nav: [     { text: '首页', link: '/' }, diff --git a/text/.vuepress/toc.js b/text/.vuepress/toc.js index 3c29330..496a34a 100644 --- a/text/.vuepress/toc.js +++ b/text/.vuepress/toc.js @@ -2,7 +2,10 @@ const fs = require('fs') const path = require('path') const toc = [] const mks = fs.readdirSync(path.join(__dirname, '../')).forEach((file) => { - if (file === 'README.md' || file === 'SUMMARY.md') { + if (file === 'README.md' + || file === 'SUMMARY.md' + || file === '15_micro_service.md' + || file === '16_openapi_doc.md') { return } if (file.endsWith('.md')) { diff --git a/text/14_node_log_and_monitor.md b/text/14_node_log_and_monitor.md index c3bbaf0..e0e8c5c 100644 --- a/text/14_node_log_and_monitor.md +++ b/text/14_node_log_and_monitor.md @@ -216,7 +216,7 @@ ksqldb 的端口号,改写成了 8090,因为很多人电脑上 8080 端口 在上图的文本框中输入以下语句 -```ksqldb +```sql CREATE STREAM req_log ( req_id STRING, domain STRING, @@ -376,7 +376,7 @@ Index pattern 选项中我们使用 * 通配符进行索引,是由于我们的 如果想检索数据可以在⑦号位中输入 [KQL](https://www.elastic.co/guide/en/kibana/current/kuery-query.html) 表达式,举几个例子,我们前面收集的日志中有 method 这个字段,那么我们搜 method 为 GET 的日志,可以用以下表达式,输入⑦号位后回车即可展现查询结果: -```kql +```sql method: GET ``` @@ -384,7 +384,7 @@ method: GET 如果想查 method 为 GET,并且 router 为 /a 的日志,可以用 AND 关键字连接两个查询表达式: -```kql +```sql method: GET AND router: /a ``` @@ -392,7 +392,7 @@ method: GET AND router: /a 如果想查 user_agent 字段中包含 Windows NT 10.0; Win64; x64 字符串的日志,你需要使用下面的表达式: -```kql +```sql user_agent: "Windows NT 10.0; Win64; x64" ``` @@ -402,7 +402,7 @@ user_agent: "Windows NT 10.0; Win64; x64" 还有一点需要注意,如果你查询的字符串中包含如下字符 `\():<>"*` ,那么你需要使用 \ 字符进行转义,或者使用引号将查询字符串包裹起来。比如说我们查询 referer 字段为 http://localhost 的时候,可以写成以下两种方式: -```kql +```sql referer: http\://localhost referer: "http://localhost" ``` @@ -411,7 +411,7 @@ referer: "http://localhost" 如果我们查询的逻辑比较负责,可以使用小括号来更改逻辑判断的优先级,比如说我们想查询 method 为 GET ,且 router 为 /a 或者 /b 的日志,可以写成如下表达式: -```kql +```sql method: GET AND (router: /a OR router: /b) ``` diff --git a/text/images 1.md b/text/images 1.md deleted file mode 100644 index e69de29..0000000 diff --git a/text/images 2.md b/text/images 2.md deleted file mode 100644 index e69de29..0000000 diff --git a/text/images.md b/text/images.md deleted file mode 100644 index e69de29..0000000