fix: fix search error & add name field in data.json #105

This commit is contained in:
jaywcjlove 2022-11-21 13:54:18 +08:00
parent 05f3df7e04
commit b473d99111
5 changed files with 178 additions and 130 deletions

237
README.md
View File

@ -19,146 +19,147 @@ Quick Reference
坑已挖,需要您的参与完善和贡献!🙏 坑已挖,需要您的参与完善和贡献!🙏
<!--rehype:style=padding-bottom: 23px;--> <!--rehype:style=padding-bottom: 23px;-->
[Ansible](./docs/ansible.md)<!--rehype:style=background: rgb(238 0 0/var(\-\-bg\-opacity));&class=contributing tag&data-lang=RedHad&data-info=👆看看还缺点儿什么?--> [Ansible](./docs/ansible.md)<!--rehype:style=background: rgb(238 0 0);&class=contributing tag&data-lang=RedHad&data-info=👆看看还缺点儿什么?-->
[CMake](./docs/cmake.md)<!--rehype:style=background: rgb(92 107 192/var(\-\-bg\-opacity));&class=contributing--> [CMake](./docs/cmake.md)<!--rehype:style=background: rgb(92 107 192);&class=contributing-->
[C#](./docs/cs.md)<!--rehype:style=background: rgb(6 147 13/var(\-\-bg\-opacity));&class=contributing--> [C#](./docs/cs.md)<!--rehype:style=background: rgb(6 147 13);&class=contributing-->
[Django](./docs/djiango.md)<!--rehype:style=background: rgb(12 75 51/var(\-\-bg\-opacity));&class=contributing tag&data-lang=Python--> [Django](./docs/djiango.md)<!--rehype:style=background: rgb(12 75 51);&class=contributing tag&data-lang=Python-->
[FFmpeg](./docs/ffmpeg.md)<!--rehype:style=background: rgb(0 193 9/var(\-\-bg\-opacity));&class=contributing--> [FFmpeg](./docs/ffmpeg.md)<!--rehype:style=background: rgb(0 193 9);&class=contributing-->
[Flutter](./docs/flutter.md)<!--rehype:style=background: rgb(150 220 254/var(\-\-bg\-opacity));&class=contributing tag&data-lang=Dart--> [Flutter](./docs/flutter.md)<!--rehype:style=background: rgb(150 220 254);&class=contributing tag&data-lang=Dart-->
[LaTeX](./docs/latex.md)<!--rehype:style=background: rgb(0 128 128/var(\-\-bg\-opacity));&class=contributing--> [LaTeX](./docs/latex.md)<!--rehype:style=background: rgb(0 128 128);&class=contributing-->
[Lua](./docs/lua.md)<!--rehype:style=background: rgb(3 3 128/var(\-\-bg\-opacity));--> [Lua](./docs/lua.md)<!--rehype:style=background: rgb(3 3 128);-->
[MATLAB](./docs/matlab.md)<!--rehype:style=background: rgb(0 118 168/var(\-\-bg\-opacity));&class=contributing--> [NestJS](./docs/nestjs.md)<!--rehype:style=background: rgb(237 21 67);&class=contributing-->
[Vue 3](./docs/vue.md)<!--rehype:style=background: rgb(64 184 131/var(\-\-bg\-opacity));&class=contributing--> [MATLAB](./docs/matlab.md)<!--rehype:style=background: rgb(0 118 168);&class=contributing-->
[Pytorch](./docs/pytorch.md)<!--rehype:style=background: rgb(238 76 44/var(\-\-bg\-opacity));&class=contributing tag&data-lang=Python&data-info=👆看看还缺点儿什么?--> [Vue 3](./docs/vue.md)<!--rehype:style=background: rgb(64 184 131);&class=contributing-->
[Pytorch](./docs/pytorch.md)<!--rehype:style=background: rgb(238 76 44);&class=contributing tag&data-lang=Python&data-info=👆看看还缺点儿什么?-->
<!--rehype:class=home-card--> <!--rehype:class=home-card-->
## 编程 ## 编程
[Bash](./docs/bash.md)<!--rehype:style=background: rgb(72 143 223/var(\-\-bg\-opacity));--> [Bash](./docs/bash.md)<!--rehype:style=background: rgb(72 143 223);-->
[C](./docs/c.md)<!--rehype:style=background: rgb(92 107 192/var(\-\-bg\-opacity));--> [C](./docs/c.md)<!--rehype:style=background: rgb(92 107 192);-->
[C#](./docs/cs.md)<!--rehype:style=background: rgb(6 147 13/var(\-\-bg\-opacity));&class=contributing--> [C#](./docs/cs.md)<!--rehype:style=background: rgb(6 147 13);&class=contributing-->
[CPP](./docs/cpp.md)<!--rehype:style=background: rgb(6 147 13/var(\-\-bg\-opacity));&class=contributing--> [CPP](./docs/cpp.md)<!--rehype:style=background: rgb(6 147 13);&class=contributing-->
[Dart](./docs/dart.md)<!--rehype:style=background: rgb(64 196 255/var(\-\-bg\-opacity));--> [Dart](./docs/dart.md)<!--rehype:style=background: rgb(64 196 255);-->
[Docker](./docs/docker.md)<!--rehype:style=background: rgb(72 143 223/var(\-\-bg\-opacity));--> [Docker](./docs/docker.md)<!--rehype:style=background: rgb(72 143 223);-->
[Dockerfile](./docs/dockerfile.md)<!--rehype:style=background: rgb(0 72 153/var(\-\-bg\-opacity));&class=tag&data-lang=Docker--> [Dockerfile](./docs/dockerfile.md)<!--rehype:style=background: rgb(0 72 153);&class=tag&data-lang=Docker-->
[Django](./docs/djiango.md)<!--rehype:style=background: rgb(12 75 51/var(\-\-bg\-opacity));&class=contributing tag&data-lang=Python--> [Django](./docs/djiango.md)<!--rehype:style=background: rgb(12 75 51);&class=contributing tag&data-lang=Python-->
[Flutter](./docs/flutter.md)<!--rehype:style=background: rgb(150 220 254/var(\-\-bg\-opacity));&class=contributing tag&data-lang=Dart--> [Flutter](./docs/flutter.md)<!--rehype:style=background: rgb(150 220 254);&class=contributing tag&data-lang=Dart-->
[Golang](./docs/golang.md)<!--rehype:style=background: rgb(39 160 193/var(\-\-bg\-opacity));--> [Golang](./docs/golang.md)<!--rehype:style=background: rgb(39 160 193);-->
[GraphQL](./docs/graphql.md)<!--rehype:style=background: rgb(214 66 146/var(\-\-bg\-opacity));--> [GraphQL](./docs/graphql.md)<!--rehype:style=background: rgb(214 66 146);-->
[INI](./docs/ini.md)<!--rehype:style=background: rgb(57 59 60/var(\-\-bg\-opacity));--> [INI](./docs/ini.md)<!--rehype:style=background: rgb(57 59 60);-->
[JSON](./docs/json.md)<!--rehype:style=background: rgb(57 59 60/var(\-\-bg\-opacity));--> [JSON](./docs/json.md)<!--rehype:style=background: rgb(57 59 60);-->
[Java](./docs/java.md)<!--rehype:style=background: rgb(211 55 49/var(\-\-bg\-opacity));&class=contributing&data-info=👆看看还缺点儿什么?--> [Java](./docs/java.md)<!--rehype:style=background: rgb(211 55 49);&class=contributing&data-info=👆看看还缺点儿什么?-->
[Julia](./docs/julia.md)<!--rehype:style=background: rgb(211 55 49/var(\-\-bg\-opacity));&class=contributing&data-info=👆看看还缺点儿什么?--> [Julia](./docs/julia.md)<!--rehype:style=background: rgb(211 55 49);&class=contributing&data-info=👆看看还缺点儿什么?-->
[Kotlin](./docs/kotlin.md)<!--rehype:style=background: rgb(211 55 49/var(\-\-bg\-opacity));&class=contributing&data-info=👆看看还缺点儿什么?--> [Kotlin](./docs/kotlin.md)<!--rehype:style=background: rgb(211 55 49);&class=contributing&data-info=👆看看还缺点儿什么?-->
[LaTeX](./docs/latex.md)<!--rehype:style=background: rgb(0 128 128/var(\-\-bg\-opacity));&class=contributing--> [LaTeX](./docs/latex.md)<!--rehype:style=background: rgb(0 128 128);&class=contributing-->
[Markdown](./docs/markdown.md)<!--rehype:style=background: rgb(103 61 156/var(\-\-bg\-opacity));--> [Markdown](./docs/markdown.md)<!--rehype:style=background: rgb(103 61 156);-->
[MySQL](./docs/mysql.md)<!--rehype:style=background: rgb(1 117 143/var(\-\-bg\-opacity));&class=tag&data-lang=SQL--> [MySQL](./docs/mysql.md)<!--rehype:style=background: rgb(1 117 143);&class=tag&data-lang=SQL-->
[MATLAB](./docs/matlab.md)<!--rehype:style=background: rgb(0 118 168/var(\-\-bg\-opacity));&class=contributing--> [MATLAB](./docs/matlab.md)<!--rehype:style=background: rgb(0 118 168);&class=contributing-->
[PHP](./docs/php.md)<!--rehype:style=background: rgb(79 91 147/var(\-\-bg\-opacity));--> [PHP](./docs/php.md)<!--rehype:style=background: rgb(79 91 147);-->
[Python](./docs/python.md)<!--rehype:style=background: rgb(43 91 132/var(\-\-bg\-opacity));--> [Python](./docs/python.md)<!--rehype:style=background: rgb(43 91 132);-->
[PostgreSQL](./docs/postgres.md)<!--rehype:style=background: rgb(43 109 163/var(\-\-bg\-opacity));&class=tag&data-lang=SQL--> [PostgreSQL](./docs/postgres.md)<!--rehype:style=background: rgb(43 109 163);&class=tag&data-lang=SQL-->
[Ruby](./docs/ruby.md)<!--rehype:style=background: rgb(204 52 45/var(\-\-bg\-opacity));--> [Ruby](./docs/ruby.md)<!--rehype:style=background: rgb(204 52 45);-->
[Rust](./docs/rust.md)<!--rehype:style=background: rgb(71 71 71/var(\-\-bg\-opacity));--> [Rust](./docs/rust.md)<!--rehype:style=background: rgb(71 71 71);-->
[Swift](./docs/swift.md)<!--rehype:style=background: rgb(240 81 57/var(\-\-bg\-opacity));--> [Swift](./docs/swift.md)<!--rehype:style=background: rgb(240 81 57);-->
[SwiftUI](./docs/swiftui.md)<!--rehype:style=background: rgb(10 127 247/var(\-\-bg\-opacity));&class=tag&data-lang=swift--> [SwiftUI](./docs/swiftui.md)<!--rehype:style=background: rgb(10 127 247);&class=tag&data-lang=swift-->
[TOML](./docs/toml.md)<!--rehype:style=background: rgb(132 132 132/var(\-\-bg\-opacity));--> [TOML](./docs/toml.md)<!--rehype:style=background: rgb(132 132 132);-->
[YAML](./docs/yaml.md)<!--rehype:style=background: rgb(91 163 230/var(\-\-bg\-opacity));--> [YAML](./docs/yaml.md)<!--rehype:style=background: rgb(91 163 230);-->
[Lua](./docs/lua.md)<!--rehype:style=background: rgb(3 3 128/var(\-\-bg\-opacity));--> [Lua](./docs/lua.md)<!--rehype:style=background: rgb(3 3 128);-->
[Pytorch](./docs/pytorch.md)<!--rehype:style=background: rgb(238 76 44/var(\-\-bg\-opacity));&class=contributing tag&data-lang=Python&data-info=👆看看还缺点儿什么?--> [Pytorch](./docs/pytorch.md)<!--rehype:style=background: rgb(238 76 44);&class=contributing tag&data-lang=Python&data-info=👆看看还缺点儿什么?-->
<!--rehype:class=home-card--> <!--rehype:class=home-card-->
## 前端 ## 前端
[CSS 3](./docs/css.md)<!--rehype:style=background: rgb(35 115 205/var(\-\-bg\-opacity));&class=tag&data-lang=CSS--> [CSS 3](./docs/css.md)<!--rehype:style=background: rgb(35 115 205);&class=tag&data-lang=CSS-->
[Electron](./docs/electron.md)<!--rehype:style=background: rgb(0 72 153/var(\-\-bg\-opacity));--> [Electron](./docs/electron.md)<!--rehype:style=background: rgb(0 72 153);-->
[Emmet](./docs/emmet.md)<!--rehype:style=background: rgb(122 203 23/var(\-\-bg\-opacity));--> [Emmet](./docs/emmet.md)<!--rehype:style=background: rgb(122 203 23);-->
[ES 6](./docs/es6.md)<!--rehype:style=background: rgb(122 203 23/var(\-\-bg\-opacity));&class=tag&data-lang=JS--> [ES 6](./docs/es6.md)<!--rehype:style=background: rgb(122 203 23);&class=tag&data-lang=JS-->
[Styled Components](./docs/styled-components.md)<!--rehype:style=background: rgb(221 60 184/var(\-\-bg\-opacity));--> [Styled Components](./docs/styled-components.md)<!--rehype:style=background: rgb(221 60 184);-->
[Stylus](./docs/stylus.md)<!--rehype:style=background: rgb(109 161 63/var(\-\-bg\-opacity));&class=tag&data-lang=CSS--> [Stylus](./docs/stylus.md)<!--rehype:style=background: rgb(109 161 63);&class=tag&data-lang=CSS-->
[Sass](./docs/sass.md)<!--rehype:style=background: rgb(207 100 154/var(\-\-bg\-opacity));&class=tag&data-lang=CSS--> [Sass](./docs/sass.md)<!--rehype:style=background: rgb(207 100 154);&class=tag&data-lang=CSS-->
[HTML](./docs/html.md)<!--rehype:style=background: rgb(228 77 39/var(\-\-bg\-opacity));--> [HTML](./docs/html.md)<!--rehype:style=background: rgb(228 77 39);-->
[JavaScript](./docs/javascript.md)<!--rehype:style=background: rgb(203 183 31/var(\-\-bg\-opacity));--> [JavaScript](./docs/javascript.md)<!--rehype:style=background: rgb(203 183 31);-->
[Less.js](./docs/lessjs.md)<!--rehype:style=background: rgb(29 54 93/var(\-\-bg\-opacity));&class=tag&data-lang=CSS--> [Less.js](./docs/lessjs.md)<!--rehype:style=background: rgb(29 54 93);&class=tag&data-lang=CSS-->
[React](./docs/react.md)<!--rehype:style=background: rgb(34 143 173/var(\-\-bg\-opacity));--> [React](./docs/react.md)<!--rehype:style=background: rgb(34 143 173);-->
[RegEx 正则表达式](./docs/regex.md)<!--rehype:style=background: rgb(149 36 155/var(\-\-bg\-opacity));--> [RegEx 正则表达式](./docs/regex.md)<!--rehype:style=background: rgb(149 36 155);-->
[TypeScript](./docs/typescript.md)<!--rehype:style=background: rgb(49 120 198/var(\-\-bg\-opacity));--> [TypeScript](./docs/typescript.md)<!--rehype:style=background: rgb(49 120 198);-->
[Vue 2](./docs/vue2.md)<!--rehype:style=background: rgb(64 184 131/var(\-\-bg\-opacity));--> [Vue 2](./docs/vue2.md)<!--rehype:style=background: rgb(64 184 131);-->
[Vue 3](./docs/vue.md)<!--rehype:style=background: rgb(64 184 131/var(\-\-bg\-opacity));&class=contributing--> [Vue 3](./docs/vue.md)<!--rehype:style=background: rgb(64 184 131);&class=contributing-->
<!--rehype:class=home-card--> <!--rehype:class=home-card-->
## Nodejs ## Nodejs
[Express.js](./docs/expressjs.md)<!--rehype:style=background: rgb(95 151 206/var(\-\-bg\-opacity));--> [Express.js](./docs/expressjs.md)<!--rehype:style=background: rgb(95 151 206);-->
[Jest](./docs/jest.md)<!--rehype:style=background: rgb(153 66 91/var(\-\-bg\-opacity));--> [Jest](./docs/jest.md)<!--rehype:style=background: rgb(153 66 91);-->
[Koa.js](./docs/koajs.md)<!--rehype:style=background: rgb(95 151 206/var(\-\-bg\-opacity));--> [Koa.js](./docs/koajs.md)<!--rehype:style=background: rgb(95 151 206);-->
[Lerna](./docs/lerna.md)<!--rehype:style=background: rgb(192 132 252/var(\-\-bg\-opacity));--> [Lerna](./docs/lerna.md)<!--rehype:style=background: rgb(192 132 252);-->
[npm](./docs/npm.md)<!--rehype:style=background: rgb(203 2 0/var(\-\-bg\-opacity));--> [npm](./docs/npm.md)<!--rehype:style=background: rgb(203 2 0);-->
[package.json](./docs/package.json.md)<!--rehype:style=background: rgb(132 132 132/var(\-\-bg\-opacity));--> [NestJS](./docs/nestjs.md)<!--rehype:style=background: rgb(237 21 67);&class=contributing-->
[Yarn](./docs/yarn.md)<!--rehype:style=background: rgb(33 136 182/var(\-\-bg\-opacity));--> [package.json](./docs/package.json.md)<!--rehype:style=background: rgb(132 132 132);-->
[NestJS](./docs/nestjs.md)<!--rehype:style=background: rgb(237 21 67/var(\-\-bg\-opacity));&class=contributing--> [Yarn](./docs/yarn.md)<!--rehype:style=background: rgb(33 136 182);-->
<!--rehype:class=home-card--> <!--rehype:class=home-card-->
## 工具 ## 工具
[Emacs](./docs/emacs.md)<!--rehype:style=background: rgb(98 36 134/var(\-\-bg\-opacity));--> [Emacs](./docs/emacs.md)<!--rehype:style=background: rgb(98 36 134);-->
[Gmail](./docs/gmail.md)<!--rehype:style=background: rgb(234 67 54/var(\-\-bg\-opacity));--> [Gmail](./docs/gmail.md)<!--rehype:style=background: rgb(234 67 54);-->
[nginx](./docs/nginx.md)<!--rehype:style=background: rgb(0 153 0/var(\-\-bg\-opacity));--> [nginx](./docs/nginx.md)<!--rehype:style=background: rgb(0 153 0);-->
[Semver](./docs/semver.md)<!--rehype:style=background: rgb(106 111 141/var(\-\-bg\-opacity));--> [Semver](./docs/semver.md)<!--rehype:style=background: rgb(106 111 141);-->
[Sketch](./docs/sketch.md)<!--rehype:style=background: rgb(223 148 0/var(\-\-bg\-opacity));&class=tag&data-lang=macOS--> [Sketch](./docs/sketch.md)<!--rehype:style=background: rgb(223 148 0);&class=tag&data-lang=macOS-->
[Sublime Text](./docs/sublime-text.md)<!--rehype:style=background: rgb(223 148 0/var(\-\-bg\-opacity));--> [Sublime Text](./docs/sublime-text.md)<!--rehype:style=background: rgb(223 148 0);-->
[VSCode](./docs/vscode.md)<!--rehype:style=background: rgb(91 163 230/var(\-\-bg\-opacity));--> [VSCode](./docs/vscode.md)<!--rehype:style=background: rgb(91 163 230);-->
[Vim](./docs/vim.md)<!--rehype:style=background: rgb(9 150 8/var(\-\-bg\-opacity));--> [Vim](./docs/vim.md)<!--rehype:style=background: rgb(9 150 8);-->
[WebStorm](./docs/webstorm.md)<!--rehype:style=background: rgb(32 148 220/var(\-\-bg\-opacity));--> [WebStorm](./docs/webstorm.md)<!--rehype:style=background: rgb(32 148 220);-->
[XPath](./docs/xpath.md)<!--rehype:style=background: rgb(91 163 230/var(\-\-bg\-opacity));--> [XPath](./docs/xpath.md)<!--rehype:style=background: rgb(91 163 230);-->
[Xcode](./docs/xcode.md)<!--rehype:style=background: rgb(24 151 233/var(\-\-bg\-opacity));&class=tag&data-lang=macOS--> [Xcode](./docs/xcode.md)<!--rehype:style=background: rgb(24 151 233);&class=tag&data-lang=macOS-->
<!--rehype:class=home-card--> <!--rehype:class=home-card-->
## 命令 ## 命令
[Ansible](./docs/ansible.md)<!--rehype:style=background: rgb(238 0 0/var(\-\-bg\-opacity));&class=contributing tag&data-lang=RedHad&data-info=👆看看还缺点儿什么?--> [Ansible](./docs/ansible.md)<!--rehype:style=background: rgb(238 0 0);&class=contributing tag&data-lang=RedHad&data-info=👆看看还缺点儿什么?-->
[Awk](./docs/awk.md)<!--rehype:style=background: rgb(16 185 129/var(\-\-bg\-opacity));--> [Awk](./docs/awk.md)<!--rehype:style=background: rgb(16 185 129);-->
[Conan](./docs/conan.md)<!--rehype:style=background: rgb(0 193 9/var(\-\-bg\-opacity));&class=tag&data-lang=C/C++--> [Conan](./docs/conan.md)<!--rehype:style=background: rgb(0 193 9);&class=tag&data-lang=C/C++-->
[CocoaPods](./docs/cocoapods.md)<!--rehype:style=background: rgb(251 0 6/var(\-\-bg\-opacity));&class=tag&data-lang=C/C++--> [CocoaPods](./docs/cocoapods.md)<!--rehype:style=background: rgb(251 0 6);&class=tag&data-lang=C/C++-->
[Cargo](./docs/cargo.md)<!--rehype:style=background: rgb(71 71 71/var(\-\-bg\-opacity));&class=tag&data-lang=Rust--> [Cargo](./docs/cargo.md)<!--rehype:style=background: rgb(71 71 71);&class=tag&data-lang=Rust-->
[Curl](./docs/curl.md)<!--rehype:style=background: rgb(16 185 129/var(\-\-bg\-opacity));--> [Curl](./docs/curl.md)<!--rehype:style=background: rgb(16 185 129);-->
[Chmod](./docs/chmod.md)<!--rehype:style=background: rgb(16 185 129/var(\-\-bg\-opacity));--> [Chmod](./docs/chmod.md)<!--rehype:style=background: rgb(16 185 129);-->
[Cron](./docs/cron.md)<!--rehype:style=background: rgb(239 68 68/var(\-\-bg\-opacity));--> [Cron](./docs/cron.md)<!--rehype:style=background: rgb(239 68 68);-->
[CMake](./docs/cmake.md)<!--rehype:style=background: rgb(92 107 192/var(\-\-bg\-opacity));&class=contributing--> [CMake](./docs/cmake.md)<!--rehype:style=background: rgb(92 107 192);&class=contributing-->
[Git](./docs/git.md)<!--rehype:style=background: rgb(215 89 62/var(\-\-bg\-opacity));--> [Git](./docs/git.md)<!--rehype:style=background: rgb(215 89 62);-->
[Grep](./docs/grep.md)<!--rehype:style=background: rgb(16 185 129/var(\-\-bg\-opacity));--> [Grep](./docs/grep.md)<!--rehype:style=background: rgb(16 185 129);-->
[Find](./docs/find.md)<!--rehype:style=background: rgb(16 185 129/var(\-\-bg\-opacity));--> [Find](./docs/find.md)<!--rehype:style=background: rgb(16 185 129);-->
[FFmpeg](./docs/ffmpeg.md)<!--rehype:style=background: rgb(0 193 9/var(\-\-bg\-opacity));&class=contributing--> [FFmpeg](./docs/ffmpeg.md)<!--rehype:style=background: rgb(0 193 9);&class=contributing-->
[Htop](./docs/htop.md)<!--rehype:style=background: rgb(16 185 129/var(\-\-bg\-opacity));--> [Htop](./docs/htop.md)<!--rehype:style=background: rgb(16 185 129);-->
[Homebrew](./docs/homebrew.md)<!--rehype:style=background: rgb(252 185 87/var(\-\-bg\-opacity));&class=tag&data-lang=macOS--> [Homebrew](./docs/homebrew.md)<!--rehype:style=background: rgb(252 185 87);&class=tag&data-lang=macOS-->
[Netstat](./docs/netstat.md)<!--rehype:style=background: rgb(16 185 129/var(\-\-bg\-opacity));--> [Netstat](./docs/netstat.md)<!--rehype:style=background: rgb(16 185 129);-->
[jq](./docs/jq.md)<!--rehype:style=background: rgb(16 185 129/var(\-\-bg\-opacity));&class=tag&data-lang=JSON--> [jq](./docs/jq.md)<!--rehype:style=background: rgb(16 185 129);&class=tag&data-lang=JSON-->
[Lsof](./docs/lsof.md)<!--rehype:style=background: rgb(16 185 129/var(\-\-bg\-opacity));--> [Lsof](./docs/lsof.md)<!--rehype:style=background: rgb(16 185 129);-->
[Mitmproxy](./docs/mitmproxy.md)<!--rehype:style=background: rgb(4 92 135/var(\-\-bg\-opacity));--> [Mitmproxy](./docs/mitmproxy.md)<!--rehype:style=background: rgb(4 92 135);-->
[Netcat](./docs/netcat.md)<!--rehype:style=background: rgb(4 92 135/var(\-\-bg\-opacity));--> [Netcat](./docs/netcat.md)<!--rehype:style=background: rgb(4 92 135);-->
[Sed](./docs/sed.md)<!--rehype:style=background: rgb(16 185 129/var(\-\-bg\-opacity));--> [Sed](./docs/sed.md)<!--rehype:style=background: rgb(16 185 129);-->
[OpenSSL](./docs/openssl.md)<!--rehype:style=background: rgb(114 20 18/var(\-\-bg\-opacity));--> [OpenSSL](./docs/openssl.md)<!--rehype:style=background: rgb(114 20 18);-->
[Systemd](./docs/systemd.md)<!--rehype:style=background: rgb(16 185 129/var(\-\-bg\-opacity));--> [Systemd](./docs/systemd.md)<!--rehype:style=background: rgb(16 185 129);-->
[SSH](./docs/ssh.md)<!--rehype:style=background: rgb(99 99 99/var(\-\-bg\-opacity));--> [SSH](./docs/ssh.md)<!--rehype:style=background: rgb(99 99 99);-->
[Screen](./docs/screen.md)<!--rehype:style=background: rgb(99 99 99/var(\-\-bg\-opacity));--> [Screen](./docs/screen.md)<!--rehype:style=background: rgb(99 99 99);-->
[Sysdig](./docs/sysdig.md)<!--rehype:style=background: rgb(1 171 199/var(\-\-bg\-opacity));--> [Sysdig](./docs/sysdig.md)<!--rehype:style=background: rgb(1 171 199);-->
[Tmux](./docs/tmux.md)<!--rehype:style=background: rgb(99 99 99/var(\-\-bg\-opacity));--> [Tmux](./docs/tmux.md)<!--rehype:style=background: rgb(99 99 99);-->
[YUM](./docs/yum.md)<!--rehype:style=background: rgb(86 86 123/var(\-\-bg\-opacity));--> [YUM](./docs/yum.md)<!--rehype:style=background: rgb(86 86 123);-->
[CMD](./docs/cmd.md)<!--rehype:style=background: rgb(99 99 99/var(\-\-bg\-opacity));--> [CMD](./docs/cmd.md)<!--rehype:style=background: rgb(99 99 99);-->
[APT](./docs/apt.md)<!--rehype:style=background: rgb(30 144 255/var(\-\-bg\-opacity));--> [APT](./docs/apt.md)<!--rehype:style=background: rgb(30 144 255);-->
[tar](./docs/tar.md)<!--rehype:style=background: rgb(215 89 62/var(\-\-bg\-opacity));--> [tar](./docs/tar.md)<!--rehype:style=background: rgb(215 89 62);-->
<!--rehype:class=home-card--> <!--rehype:class=home-card-->
## 其它 ## 其它
[Quick Reference](./docs/quickreference.md)<!--rehype:style=background: rgb(16 185 129/var(\-\-bg\-opacity));&class=tag&data-lang=排版说明--> [Quick Reference](./docs/quickreference.md)<!--rehype:style=background: rgb(16 185 129);&class=tag&data-lang=排版说明-->
[Github Actions](./docs/github-actions.md)<!--rehype:style=background: rgb(121 184 255/var(\-\-bg\-opacity));--> [Github Actions](./docs/github-actions.md)<!--rehype:style=background: rgb(121 184 255);-->
[Colors Named](./docs/colors-named.md)<!--rehype:style=background: rgb(16 185 129/var(\-\-bg\-opacity));&class=tag&data-lang=CSS--> [Colors Named](./docs/colors-named.md)<!--rehype:style=background: rgb(16 185 129);&class=tag&data-lang=CSS-->
[HTTP 状态码](./docs/http-status-code.md)<!--rehype:style=background: rgb(16 185 129/var(\-\-bg\-opacity));--> [HTTP 状态码](./docs/http-status-code.md)<!--rehype:style=background: rgb(16 185 129);-->
[HTML 字符实体](./docs/html-char.md)<!--rehype:style=background: rgb(16 185 129/var(\-\-bg\-opacity));&class=tag&data-lang=HTML--> [HTML 字符实体](./docs/html-char.md)<!--rehype:style=background: rgb(16 185 129);&class=tag&data-lang=HTML-->
[ISO 639-1 Language Code](./docs/iso-639-1.md)<!--rehype:style=background: rgb(16 185 129/var(\-\-bg\-opacity));--> [ISO 639-1 Language Code](./docs/iso-639-1.md)<!--rehype:style=background: rgb(16 185 129);-->
[Emoji](./docs/emoji.md)<!--rehype:style=background: rgb(16 185 129/var(\-\-bg\-opacity));--> [Emoji](./docs/emoji.md)<!--rehype:style=background: rgb(16 185 129);-->
[MIME types](./docs/mime.md)<!--rehype:style=background: rgb(16 185 129/var(\-\-bg\-opacity));--> [MIME types](./docs/mime.md)<!--rehype:style=background: rgb(16 185 129);-->
[Resolutions](./docs/resolutions.md)<!--rehype:style=background: rgb(16 185 129/var(\-\-bg\-opacity));--> [Resolutions](./docs/resolutions.md)<!--rehype:style=background: rgb(16 185 129);-->
<!--rehype:class=home-card--> <!--rehype:class=home-card-->
## 看到缺少什么了吗? ## 看到缺少什么了吗?
@ -314,8 +315,8 @@ Quick Reference
由于中国国内访问,时常打不开,你可以访问下面镜像网站。推荐我的[镜像网站](https://github.com/jaywcjlove/reference/issues/102#issue-1451649637) 由于中国国内访问,时常打不开,你可以访问下面镜像网站。推荐我的[镜像网站](https://github.com/jaywcjlove/reference/issues/102#issue-1451649637)
[ecdata.cn](http://ref.ecdata.cn/)<!--rehype:style=background: rgb(16 185 129/var(\-\-bg\-opacity));height: 3rem;--> [ecdata.cn](http://ref.ecdata.cn/)<!--rehype:style=background: rgb(16 185 129);height: 3rem;-->
[mofe.io](http://quickref.mofe.io)<!--rehype:style=background: rgb(16 185 129/var(\-\-bg\-opacity));height: 3rem;--> [mofe.io](http://quickref.mofe.io)<!--rehype:style=background: rgb(16 185 129);height: 3rem;-->
<!--rehype:class=home-card&style=margin:1.2rem 0;display: flex;justify-content: center;--> <!--rehype:class=home-card&style=margin:1.2rem 0;display: flex;justify-content: center;-->
如果你有资源,可以很方便部署 web 版,这非常简单,只需要克隆 gh-pages 分支代码到你的静态服务就可以了,还可以使用 [docker](https://hub.docker.com/r/wcjiang/reference) 快捷部署 web 版。 如果你有资源,可以很方便部署 web 版,这非常简单,只需要克隆 gh-pages 分支代码到你的静态服务就可以了,还可以使用 [docker](https://hub.docker.com/r/wcjiang/reference) 快捷部署 web 版。

View File

@ -82,7 +82,14 @@ export function create(str = '', options = {}) {
if (iconName) { if (iconName) {
detailData.icon = iconName; detailData.icon = iconName;
} }
homeCardIcons(node, parent, options.isHome); const resultHomeCard = homeCardIcons(node, parent, options.isHome);
if (options.filename && resultHomeCard[options.filename]) {
detailData.rgb = resultHomeCard[options.filename].rgb;
detailData.name = resultHomeCard[options.filename].title;
if (resultHomeCard[options.filename].tags) {
detailData.tags = resultHomeCard[options.filename].tags;
}
}
tooltips(node, index, parent); tooltips(node, index, parent);
htmlTagAddAttri(node, options); htmlTagAddAttri(node, options);
rehypeUrls(node); rehypeUrls(node);
@ -111,7 +118,6 @@ export function create(str = '', options = {}) {
} }
node.children.unshift(header(options)); node.children.unshift(header(options));
node.children.push(footer(options)); node.children.push(footer(options));
// node.children.push(search(options));
node.children = node.children.concat(search(options)); node.children = node.children.concat(search(options));
} }
} }

View File

@ -41,8 +41,9 @@ const fuse = new Fuse(REFS_DATA, {
matchEmptyQuery: !0, matchEmptyQuery: !0,
threshold: .1, threshold: .1,
keys: [ keys: [
{ name: "title", weight: 12 }, { name: "name", weight: 12 },
{ name: 'intro', weight: 2 }, { name: 'intro', weight: 2 },
{ name: 'tags', weight: 2 },
{ name: 'sections.t', weight: 5 } { name: 'sections.t', weight: 5 }
], ],
}); });
@ -70,9 +71,13 @@ document.addEventListener('keydown', (ev) => {
} }
}); });
let result = []
let inputValue = '';
function showSearch() { function showSearch() {
document.body.classList.add('search'); document.body.classList.add('search');
searchBox.classList.add('show'); searchBox.classList.add('show');
searchResult('')
searchInput.focus(); searchInput.focus();
} }
@ -80,22 +85,29 @@ function hideSearch() {
document.body.classList.remove('search'); document.body.classList.remove('search');
searchBox.classList.remove('show'); searchBox.classList.remove('show');
} }
let result = [] function getValueReg(val = '') {
let inputValue = ''; return new RegExp(val.replace(/[|\\{}()[\]^$+*?.]/g, '\\$&').replace(/-/g, '\\x2d'), 'ig');
}
function searchResult(value) { function searchResult(value) {
inputValue = value; inputValue = value;
result = fuse.search(value); result = fuse.search(value);
if (!value) {
result = REFS_DATA.map(item => ({ item: item }));
}
let menuHTML = ''; let menuHTML = '';
result.forEach((item, idx) => { result.forEach((item, idx) => {
const label = item.item.title.replace(new RegExp(value, 'ig'), (txt) => { const label = item.item.name.replace(getValueReg(value), (txt) => {
return `<mark>${txt}</mark>`
})
const tags = (item.item.tags || []).join(',').replace(getValueReg(value), (txt) => {
return `<mark>${txt}</mark>` return `<mark>${txt}</mark>`
}) })
const href = isHome ? item.item.path : item.item.path.replace('docs/', ''); const href = isHome ? item.item.path : item.item.path.replace('docs/', '');
if (idx === 0) { if (idx === 0) {
menuHTML += `<a href="${href}" class="active">${label}</a>`; menuHTML += `<a href="${href}" class="active"><span>${label}</span><sup>${tags}</sup></a>`;
} else { } else {
menuHTML += `<a href="${href}">${label}</a>`; menuHTML += `<a href="${href}"><span>${label}</span><sup>${tags}</sup></a>`;
} }
}); });
searchMenu.innerHTML = menuHTML; searchMenu.innerHTML = menuHTML;
@ -116,13 +128,13 @@ function searchResult(value) {
function searchSectionsResult(idx = 0) { function searchSectionsResult(idx = 0) {
const data = result[idx] || []; const data = result[idx] || [];
const title = (data.item?.intro || '').replace(new RegExp(inputValue, 'ig'), (txt) => { const title = (data.item?.intro || '').replace(getValueReg(inputValue), (txt) => {
return `<mark>${txt}</mark>` return `<mark>${txt}</mark>`
}); });
let sectionHTML = `<h3>${title}</h3><ol>`; let sectionHTML = `<h3>${title}</h3><ol>`;
if (data && data.item && data.item.sections) { if (data && data.item && data.item.sections) {
data.item.sections.forEach((item, idx) => { data.item.sections.forEach((item, idx) => {
const label = item.t.replace(new RegExp(inputValue, 'ig'), (txt) => { const label = item.t.replace(getValueReg(inputValue), (txt) => {
return `<mark>${txt}</mark>` return `<mark>${txt}</mark>`
}) })
const href = isHome ? data.item.path : data.item.path.replace('docs/', ''); const href = isHome ? data.item.path : data.item.path.replace('docs/', '');

View File

@ -1234,7 +1234,6 @@ body.search {
height: 100%; height: 100%;
} }
#mysearch.show .mysearch-result > * { #mysearch.show .mysearch-result > * {
width: 50%;
overflow-y: auto; overflow-y: auto;
padding: 0.6rem; padding: 0.6rem;
} }
@ -1319,12 +1318,24 @@ body.search {
white-space: pre-wrap; white-space: pre-wrap;
text-decoration: none; text-decoration: none;
color: var(--color-fg-default); color: var(--color-fg-default);
align-items: center;
justify-content: space-between;
}
#mysearch-menu a > sup {
color: var(--color-fg-subtle);
font-size: 0.7rem;
} }
#mysearch-menu a:hover, #mysearch-menu a:hover,
#mysearch-menu a.active { #mysearch-menu a.active {
background-color: var(--color-neutral-muted); background-color: var(--color-neutral-muted);
border-radius: 0.5rem; border-radius: 0.5rem;
} }
#mysearch-menu {
width: 25rem;
}
#mysearch-content {
flex: 1;
}
#mysearch-content ol li div a:hover { #mysearch-content ol li div a:hover {
background-color: var(--primary-color); background-color: var(--primary-color);
color: #fff; color: #fff;

View File

@ -1,7 +1,11 @@
import fs from 'fs-extra'; import fs from 'fs-extra';
import path from 'path'; import path from 'path';
import { getCodeString } from 'rehype-rewrite';
import { getSVGNode, ICONS_PATH } from './getSVGNode.mjs'; import { getSVGNode, ICONS_PATH } from './getSVGNode.mjs';
const resultHomeCard = {};
const COLOR_REG = /background:(\s+)?rgb\(([\d]+\s+[\d]+\s+[\d]+(\s+)?)\);?/gi;
export function homeCardIcons(node, parent, isHome) { export function homeCardIcons(node, parent, isHome) {
if ( if (
isHome && isHome &&
@ -22,16 +26,23 @@ export function homeCardIcons(node, parent, isHome) {
) { ) {
node.children = node.children.map((child) => { node.children = node.children.map((child) => {
const href = child.properties?.href; const href = child.properties?.href;
if (href) { if (href && href.endsWith('.md')) {
const iconName = path.basename(href, '.md'); const iconName = path.basename(href, '.md');
const iconPath = path.resolve(ICONS_PATH, `${iconName}.svg`); const iconPath = path.resolve(ICONS_PATH, `${iconName}.svg`);
const iconDefaultPath = path.resolve(ICONS_PATH, `list.svg`); const iconDefaultPath = path.resolve(ICONS_PATH, `list.svg`);
const iconExist = fs.existsSync(iconPath); const iconExist = fs.existsSync(iconPath);
let color = '';
child.properties.style = child.properties.style.replace(COLOR_REG, (str) => {
color = str.replace(COLOR_REG, '$2');
return str.replace(/(\);)/, '/ var(--bg-opacity)$1');
});
const tags = child.properties['data-lang'];
const labelNode = { const labelNode = {
type: 'element', type: 'element',
tagName: 'span', tagName: 'span',
children: child.children, children: child.children,
}; };
const title = getCodeString(child.children);
if (iconExist) { if (iconExist) {
const svgNode = getSVGNode(iconPath); const svgNode = getSVGNode(iconPath);
child.children = [...svgNode, labelNode]; child.children = [...svgNode, labelNode];
@ -39,8 +50,15 @@ export function homeCardIcons(node, parent, isHome) {
const svgNode = getSVGNode(iconDefaultPath); const svgNode = getSVGNode(iconDefaultPath);
child.children = [...svgNode, labelNode]; child.children = [...svgNode, labelNode];
} }
resultHomeCard[iconName] = {
md: iconName,
title: title,
rgb: color,
tags: tags ? tags.split('/') : [],
};
} }
return child; return child;
}); });
} }
return resultHomeCard;
} }