diff --git a/neutrino-proxy-server/src/main/java/fun/asgc/neutrino/proxy/server/base/db/DBInitialize.java b/neutrino-proxy-server/src/main/java/fun/asgc/neutrino/proxy/server/base/db/DBInitialize.java index bce3ea7e..02255a48 100644 --- a/neutrino-proxy-server/src/main/java/fun/asgc/neutrino/proxy/server/base/db/DBInitialize.java +++ b/neutrino-proxy-server/src/main/java/fun/asgc/neutrino/proxy/server/base/db/DBInitialize.java @@ -45,7 +45,7 @@ import java.util.List; @Slf4j @Component public class DBInitialize implements EventListener { - private static List initDataTableNameList = Lists.newArrayList("user", "license", "port_pool", "port_mapping", "job_info"); + private static List initDataTableNameList = Lists.newArrayList("user", "license", "port_group", "port_pool", "port_mapping", "job_info"); @Inject private DbConfig dbConfig; diff --git a/neutrino-proxy-server/src/main/resources/sql/mysql/init-structure.sql b/neutrino-proxy-server/src/main/resources/sql/mysql/init-structure.sql index 78fd65cd..502be1b6 100644 --- a/neutrino-proxy-server/src/main/resources/sql/mysql/init-structure.sql +++ b/neutrino-proxy-server/src/main/resources/sql/mysql/init-structure.sql @@ -29,6 +29,7 @@ CREATE TABLE IF NOT EXISTS `user_token` ( #端口池 CREATE TABLE IF NOT EXISTS `port_pool` ( `id` int NOT NULL AUTO_INCREMENT COMMENT '主键ID', + `group_id` int NOT NULL DEFAULT 1 COMMENT '分组ID', `port` int NOT NULL COMMENT '端口', `enable` int NOT NULL COMMENT '是否启用(1、启用 2、禁用)', `create_time` datetime(3) NOT NULL COMMENT '创建时间', @@ -37,6 +38,18 @@ CREATE TABLE IF NOT EXISTS `port_pool` ( KEY `I_port_pool_port` (`port`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +#端口分组 +CREATE TABLE IF NOT EXISTS `port_group` ( + `id` int NOT NULL AUTO_INCREMENT COMMENT '主键ID', + `name` varchar(255) NOT NULL COMMENT '分组名称', + `possessor_type` int NOT NULL DEFAULT '0' COMMENT '所有者类型 (0、全局共享 1、用户所有 2License所有) ', + `possessor_id` int NOT NULL DEFAULT '-1' COMMENT '所有者id(当type为0时 固定为-1、当type为1时为用户id 、当type为2时为licenseid)', + `enable` int NOT NULL COMMENT '是否启用(1、启用 2、禁用)', + `create_time` datetime(3) NOT NULL COMMENT '创建时间', + `update_time` datetime(3) NOT NULL COMMENT '更新时间', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='端口分组'; + #############################代理配置相关表############################# #license表 CREATE TABLE IF NOT EXISTS `license` ( @@ -66,7 +79,6 @@ CREATE TABLE IF NOT EXISTS `port_mapping` ( PRIMARY KEY (`id`), KEY `I_port_mapping_server_port` (`server_port`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; - #############################日志管理相关表############################# #用户登录记录表 CREATE TABLE IF NOT EXISTS `user_login_record` ( @@ -189,15 +201,4 @@ CREATE TABLE IF NOT EXISTS `flow_report_month` ( KEY `I_flow_report_month_date` (`date`) USING BTREE, KEY `I_flow_report_month_user_id` (`user_id`), KEY `I_flow_report_month_license_id` (`license_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; -#端口分组 -CREATE TABLE IF NOT EXISTS `port_group` ( - `id` int NOT NULL AUTO_INCREMENT COMMENT '主键ID', - `name` varchar(255) NOT NULL COMMENT '分组名称', - `possessor_type` int NOT NULL DEFAULT '0' COMMENT '所有者类型 (0、全局共享 1、用户所有 2License所有) ', - `possessor_id` int NOT NULL DEFAULT '-1' COMMENT '所有者id(当type为0时 固定为-1、当type为1时为用户id 、当type为2时为licenseid)', - `enable` int NOT NULL COMMENT '是否启用(1、启用 2、禁用)', - `create_time` datetime(3) NOT NULL COMMENT '创建时间', - `update_time` datetime(3) NOT NULL COMMENT '更新时间', - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='端口分组'; \ No newline at end of file +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; \ No newline at end of file diff --git a/neutrino-proxy-server/src/main/resources/sql/mysql/port_group.data.sql b/neutrino-proxy-server/src/main/resources/sql/mysql/port_group.data.sql index aa2893f5..65cdaebf 100644 --- a/neutrino-proxy-server/src/main/resources/sql/mysql/port_group.data.sql +++ b/neutrino-proxy-server/src/main/resources/sql/mysql/port_group.data.sql @@ -1,2 +1,3 @@ #port_group -INSERT INTO `port_group` VALUES (1, '全局(默认)', 0, -1, 1, now(), now()); +INSERT INTO `port_group`(`id`,`name`,`possessor_type`,`possessor_id`,`enable`,`create_time`,`update_time`) VALUES +(1, '全局(默认)', 0, -1, 1, now(), now()); diff --git a/neutrino-proxy-server/src/main/resources/sql/mysql/port_pool.data.sql b/neutrino-proxy-server/src/main/resources/sql/mysql/port_pool.data.sql index 3949bb75..e4288b13 100644 --- a/neutrino-proxy-server/src/main/resources/sql/mysql/port_pool.data.sql +++ b/neutrino-proxy-server/src/main/resources/sql/mysql/port_pool.data.sql @@ -1,41 +1,41 @@ #端口池 -INSERT INTO port_pool(`id`, `port`, `enable`, `create_time`, `update_time`) VALUES -(1, 9101, 1, now(), now()); -INSERT INTO port_pool(`id`, `port`, `enable`, `create_time`, `update_time`) VALUES -(2, 9102, 1, now(), now()); -INSERT INTO port_pool(`id`, `port`, `enable`, `create_time`, `update_time`) VALUES -(3, 9103, 1, now(), now()); -INSERT INTO port_pool(`id`, `port`, `enable`, `create_time`, `update_time`) VALUES -(4, 9104, 1, now(), now()); -INSERT INTO port_pool(`id`, `port`, `enable`, `create_time`, `update_time`) VALUES -(5, 9105, 1, now(), now()); -INSERT INTO port_pool(`id`, `port`, `enable`, `create_time`, `update_time`) VALUES -(6, 9106, 1, now(), now()); -INSERT INTO port_pool(`id`, `port`, `enable`, `create_time`, `update_time`) VALUES -(7, 9107, 1, now(), now()); -INSERT INTO port_pool(`id`, `port`, `enable`, `create_time`, `update_time`) VALUES -(8, 9108, 1, now(), now()); -INSERT INTO port_pool(`id`, `port`, `enable`, `create_time`, `update_time`) VALUES -(9, 9109, 1, now(), now()); -INSERT INTO port_pool(`id`, `port`, `enable`, `create_time`, `update_time`) VALUES -(10, 9110, 1, now(), now()); -INSERT INTO port_pool(`id`, `port`, `enable`, `create_time`, `update_time`) VALUES -(11, 9111, 1, now(), now()); -INSERT INTO port_pool(`id`, `port`, `enable`, `create_time`, `update_time`) VALUES -(12, 9112, 1, now(), now()); -INSERT INTO port_pool(`id`, `port`, `enable`, `create_time`, `update_time`) VALUES -(13, 9113, 1, now(), now()); -INSERT INTO port_pool(`id`, `port`, `enable`, `create_time`, `update_time`) VALUES -(14, 9114, 1, now(), now()); -INSERT INTO port_pool(`id`, `port`, `enable`, `create_time`, `update_time`) VALUES -(15, 9115, 1, now(), now()); -INSERT INTO port_pool(`id`, `port`, `enable`, `create_time`, `update_time`) VALUES -(16, 9116, 1, now(), now()); -INSERT INTO port_pool(`id`, `port`, `enable`, `create_time`, `update_time`) VALUES -(17, 9117, 1, now(), now()); -INSERT INTO port_pool(`id`, `port`, `enable`, `create_time`, `update_time`) VALUES -(18, 9118, 1, now(), now()); -INSERT INTO port_pool(`id`, `port`, `enable`, `create_time`, `update_time`) VALUES -(19, 9119, 1, now(), now()); -INSERT INTO port_pool(`id`, `port`, `enable`, `create_time`, `update_time`) VALUES -(20, 9120, 1, now(), now()); +INSERT INTO port_pool(`id`, `group_id`, `port`, `enable`, `create_time`, `update_time`) VALUES +(1, 1, 9101, 1, now(), now()); +INSERT INTO port_pool(`id`, `group_id`, `port`, `enable`, `create_time`, `update_time`) VALUES +(2, 1, 9102, 1, now(), now()); +INSERT INTO port_pool(`id`, `group_id`, `port`, `enable`, `create_time`, `update_time`) VALUES +(3, 1, 9103, 1, now(), now()); +INSERT INTO port_pool(`id`, `group_id`, `port`, `enable`, `create_time`, `update_time`) VALUES +(4, 1, 9104, 1, now(), now()); +INSERT INTO port_pool(`id`, `group_id`, `port`, `enable`, `create_time`, `update_time`) VALUES +(5, 1, 9105, 1, now(), now()); +INSERT INTO port_pool(`id`, `group_id`, `port`, `enable`, `create_time`, `update_time`) VALUES +(6, 1, 9106, 1, now(), now()); +INSERT INTO port_pool(`id`, `group_id`, `port`, `enable`, `create_time`, `update_time`) VALUES +(7, 1, 9107, 1, now(), now()); +INSERT INTO port_pool(`id`, `group_id`, `port`, `enable`, `create_time`, `update_time`) VALUES +(8, 1, 9108, 1, now(), now()); +INSERT INTO port_pool(`id`, `group_id`, `port`, `enable`, `create_time`, `update_time`) VALUES +(9, 1, 9109, 1, now(), now()); +INSERT INTO port_pool(`id`, `group_id`, `port`, `enable`, `create_time`, `update_time`) VALUES +(10, 1, 9110, 1, now(), now()); +INSERT INTO port_pool(`id`, `group_id`, `port`, `enable`, `create_time`, `update_time`) VALUES +(11, 1, 9111, 1, now(), now()); +INSERT INTO port_pool(`id`, `group_id`, `port`, `enable`, `create_time`, `update_time`) VALUES +(12, 1, 9112, 1, now(), now()); +INSERT INTO port_pool(`id`, `group_id`, `port`, `enable`, `create_time`, `update_time`) VALUES +(13, 1, 9113, 1, now(), now()); +INSERT INTO port_pool(`id`, `group_id`, `port`, `enable`, `create_time`, `update_time`) VALUES +(14, 1, 9114, 1, now(), now()); +INSERT INTO port_pool(`id`, `group_id`, `port`, `enable`, `create_time`, `update_time`) VALUES +(15, 1, 9115, 1, now(), now()); +INSERT INTO port_pool(`id`, `group_id`, `port`, `enable`, `create_time`, `update_time`) VALUES +(16, 1, 9116, 1, now(), now()); +INSERT INTO port_pool(`id`, `group_id`, `port`, `enable`, `create_time`, `update_time`) VALUES +(17, 1, 9117, 1, now(), now()); +INSERT INTO port_pool(`id`, `group_id`, `port`, `enable`, `create_time`, `update_time`) VALUES +(18, 1, 9118, 1, now(), now()); +INSERT INTO port_pool(`id`, `group_id`, `port`, `enable`, `create_time`, `update_time`) VALUES +(19, 1, 9119, 1, now(), now()); +INSERT INTO port_pool(`id`, `group_id`, `port`, `enable`, `create_time`, `update_time`) VALUES +(20, 1, 9120, 1, now(), now()); diff --git a/neutrino-proxy-server/src/main/resources/sql/sqlite/init-structure.sql b/neutrino-proxy-server/src/main/resources/sql/sqlite/init-structure.sql index 759ea1cb..149617ce 100644 --- a/neutrino-proxy-server/src/main/resources/sql/sqlite/init-structure.sql +++ b/neutrino-proxy-server/src/main/resources/sql/sqlite/init-structure.sql @@ -27,6 +27,7 @@ CREATE INDEX IF NOT EXISTS I_user_token_expiration_time ON user_token(expiration #端口池 CREATE TABLE IF NOT EXISTS `port_pool` ( `id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, + `group_id` INTEGER NOT NULL DEFAULT 1, `port` INTEGER NOT NULL, `enable` INTEGER(2) NOT NULL, `update_time` INTEGER(20) NOT NULL, @@ -34,6 +35,16 @@ CREATE TABLE IF NOT EXISTS `port_pool` ( ); CREATE UNIQUE INDEX IF NOT EXISTS I_port_pool_port ON port_pool (port ASC); +#端口分组 +CREATE TABLE IF NOT EXISTS `port_group` ( + `id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, + `name` VARCHAR(255) NOT NULL, + `possessor_type` INTEGER NOT NULL DEFAULT '0', + `possessor_id` INTEGER NOT NULL DEFAULT '-1', + `enable` INTEGER NOT NULL, + `create_time` datetime(3) NOT NULL, + `update_time` datetime(3) NOT NULL +); #############################代理配置相关表############################# #license表 CREATE TABLE IF NOT EXISTS `license` ( diff --git a/neutrino-proxy-server/src/main/resources/sql/sqlite/port_group.data.sql b/neutrino-proxy-server/src/main/resources/sql/sqlite/port_group.data.sql new file mode 100644 index 00000000..49294b9f --- /dev/null +++ b/neutrino-proxy-server/src/main/resources/sql/sqlite/port_group.data.sql @@ -0,0 +1,3 @@ +#port_group +INSERT INTO `port_group`(`id`,`name`,`possessor_type`,`possessor_id`,`enable`,`create_time`,`update_time`) VALUES +(1, '全局(默认)', 0, -1, 1, STRFTIME('%s000', 'NOW'), STRFTIME('%s000', 'NOW')); diff --git a/neutrino-proxy-server/src/main/resources/sql/sqlite/port_pool.data.sql b/neutrino-proxy-server/src/main/resources/sql/sqlite/port_pool.data.sql index 7bebe281..2beefa6c 100644 --- a/neutrino-proxy-server/src/main/resources/sql/sqlite/port_pool.data.sql +++ b/neutrino-proxy-server/src/main/resources/sql/sqlite/port_pool.data.sql @@ -1,41 +1,41 @@ #端口池 -INSERT INTO port_pool(`id`, `port`, `enable`, `create_time`, `update_time`) VALUES -(1, 9101, 1, STRFTIME('%s000', 'NOW'), STRFTIME('%s000', 'NOW')); -INSERT INTO port_pool(`id`, `port`, `enable`, `create_time`, `update_time`) VALUES -(2, 9102, 1, STRFTIME('%s000', 'NOW'), STRFTIME('%s000', 'NOW')); -INSERT INTO port_pool(`id`, `port`, `enable`, `create_time`, `update_time`) VALUES -(3, 9103, 1, STRFTIME('%s000', 'NOW'), STRFTIME('%s000', 'NOW')); -INSERT INTO port_pool(`id`, `port`, `enable`, `create_time`, `update_time`) VALUES -(4, 9104, 1, STRFTIME('%s000', 'NOW'), STRFTIME('%s000', 'NOW')); -INSERT INTO port_pool(`id`, `port`, `enable`, `create_time`, `update_time`) VALUES -(5, 9105, 1, STRFTIME('%s000', 'NOW'), STRFTIME('%s000', 'NOW')); -INSERT INTO port_pool(`id`, `port`, `enable`, `create_time`, `update_time`) VALUES -(6, 9106, 1, STRFTIME('%s000', 'NOW'), STRFTIME('%s000', 'NOW')); -INSERT INTO port_pool(`id`, `port`, `enable`, `create_time`, `update_time`) VALUES -(7, 9107, 1, STRFTIME('%s000', 'NOW'), STRFTIME('%s000', 'NOW')); -INSERT INTO port_pool(`id`, `port`, `enable`, `create_time`, `update_time`) VALUES -(8, 9108, 1, STRFTIME('%s000', 'NOW'), STRFTIME('%s000', 'NOW')); -INSERT INTO port_pool(`id`, `port`, `enable`, `create_time`, `update_time`) VALUES -(9, 9109, 1, STRFTIME('%s000', 'NOW'), STRFTIME('%s000', 'NOW')); -INSERT INTO port_pool(`id`, `port`, `enable`, `create_time`, `update_time`) VALUES -(10, 9110, 1, STRFTIME('%s000', 'NOW'), STRFTIME('%s000', 'NOW')); -INSERT INTO port_pool(`id`, `port`, `enable`, `create_time`, `update_time`) VALUES -(11, 9111, 1, STRFTIME('%s000', 'NOW'), STRFTIME('%s000', 'NOW')); -INSERT INTO port_pool(`id`, `port`, `enable`, `create_time`, `update_time`) VALUES -(12, 9112, 1, STRFTIME('%s000', 'NOW'), STRFTIME('%s000', 'NOW')); -INSERT INTO port_pool(`id`, `port`, `enable`, `create_time`, `update_time`) VALUES -(13, 9113, 1, STRFTIME('%s000', 'NOW'), STRFTIME('%s000', 'NOW')); -INSERT INTO port_pool(`id`, `port`, `enable`, `create_time`, `update_time`) VALUES -(14, 9114, 1, STRFTIME('%s000', 'NOW'), STRFTIME('%s000', 'NOW')); -INSERT INTO port_pool(`id`, `port`, `enable`, `create_time`, `update_time`) VALUES -(15, 9115, 1, STRFTIME('%s000', 'NOW'), STRFTIME('%s000', 'NOW')); -INSERT INTO port_pool(`id`, `port`, `enable`, `create_time`, `update_time`) VALUES -(16, 9116, 1, STRFTIME('%s000', 'NOW'), STRFTIME('%s000', 'NOW')); -INSERT INTO port_pool(`id`, `port`, `enable`, `create_time`, `update_time`) VALUES -(17, 9117, 1, STRFTIME('%s000', 'NOW'), STRFTIME('%s000', 'NOW')); -INSERT INTO port_pool(`id`, `port`, `enable`, `create_time`, `update_time`) VALUES -(18, 9118, 1, STRFTIME('%s000', 'NOW'), STRFTIME('%s000', 'NOW')); -INSERT INTO port_pool(`id`, `port`, `enable`, `create_time`, `update_time`) VALUES -(19, 9119, 1, STRFTIME('%s000', 'NOW'), STRFTIME('%s000', 'NOW')); -INSERT INTO port_pool(`id`, `port`, `enable`, `create_time`, `update_time`) VALUES -(20, 9120, 1, STRFTIME('%s000', 'NOW'), STRFTIME('%s000', 'NOW')); +INSERT INTO port_pool(`id`, `group_id`, `port`, `enable`, `create_time`, `update_time`) VALUES +(1, 1, 9101, 1, STRFTIME('%s000', 'NOW'), STRFTIME('%s000', 'NOW')); +INSERT INTO port_pool(`id`, `group_id`, `port`, `enable`, `create_time`, `update_time`) VALUES +(2, 1, 9102, 1, STRFTIME('%s000', 'NOW'), STRFTIME('%s000', 'NOW')); +INSERT INTO port_pool(`id`, `group_id`, `port`, `enable`, `create_time`, `update_time`) VALUES +(3, 1, 9103, 1, STRFTIME('%s000', 'NOW'), STRFTIME('%s000', 'NOW')); +INSERT INTO port_pool(`id`, `group_id`, `port`, `enable`, `create_time`, `update_time`) VALUES +(4, 1, 9104, 1, STRFTIME('%s000', 'NOW'), STRFTIME('%s000', 'NOW')); +INSERT INTO port_pool(`id`, `group_id`, `port`, `enable`, `create_time`, `update_time`) VALUES +(5, 1, 9105, 1, STRFTIME('%s000', 'NOW'), STRFTIME('%s000', 'NOW')); +INSERT INTO port_pool(`id`, `group_id`, `port`, `enable`, `create_time`, `update_time`) VALUES +(6, 1, 9106, 1, STRFTIME('%s000', 'NOW'), STRFTIME('%s000', 'NOW')); +INSERT INTO port_pool(`id`, `group_id`, `port`, `enable`, `create_time`, `update_time`) VALUES +(7, 1, 9107, 1, STRFTIME('%s000', 'NOW'), STRFTIME('%s000', 'NOW')); +INSERT INTO port_pool(`id`, `group_id`, `port`, `enable`, `create_time`, `update_time`) VALUES +(8, 1, 9108, 1, STRFTIME('%s000', 'NOW'), STRFTIME('%s000', 'NOW')); +INSERT INTO port_pool(`id`, `group_id`, `port`, `enable`, `create_time`, `update_time`) VALUES +(9, 1, 9109, 1, STRFTIME('%s000', 'NOW'), STRFTIME('%s000', 'NOW')); +INSERT INTO port_pool(`id`, `group_id`, `port`, `enable`, `create_time`, `update_time`) VALUES +(10, 1, 9110, 1, STRFTIME('%s000', 'NOW'), STRFTIME('%s000', 'NOW')); +INSERT INTO port_pool(`id`, `group_id`, `port`, `enable`, `create_time`, `update_time`) VALUES +(11, 1, 9111, 1, STRFTIME('%s000', 'NOW'), STRFTIME('%s000', 'NOW')); +INSERT INTO port_pool(`id`, `group_id`, `port`, `enable`, `create_time`, `update_time`) VALUES +(12, 1, 9112, 1, STRFTIME('%s000', 'NOW'), STRFTIME('%s000', 'NOW')); +INSERT INTO port_pool(`id`, `group_id`, `port`, `enable`, `create_time`, `update_time`) VALUES +(13, 1, 9113, 1, STRFTIME('%s000', 'NOW'), STRFTIME('%s000', 'NOW')); +INSERT INTO port_pool(`id`, `group_id`, `port`, `enable`, `create_time`, `update_time`) VALUES +(14, 1, 9114, 1, STRFTIME('%s000', 'NOW'), STRFTIME('%s000', 'NOW')); +INSERT INTO port_pool(`id`, `group_id`, `port`, `enable`, `create_time`, `update_time`) VALUES +(15, 1, 9115, 1, STRFTIME('%s000', 'NOW'), STRFTIME('%s000', 'NOW')); +INSERT INTO port_pool(`id`, `group_id`, `port`, `enable`, `create_time`, `update_time`) VALUES +(16, 1, 9116, 1, STRFTIME('%s000', 'NOW'), STRFTIME('%s000', 'NOW')); +INSERT INTO port_pool(`id`, `group_id`, `port`, `enable`, `create_time`, `update_time`) VALUES +(17, 1, 9117, 1, STRFTIME('%s000', 'NOW'), STRFTIME('%s000', 'NOW')); +INSERT INTO port_pool(`id`, `group_id`, `port`, `enable`, `create_time`, `update_time`) VALUES +(18, 1, 9118, 1, STRFTIME('%s000', 'NOW'), STRFTIME('%s000', 'NOW')); +INSERT INTO port_pool(`id`, `group_id`, `port`, `enable`, `create_time`, `update_time`) VALUES +(19, 1, 9119, 1, STRFTIME('%s000', 'NOW'), STRFTIME('%s000', 'NOW')); +INSERT INTO port_pool(`id`, `group_id`, `port`, `enable`, `create_time`, `update_time`) VALUES +(20, 1, 9120, 1, STRFTIME('%s000', 'NOW'), STRFTIME('%s000', 'NOW')); diff --git a/neutrino-proxy-vuepress/.gitignore b/neutrino-proxy-vuepress/.gitignore new file mode 100644 index 00000000..144efaa7 --- /dev/null +++ b/neutrino-proxy-vuepress/.gitignore @@ -0,0 +1,19 @@ +# npm +package-lock.json +node_modules +yarn-error.log + +# vscode +.vscode + +#yarn +yarn.lock + +# vuepress +docs/.vuepress/dist + +# 百度链接推送 +urls.txt + +# mac +.DS_Store diff --git a/neutrino-proxy-vuepress/LICENSE b/neutrino-proxy-vuepress/LICENSE new file mode 100644 index 00000000..16d67321 --- /dev/null +++ b/neutrino-proxy-vuepress/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2019-present gaoyi(Evan) Xu + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/neutrino-proxy-vuepress/README.MD b/neutrino-proxy-vuepress/README.MD new file mode 100644 index 00000000..58ac972a --- /dev/null +++ b/neutrino-proxy-vuepress/README.MD @@ -0,0 +1,10 @@ +

logo

+ + +

vuepress-theme-vdoing

+ +[在线文档(国内源)](https://doc.xugaoyi.com/) + +[主题仓库](https://github.com/xugaoyi/vuepress-theme-vdoing) + +[本仓库的gitee镜像](https://gitee.com/xugaoyi/vuepress-theme-vdoing-doc) diff --git a/neutrino-proxy-vuepress/docs/.vuepress/config.js b/neutrino-proxy-vuepress/docs/.vuepress/config.js new file mode 100644 index 00000000..fcf55298 --- /dev/null +++ b/neutrino-proxy-vuepress/docs/.vuepress/config.js @@ -0,0 +1,239 @@ +const baiduCode = require('./config/baiduCode.js'); // 百度统计hm码 +const htmlModules = require('./config/htmlModules.js'); + + +module.exports = { + + theme: 'vdoing', // 使用依赖包主题 + // theme: require.resolve('../../vdoing'), // 使用本地主题 (先将vdoing主题文件下载到本地:https://github.com/xugaoyi/vuepress-theme-vdoing) + + title: "中微子代理", + description: '一个基于VuePress的 知识管理&博客 主题', + // base: '/', // 默认'/'。如果你想将你的网站部署到如 https://foo.github.io/bar/,那么 base 应该被设置成 "/bar/",(否则页面将失去样式等文件) + head: [ // 注入到页面 中的标签,格式[tagName, { attrName: attrValue }, innerHTML?] + ['link', { rel: 'icon', href: '/img/favicon.ico' }], //favicons,资源放在public文件夹 + ['meta', { name: 'keywords', content: 'vuepress,theme,blog,vdoing' }], + ['meta', { name: 'theme-color', content: '#11a8cd' }], // 移动浏览器主题颜色 + + ['meta', { name: 'wwads-cn-verify', content: '6c4b761a28b734fe93831e3fb400ce87' }], // 广告相关,你可以去掉 + ['script', { src: 'https://cdn.wwads.cn/js/makemoney.js', type: 'text/javascript' }], // 广告相关,你可以去掉 + ], + + // 主题配置 + themeConfig: { + // nav: [ + // { text: '首页', link: '/' }, + // { + // text: '指南', link: '/pages/a2f161/', items: [ + // { text: '主题初衷与诞生', link: '/pages/52d5c3/' }, + // { text: '介绍', link: '/pages/a2f161/' }, + // { text: '快速上手', link: '/pages/793dcb/' }, + // { text: '目录结构', link: '/pages/2f674a/' }, + // { text: '核心配置和约定', link: '/pages/33d574/' }, + // { text: '自动生成front matter', link: '/pages/088c16/' }, + // { text: 'Markdown 容器', link: '/pages/d0d7eb/' }, + // { text: 'Markdown 中使用组件', link: '/pages/197691/' }, + // { + // text: '相关文章', items: [ + // { text: '使目录栏支持h2~h6标题', link: '/pages/8dfab5/' }, + // { text: '如何让你的笔记更有表现力', link: '/pages/dd027d/' }, + // { text: '批量操作front matter工具', link: '/pages/2b8e22/' }, + // { text: '部署', link: '/pages/0fc1d2/' }, + // { text: '关于写文章和H1标题', link: '/pages/9ae0bd/' }, + // { text: '关于博客搭建与管理', link: '/pages/26997d/' }, + // { text: '在线编辑和新增文章的方法', link: '/pages/c5a54d/' }, + // ] + // } + // ] + // }, + // { + // text: '配置', link: '/pages/a20ce8/', items: [ + // { text: '主题配置', link: '/pages/a20ce8/' }, + // { text: '首页配置', link: '/pages/f14bdb/' }, + // { text: 'front matter配置', link: '/pages/3216b0/' }, + // { text: '目录页配置', link: '/pages/54651a/' }, + // { text: '添加摘要', link: '/pages/1cc523/' }, + // { text: '修改主题颜色和样式', link: '/pages/f51918/' }, + // { text: '评论栏', link: '/pages/ce175c/' }, + // ] + // }, + // { text: '资源', link: '/pages/db78e2/' }, + // { text: '案例', link: '/pages/5d571c/' }, + // { text: '问答', link: '/pages/9cc27d/' }, + // { text: '赞助', link: '/pages/1b12ed/' }, + // ], + nav: [ + { text: '首页', link: '/' }, + { + text: '使用教程', link: '/pages/a2f161/', items: [ + { text: '主题初衷与诞生', link: '/pages/52d5c3/' }, + { text: '介绍', link: '/pages/a2f161/' }, + { text: '快速上手', link: '/pages/793dcb/' }, + { text: '目录结构', link: '/pages/2f674a/' }, + { text: '核心配置和约定', link: '/pages/33d574/' }, + { text: '自动生成front matter', link: '/pages/088c16/' }, + { text: 'Markdown 容器', link: '/pages/d0d7eb/' }, + { text: 'Markdown 中使用组件', link: '/pages/197691/' } + ] + }, + { + text: '常见问题', link: '/pages/a20ce8/', items: [ + { text: '主题配置', link: '/pages/a20ce8/' }, + { text: '首页配置', link: '/pages/f14bdb/' }, + { text: 'front matter配置', link: '/pages/3216b0/' }, + { text: '目录页配置', link: '/pages/54651a/' }, + { text: '添加摘要', link: '/pages/1cc523/' }, + { text: '修改主题颜色和样式', link: '/pages/f51918/' }, + { text: '评论栏', link: '/pages/ce175c/' }, + ] + }, + { text: '演示', link: '/pages/db78e2/' }, + { text: '案例', link: '/pages/5d571c/' }, + { text: '最近更新', link: '/pages/9cc27d/' }, + { text: '仓库地址', link: '/pages/1b12ed/' }, + ], + sidebarDepth: 2, // 侧边栏显示深度,默认1,最大2(显示到h3标题) + logo: '/img/logo.png', // 导航栏logo + repo: 'xugaoyi/vuepress-theme-vdoing', // 导航栏右侧生成Github链接 + // repo: 'https://gitee.com/dromara/neutrino-proxy', // 导航栏右侧生成Github链接 + searchMaxSuggestions: 10, // 搜索结果显示最大数 + lastUpdated: '上次更新', // 更新的时间,及前缀文字 string | boolean (取值为git提交时间) + + // docsDir: 'docs', // 编辑的文件夹 + // editLinks: true, // 编辑链接 + // editLinkText: '编辑', + + // 以下配置是Vdoing主题改动的和新增的配置 + sidebar: { mode: 'structuring', collapsable: false }, // 侧边栏 'structuring' | { mode: 'structuring', collapsable: Boolean} | 'auto' | 自定义 温馨提示:目录页数据依赖于结构化的侧边栏数据,如果你不设置为'structuring',将无法使用目录页 + + // sidebarOpen: false, // 初始状态是否打开侧边栏,默认true + updateBar: { // 最近更新栏 + showToArticle: false, // 显示到文章页底部,默认true + // moreArticle: '/archives' // “更多文章”跳转的页面,默认'/archives' + }, + // titleBadge: false, // 文章标题前的图标是否显示,默认true + // titleBadgeIcons: [ // 文章标题前图标的地址,默认主题内置图标 + // '图标地址1', + // '图标地址2' + // ], + + pageStyle: 'line', // 页面风格,可选值:'card'卡片 | 'line' 线(未设置bodyBgImg时才生效), 默认'card'。 说明:card时背景显示灰色衬托出卡片样式,line时背景显示纯色,并且部分模块带线条边框 + + // contentBgStyle: 1, + + category: false, // 是否打开分类功能,默认true。 如打开,会做的事情有:1. 自动生成的frontmatter包含分类字段 2.页面中显示与分类相关的信息和模块 3.自动生成分类页面(在@pages文件夹)。如关闭,则反之。 + tag: false, // 是否打开标签功能,默认true。 如打开,会做的事情有:1. 自动生成的frontmatter包含标签字段 2.页面中显示与标签相关的信息和模块 3.自动生成标签页面(在@pages文件夹)。如关闭,则反之。 + // archive: false, // 是否打开归档功能,默认true。 如打开,会做的事情有:1.自动生成归档页面(在@pages文件夹)。如关闭,则反之。 + + author: { // 文章默认的作者信息,可在md文件中单独配置此信息 String | {name: String, href: String} + name: 'Evan Xu', // 必需 + href: 'https://github.com/xugaoyi' // 可选的 + }, + social: { // 社交图标,显示于博主信息栏和页脚栏 + // iconfontCssFile: '//at.alicdn.com/t/font_1678482_u4nrnp8xp6g.css', // 可选,阿里图标库在线css文件地址,对于主题没有的图标可自由添加 + icons: [ + { + iconClass: 'icon-youjian', + title: '发邮件', + link: 'mailto:aoshiguchen@dromara.org' + }, + { + iconClass: 'icon-gitee', + title: 'Gitee', + link: 'https://gitee.com/dromara/neutrino-proxy' + }, + { + iconClass: 'icon-github', + title: 'Github', + link: 'https://github.com/aoshiguchen/neutrino-proxy' + } + ] + }, + footer: { // 页脚信息 + createYear: 2023, // 博客创建年份 + copyrightInfo: '傲世孤尘 | MIT License', // 博客版权信息,支持a标签 + }, + htmlModules, + }, + + // 插件 + plugins: [ + // [require('./plugins/love-me'), { // 鼠标点击爱心特效 + // color: '#11a8cd', // 爱心颜色,默认随机色 + // excludeClassName: 'theme-vdoing-content' // 要排除元素的class, 默认空'' + // }], + + ['fulltext-search'], // 全文搜索 + + // ['thirdparty-search', { // 可以添加第三方搜索链接的搜索框(原官方搜索框的参数仍可用) + // thirdparty: [ // 可选,默认 [] + // { + // title: '在GitHub中搜索', + // frontUrl: 'https://github.com/search?q=', // 搜索链接的前面部分 + // behindUrl: '' // 搜索链接的后面部分,可选,默认 '' + // }, + // { + // title: '在npm中搜索', + // frontUrl: 'https://www.npmjs.com/search?q=', + // }, + // { + // title: '在Bing中搜索', + // frontUrl: 'https://cn.bing.com/search?q=' + // } + // ] + // }], + + [ + 'vuepress-plugin-baidu-tongji', // 百度统计 + { + hm: baiduCode || '01293bffa6c3962016c08ba685c79d78' + } + ], + + ['one-click-copy', { // 代码块复制按钮 + copySelector: ['div[class*="language-"] pre', 'div[class*="aside-code"] aside'], // String or Array + copyMessage: '复制成功', // default is 'Copy successfully and then paste it for use.' + duration: 1000, // prompt message display time. + showInMobile: false // whether to display on the mobile side, default: false. + }], + ['demo-block', { // demo演示模块 https://github.com/xiguaxigua/vuepress-plugin-demo-block + settings: { + // jsLib: ['http://xxx'], // 在线示例(jsfiddle, codepen)中的js依赖 + // cssLib: ['http://xxx'], // 在线示例中的css依赖 + // vue: 'https://fastly.jsdelivr.net/npm/vue/dist/vue.min.js', // 在线示例中的vue依赖 + jsfiddle: false, // 是否显示 jsfiddle 链接 + codepen: true, // 是否显示 codepen 链接 + horizontal: false // 是否展示为横向样式 + } + }], + [ + 'vuepress-plugin-zooming', // 放大图片 + { + selector: '.theme-vdoing-content img:not(.no-zoom)', + options: { + bgColor: 'rgba(0,0,0,0.6)' + }, + }, + ], + [ + '@vuepress/last-updated', // "上次更新"时间格式 + { + transformer: (timestamp, lang) => { + const dayjs = require('dayjs') // https://day.js.org/ + return dayjs(timestamp).format('YYYY/MM/DD, HH:mm:ss') + }, + } + ] + ], + + markdown: { + // lineNumbers: true, + extractHeaders: ['h2', 'h3', 'h4', 'h5', 'h6'], // 提取标题到侧边栏的级别,默认['h2', 'h3'] + }, + + // 监听文件变化并重新构建 + extraWatchFiles: [ + '.vuepress/config.js', + '.vuepress/config/htmlModules.js', + ] +} diff --git a/neutrino-proxy-vuepress/docs/.vuepress/config/baiduCode.js b/neutrino-proxy-vuepress/docs/.vuepress/config/baiduCode.js new file mode 100644 index 00000000..9dc5fc1e --- /dev/null +++ b/neutrino-proxy-vuepress/docs/.vuepress/config/baiduCode.js @@ -0,0 +1 @@ +module.exports = ''; diff --git a/neutrino-proxy-vuepress/docs/.vuepress/config/htmlModules.js b/neutrino-proxy-vuepress/docs/.vuepress/config/htmlModules.js new file mode 100644 index 00000000..ae94d045 --- /dev/null +++ b/neutrino-proxy-vuepress/docs/.vuepress/config/htmlModules.js @@ -0,0 +1,75 @@ +/** 插入自定义html模块 (可用于插入广告模块等) + * { + * homeSidebarB: htmlString, 首页侧边栏底部 + * + * sidebarT: htmlString, 全局左侧边栏顶部 + * sidebarB: htmlString, 全局左侧边栏底部 + * + * pageT: htmlString, 全局页面顶部 + * pageB: htmlString, 全局页面底部 + * pageTshowMode: string, 页面顶部-显示方式:未配置默认全局;'article' => 仅文章页①; 'custom' => 仅自定义页① + * pageBshowMode: string, 页面底部-显示方式:未配置默认全局;'article' => 仅文章页①; 'custom' => 仅自定义页① + * + * windowLB: htmlString, 全局左下角② + * windowRB: htmlString, 全局右下角② + * } + * + * ①注:在.md文件front matter配置`article: false`的页面是自定义页,未配置的默认是文章页(首页除外)。 + * ②注:windowLB 和 windowRB:1.展示区块最大宽高200px*400px。2.请给自定义元素定一个不超过200px*400px的宽高。3.在屏幕宽度小于960px时无论如何都不会显示。 + */ + + +module.exports = { + // 万维广告 + pageT: ` +
+ + `, + // 赞助商广告 + sidebarT: `npm`, + + + // windowRB: ` + //
+ // + // ` +} + + +// module.exports = { +// homeSidebarB: `
自定义模块测试
`, +// sidebarT: `
自定义模块测试
`, +// sidebarB: `
自定义模块测试
`, +// pageT: `
自定义模块测试
`, +// pageB: `
自定义模块测试
`, +// windowLB: `
自定义模块测试
`, +// windowRB: `
自定义模块测试
`, +// } diff --git a/neutrino-proxy-vuepress/docs/.vuepress/enhanceApp.js b/neutrino-proxy-vuepress/docs/.vuepress/enhanceApp.js new file mode 100644 index 00000000..522ba0da --- /dev/null +++ b/neutrino-proxy-vuepress/docs/.vuepress/enhanceApp.js @@ -0,0 +1,59 @@ +/** + * to主题使用者:你可以去掉本文件的所有代码 + */ +export default ({ + Vue, // VuePress 正在使用的 Vue 构造函数 + options, // 附加到根实例的一些选项 + router, // 当前应用的路由实例 + siteData, // 站点元数据 + isServer // 当前应用配置是处于 服务端渲染 还是 客户端 +}) => { + + // 用于监控在路由变化时检查广告拦截器 (to主题使用者:你可以去掉本文件的所有代码) + if (!isServer) { + router.afterEach(() => { + //check if wwads' fire function was blocked after document is ready with 3s timeout (waiting the ad loading) + docReady(function () { + setTimeout(function () { + if (window._AdBlockInit === undefined) { + ABDetected(); + } + }, 3000); + }); + + // 删除事件改为隐藏事件 + setTimeout(() => { + const pageAD = document.querySelector('.page-wwads'); + if (!pageAD) return; + const btnEl = pageAD.querySelector('.wwads-hide'); + if (btnEl) { + btnEl.onclick = () => { + pageAD.style.display = 'none'; + } + } + // 显示广告模块 + if (pageAD.style.display === 'none') { + pageAD.style.display = 'flex'; + } + }, 900); + }) + } +} + + +function ABDetected() { + const h = ""; + const wwadsEl = document.getElementsByClassName("wwads-cn"); + const wwadsContentEl = document.querySelector('.wwads-content'); + if (wwadsEl[0] && !wwadsContentEl) { + wwadsEl[0].innerHTML = h; + } +}; + +//check document ready +function docReady(t) { + "complete" === document.readyState || + "interactive" === document.readyState + ? setTimeout(t, 1) + : document.addEventListener("DOMContentLoaded", t); +} diff --git a/neutrino-proxy-vuepress/docs/.vuepress/plugins/love-me/index.js b/neutrino-proxy-vuepress/docs/.vuepress/plugins/love-me/index.js new file mode 100644 index 00000000..674294c2 --- /dev/null +++ b/neutrino-proxy-vuepress/docs/.vuepress/plugins/love-me/index.js @@ -0,0 +1,12 @@ +const path= require('path'); +const LoveMyPlugin = (options={}) => ({ + define () { + const COLOR = options.color || "rgb(" + ~~ (255 * Math.random()) + "," + ~~ (255 * Math.random()) + "," + ~~ (255 * Math.random()) + ")" + const EXCLUDECLASS = options.excludeClassName || '' + return {COLOR, EXCLUDECLASS} + }, + enhanceAppFiles: [ + path.resolve(__dirname, 'love-me.js') + ] +}); +module.exports = LoveMyPlugin; diff --git a/neutrino-proxy-vuepress/docs/.vuepress/plugins/love-me/love-me.js b/neutrino-proxy-vuepress/docs/.vuepress/plugins/love-me/love-me.js new file mode 100644 index 00000000..f93855e6 --- /dev/null +++ b/neutrino-proxy-vuepress/docs/.vuepress/plugins/love-me/love-me.js @@ -0,0 +1,62 @@ +export default () => { + if (typeof window !== "undefined") { + (function(e, t, a) { + function r() { + for (var e = 0; e < s.length; e++) s[e].alpha <= 0 ? (t.body.removeChild(s[e].el), s.splice(e, 1)) : (s[e].y--, s[e].scale += .004, s[e].alpha -= .013, s[e].el.style.cssText = "left:" + s[e].x + "px;top:" + s[e].y + "px;opacity:" + s[e].alpha + ";transform:scale(" + s[e].scale + "," + s[e].scale + ") rotate(45deg);background:" + s[e].color + ";z-index:99999"); + requestAnimationFrame(r) + } + function n() { + var t = "function" == typeof e.onclick && e.onclick; + + e.onclick = function(e) { + // 过滤指定元素 + let mark = true; + EXCLUDECLASS && e.path && e.path.forEach((item) =>{ + if(item.nodeType === 1) { + typeof item.className === 'string' && item.className.indexOf(EXCLUDECLASS) > -1 ? mark = false : '' + } + }) + + if(mark) { + t && t(), + o(e) + } + } + } + function o(e) { + var a = t.createElement("div"); + a.className = "heart", + s.push({ + el: a, + x: e.clientX - 5, + y: e.clientY - 5, + scale: 1, + alpha: 1, + color: COLOR + }), + t.body.appendChild(a) + } + function i(e) { + var a = t.createElement("style"); + a.type = "text/css"; + try { + a.appendChild(t.createTextNode(e)) + } catch(t) { + a.styleSheet.cssText = e + } + t.getElementsByTagName("head")[0].appendChild(a) + } + // function c() { + // return "rgb(" + ~~ (255 * Math.random()) + "," + ~~ (255 * Math.random()) + "," + ~~ (255 * Math.random()) + ")" + // } + var s = []; + e.requestAnimationFrame = e.requestAnimationFrame || e.webkitRequestAnimationFrame || e.mozRequestAnimationFrame || e.oRequestAnimationFrame || e.msRequestAnimationFrame || + function(e) { + setTimeout(e, 1e3 / 60) + }, + i(".heart{width: 10px;height: 10px;position: fixed;background: #f00;transform: rotate(45deg);-webkit-transform: rotate(45deg);-moz-transform: rotate(45deg);}.heart:after,.heart:before{content: '';width: inherit;height: inherit;background: inherit;border-radius: 50%;-webkit-border-radius: 50%;-moz-border-radius: 50%;position: fixed;}.heart:after{top: -5px;}.heart:before{left: -5px;}"), + n(), + r() + })(window, document) + } +} \ No newline at end of file diff --git a/neutrino-proxy-vuepress/docs/.vuepress/public/img/Apifox-2.png b/neutrino-proxy-vuepress/docs/.vuepress/public/img/Apifox-2.png new file mode 100644 index 00000000..bf5f9c3c Binary files /dev/null and b/neutrino-proxy-vuepress/docs/.vuepress/public/img/Apifox-2.png differ diff --git a/neutrino-proxy-vuepress/docs/.vuepress/public/img/Apifox-860x320.png b/neutrino-proxy-vuepress/docs/.vuepress/public/img/Apifox-860x320.png new file mode 100644 index 00000000..a51315c6 Binary files /dev/null and b/neutrino-proxy-vuepress/docs/.vuepress/public/img/Apifox-860x320.png differ diff --git a/neutrino-proxy-vuepress/docs/.vuepress/public/img/bg.jpeg b/neutrino-proxy-vuepress/docs/.vuepress/public/img/bg.jpeg new file mode 100644 index 00000000..85e53e7d Binary files /dev/null and b/neutrino-proxy-vuepress/docs/.vuepress/public/img/bg.jpeg differ diff --git a/neutrino-proxy-vuepress/docs/.vuepress/public/img/bg.jpg b/neutrino-proxy-vuepress/docs/.vuepress/public/img/bg.jpg new file mode 100644 index 00000000..f093e799 Binary files /dev/null and b/neutrino-proxy-vuepress/docs/.vuepress/public/img/bg.jpg differ diff --git a/neutrino-proxy-vuepress/docs/.vuepress/public/img/favicon.ico b/neutrino-proxy-vuepress/docs/.vuepress/public/img/favicon.ico new file mode 100644 index 00000000..f7240fb6 Binary files /dev/null and b/neutrino-proxy-vuepress/docs/.vuepress/public/img/favicon.ico differ diff --git a/neutrino-proxy-vuepress/docs/.vuepress/public/img/gif/猫1.gif b/neutrino-proxy-vuepress/docs/.vuepress/public/img/gif/猫1.gif new file mode 100644 index 00000000..e84d8a28 Binary files /dev/null and b/neutrino-proxy-vuepress/docs/.vuepress/public/img/gif/猫1.gif differ diff --git a/neutrino-proxy-vuepress/docs/.vuepress/public/img/gif/猫2.gif b/neutrino-proxy-vuepress/docs/.vuepress/public/img/gif/猫2.gif new file mode 100644 index 00000000..28114599 Binary files /dev/null and b/neutrino-proxy-vuepress/docs/.vuepress/public/img/gif/猫2.gif differ diff --git a/neutrino-proxy-vuepress/docs/.vuepress/public/img/gif/猫3.gif b/neutrino-proxy-vuepress/docs/.vuepress/public/img/gif/猫3.gif new file mode 100644 index 00000000..894372d9 Binary files /dev/null and b/neutrino-proxy-vuepress/docs/.vuepress/public/img/gif/猫3.gif differ diff --git a/neutrino-proxy-vuepress/docs/.vuepress/public/img/gif/猫4.gif b/neutrino-proxy-vuepress/docs/.vuepress/public/img/gif/猫4.gif new file mode 100644 index 00000000..7b991309 Binary files /dev/null and b/neutrino-proxy-vuepress/docs/.vuepress/public/img/gif/猫4.gif differ diff --git a/neutrino-proxy-vuepress/docs/.vuepress/public/img/logo-text-cross.png b/neutrino-proxy-vuepress/docs/.vuepress/public/img/logo-text-cross.png new file mode 100644 index 00000000..8ab9a6e8 Binary files /dev/null and b/neutrino-proxy-vuepress/docs/.vuepress/public/img/logo-text-cross.png differ diff --git a/neutrino-proxy-vuepress/docs/.vuepress/public/img/logo-text-vertical.png b/neutrino-proxy-vuepress/docs/.vuepress/public/img/logo-text-vertical.png new file mode 100644 index 00000000..adf383aa Binary files /dev/null and b/neutrino-proxy-vuepress/docs/.vuepress/public/img/logo-text-vertical.png differ diff --git a/neutrino-proxy-vuepress/docs/.vuepress/public/img/logo.png b/neutrino-proxy-vuepress/docs/.vuepress/public/img/logo.png new file mode 100644 index 00000000..bd7eec17 Binary files /dev/null and b/neutrino-proxy-vuepress/docs/.vuepress/public/img/logo.png differ diff --git a/neutrino-proxy-vuepress/docs/.vuepress/public/img/logo.svg b/neutrino-proxy-vuepress/docs/.vuepress/public/img/logo.svg new file mode 100755 index 00000000..1b62fe13 --- /dev/null +++ b/neutrino-proxy-vuepress/docs/.vuepress/public/img/logo.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/neutrino-proxy-vuepress/docs/.vuepress/public/img/more.png b/neutrino-proxy-vuepress/docs/.vuepress/public/img/more.png new file mode 100644 index 00000000..830613ba Binary files /dev/null and b/neutrino-proxy-vuepress/docs/.vuepress/public/img/more.png differ diff --git a/neutrino-proxy-vuepress/docs/.vuepress/public/img/other.png b/neutrino-proxy-vuepress/docs/.vuepress/public/img/other.png new file mode 100644 index 00000000..87f80989 Binary files /dev/null and b/neutrino-proxy-vuepress/docs/.vuepress/public/img/other.png differ diff --git a/neutrino-proxy-vuepress/docs/.vuepress/public/img/panda-waving.png b/neutrino-proxy-vuepress/docs/.vuepress/public/img/panda-waving.png new file mode 100644 index 00000000..20246c60 Binary files /dev/null and b/neutrino-proxy-vuepress/docs/.vuepress/public/img/panda-waving.png differ diff --git a/neutrino-proxy-vuepress/docs/.vuepress/public/img/png/思维导图.png b/neutrino-proxy-vuepress/docs/.vuepress/public/img/png/思维导图.png new file mode 100644 index 00000000..819ef70b Binary files /dev/null and b/neutrino-proxy-vuepress/docs/.vuepress/public/img/png/思维导图.png differ diff --git a/neutrino-proxy-vuepress/docs/.vuepress/public/img/png/数据库.png b/neutrino-proxy-vuepress/docs/.vuepress/public/img/png/数据库.png new file mode 100644 index 00000000..4d13c3f2 Binary files /dev/null and b/neutrino-proxy-vuepress/docs/.vuepress/public/img/png/数据库.png differ diff --git a/neutrino-proxy-vuepress/docs/.vuepress/public/img/png/数据结构.png b/neutrino-proxy-vuepress/docs/.vuepress/public/img/png/数据结构.png new file mode 100644 index 00000000..1bafe966 Binary files /dev/null and b/neutrino-proxy-vuepress/docs/.vuepress/public/img/png/数据结构.png differ diff --git a/neutrino-proxy-vuepress/docs/.vuepress/public/img/png/服务器.png b/neutrino-proxy-vuepress/docs/.vuepress/public/img/png/服务器.png new file mode 100644 index 00000000..4127eb56 Binary files /dev/null and b/neutrino-proxy-vuepress/docs/.vuepress/public/img/png/服务器.png differ diff --git a/neutrino-proxy-vuepress/docs/.vuepress/public/img/png/机器学习.png b/neutrino-proxy-vuepress/docs/.vuepress/public/img/png/机器学习.png new file mode 100644 index 00000000..081c2b88 Binary files /dev/null and b/neutrino-proxy-vuepress/docs/.vuepress/public/img/png/机器学习.png differ diff --git a/neutrino-proxy-vuepress/docs/.vuepress/public/img/png/算法.png b/neutrino-proxy-vuepress/docs/.vuepress/public/img/png/算法.png new file mode 100644 index 00000000..92fef3f6 Binary files /dev/null and b/neutrino-proxy-vuepress/docs/.vuepress/public/img/png/算法.png differ diff --git a/neutrino-proxy-vuepress/docs/.vuepress/public/img/png/系统.png b/neutrino-proxy-vuepress/docs/.vuepress/public/img/png/系统.png new file mode 100644 index 00000000..87f0de0a Binary files /dev/null and b/neutrino-proxy-vuepress/docs/.vuepress/public/img/png/系统.png differ diff --git a/neutrino-proxy-vuepress/docs/.vuepress/public/img/png/系统分析.png b/neutrino-proxy-vuepress/docs/.vuepress/public/img/png/系统分析.png new file mode 100644 index 00000000..208e2597 Binary files /dev/null and b/neutrino-proxy-vuepress/docs/.vuepress/public/img/png/系统分析.png differ diff --git a/neutrino-proxy-vuepress/docs/.vuepress/public/img/png/编程.png b/neutrino-proxy-vuepress/docs/.vuepress/public/img/png/编程.png new file mode 100644 index 00000000..a8bca769 Binary files /dev/null and b/neutrino-proxy-vuepress/docs/.vuepress/public/img/png/编程.png differ diff --git a/neutrino-proxy-vuepress/docs/.vuepress/public/img/png/网络技术.png b/neutrino-proxy-vuepress/docs/.vuepress/public/img/png/网络技术.png new file mode 100644 index 00000000..f81edb71 Binary files /dev/null and b/neutrino-proxy-vuepress/docs/.vuepress/public/img/png/网络技术.png differ diff --git a/neutrino-proxy-vuepress/docs/.vuepress/public/img/png/计算机网络.png b/neutrino-proxy-vuepress/docs/.vuepress/public/img/png/计算机网络.png new file mode 100644 index 00000000..63a1819f Binary files /dev/null and b/neutrino-proxy-vuepress/docs/.vuepress/public/img/png/计算机网络.png differ diff --git a/neutrino-proxy-vuepress/docs/.vuepress/public/img/png/软件开发.png b/neutrino-proxy-vuepress/docs/.vuepress/public/img/png/软件开发.png new file mode 100644 index 00000000..72c5e852 Binary files /dev/null and b/neutrino-proxy-vuepress/docs/.vuepress/public/img/png/软件开发.png differ diff --git a/neutrino-proxy-vuepress/docs/.vuepress/public/img/png/面向对象.png b/neutrino-proxy-vuepress/docs/.vuepress/public/img/png/面向对象.png new file mode 100644 index 00000000..cd13fa3c Binary files /dev/null and b/neutrino-proxy-vuepress/docs/.vuepress/public/img/png/面向对象.png differ diff --git a/neutrino-proxy-vuepress/docs/.vuepress/public/img/png/项目管理.png b/neutrino-proxy-vuepress/docs/.vuepress/public/img/png/项目管理.png new file mode 100644 index 00000000..0467abd5 Binary files /dev/null and b/neutrino-proxy-vuepress/docs/.vuepress/public/img/png/项目管理.png differ diff --git a/neutrino-proxy-vuepress/docs/.vuepress/public/img/python.png b/neutrino-proxy-vuepress/docs/.vuepress/public/img/python.png new file mode 100644 index 00000000..c3ddebeb Binary files /dev/null and b/neutrino-proxy-vuepress/docs/.vuepress/public/img/python.png differ diff --git a/neutrino-proxy-vuepress/docs/.vuepress/public/img/qrcode/gzh.jpg b/neutrino-proxy-vuepress/docs/.vuepress/public/img/qrcode/gzh.jpg new file mode 100644 index 00000000..6d0f980c Binary files /dev/null and b/neutrino-proxy-vuepress/docs/.vuepress/public/img/qrcode/gzh.jpg differ diff --git a/neutrino-proxy-vuepress/docs/.vuepress/public/img/qrcode/qqq.webp b/neutrino-proxy-vuepress/docs/.vuepress/public/img/qrcode/qqq.webp new file mode 100644 index 00000000..87940a5d Binary files /dev/null and b/neutrino-proxy-vuepress/docs/.vuepress/public/img/qrcode/qqq.webp differ diff --git a/neutrino-proxy-vuepress/docs/.vuepress/public/img/qrcode/wxq.png b/neutrino-proxy-vuepress/docs/.vuepress/public/img/qrcode/wxq.png new file mode 100644 index 00000000..38b8db0b Binary files /dev/null and b/neutrino-proxy-vuepress/docs/.vuepress/public/img/qrcode/wxq.png differ diff --git a/neutrino-proxy-vuepress/docs/.vuepress/public/img/qrcode/wxzs.jpg b/neutrino-proxy-vuepress/docs/.vuepress/public/img/qrcode/wxzs.jpg new file mode 100644 index 00000000..67c90769 Binary files /dev/null and b/neutrino-proxy-vuepress/docs/.vuepress/public/img/qrcode/wxzs.jpg differ diff --git a/neutrino-proxy-vuepress/docs/.vuepress/public/img/qrcode/wxzz.jpg b/neutrino-proxy-vuepress/docs/.vuepress/public/img/qrcode/wxzz.jpg new file mode 100644 index 00000000..53afbedc Binary files /dev/null and b/neutrino-proxy-vuepress/docs/.vuepress/public/img/qrcode/wxzz.jpg differ diff --git a/neutrino-proxy-vuepress/docs/.vuepress/public/img/qrcode/zfbzz.jpg b/neutrino-proxy-vuepress/docs/.vuepress/public/img/qrcode/zfbzz.jpg new file mode 100644 index 00000000..b8f94c0b Binary files /dev/null and b/neutrino-proxy-vuepress/docs/.vuepress/public/img/qrcode/zfbzz.jpg differ diff --git a/neutrino-proxy-vuepress/docs/.vuepress/public/img/ui.png b/neutrino-proxy-vuepress/docs/.vuepress/public/img/ui.png new file mode 100644 index 00000000..617c56d7 Binary files /dev/null and b/neutrino-proxy-vuepress/docs/.vuepress/public/img/ui.png differ diff --git a/neutrino-proxy-vuepress/docs/.vuepress/public/img/web.png b/neutrino-proxy-vuepress/docs/.vuepress/public/img/web.png new file mode 100644 index 00000000..0a6e27c4 Binary files /dev/null and b/neutrino-proxy-vuepress/docs/.vuepress/public/img/web.png differ diff --git a/neutrino-proxy-vuepress/docs/.vuepress/public/markmap/01.html b/neutrino-proxy-vuepress/docs/.vuepress/public/markmap/01.html new file mode 100644 index 00000000..a3bc2d1b --- /dev/null +++ b/neutrino-proxy-vuepress/docs/.vuepress/public/markmap/01.html @@ -0,0 +1,126 @@ + + + + + + + + Markmap + + + + + + + + + + + + diff --git a/neutrino-proxy-vuepress/docs/.vuepress/styles/index.styl b/neutrino-proxy-vuepress/docs/.vuepress/styles/index.styl new file mode 100644 index 00000000..9c157a30 --- /dev/null +++ b/neutrino-proxy-vuepress/docs/.vuepress/styles/index.styl @@ -0,0 +1,93 @@ +// .home-wrapper .banner .banner-conent .hero h1{ +// font-size 2.8rem!important +// } +// // 文档中适配 +// table +// width auto +// .page >*:not(.footer),.card-box +// box-shadow: none!important + +// .page +// @media (min-width $contentWidth + 80) +// padding-top $navbarHeight!important +// .home-wrapper .banner .banner-conent +// padding 0 2.9rem +// box-sizing border-box +// .home-wrapper .banner .slide-banner .slide-banner-wrapper .slide-item a +// h2 +// margin-top 2rem +// font-size 1.2rem!important +// p +// padding 0 1rem + +// 评论区颜色重置 +.gt-container + .gt-ico-tip + &::after + content: '。( Win + . ) or ( ⌃ + ⌘ + ␣ ) open Emoji' + color: #999 + .gt-meta + border-color var(--borderColor)!important + .gt-comments-null + color var(--textColor) + opacity .5 + .gt-header-textarea + color var(--textColor) + background rgba(180,180,180,0.1)!important + .gt-btn + border-color $accentColor!important + background-color $accentColor!important + .gt-btn-preview + background-color rgba(255,255,255,0)!important + color $accentColor!important + a + color $accentColor!important + .gt-svg svg + fill $accentColor!important + .gt-comment-content,.gt-comment-admin .gt-comment-content + background-color rgba(150,150,150,0.1)!important + &:hover + box-shadow 0 0 25px rgba(150,150,150,.5)!important + .gt-comment-body + color var(--textColor)!important + + +// qq徽章 +.qq + position: relative; +.qq::after + content: "可撩"; + background: $accentColor; + color:#fff; + padding: 0 5px; + border-radius: 10px; + font-size:12px; + position: absolute; + top: -4px; + right: -35px; + transform:scale(0.85); + +// demo模块图标颜色 +body .vuepress-plugin-demo-block__wrapper + &,.vuepress-plugin-demo-block__display + border-color rgba(160,160,160,.3) + .vuepress-plugin-demo-block__footer:hover + .vuepress-plugin-demo-block__expand::before + border-top-color: $accentColor !important; + border-bottom-color: $accentColor !important; + svg + fill: $accentColor !important; + + +// 全文搜索框 +.suggestions + overflow: auto + max-height: calc(100vh - 6rem) + @media (max-width: 719px) { + width: 90vw; + min-width: 90vw!important; + margin-right: -20px; + } + .highlight + color: $accentColor + font-weight: bold diff --git a/neutrino-proxy-vuepress/docs/.vuepress/styles/palette.styl b/neutrino-proxy-vuepress/docs/.vuepress/styles/palette.styl new file mode 100644 index 00000000..b65c5e0e --- /dev/null +++ b/neutrino-proxy-vuepress/docs/.vuepress/styles/palette.styl @@ -0,0 +1,62 @@ + +// 原主题变量已弃用,以下是vdoing使用的变量,你可以在这个文件内修改它们。 + +//***vdoing主题-变量***// + +// // 颜色 + +// $bannerTextColor = #fff // 首页banner区(博客标题)文本颜色 +// $accentColor = #11A8CD +// $arrowBgColor = #ccc +// $badgeTipColor = #42b983 +// $badgeWarningColor = darken(#ffe564, 35%) +// $badgeErrorColor = #DA5961 + +// // 布局 +// $navbarHeight = 3.6rem +// $sidebarWidth = 18rem +// $contentWidth = 860px +// $homePageWidth = 1100px +// $rightMenuWidth = 230px // 右侧菜单 + +// // 代码块 +// $lineNumbersWrapperWidth = 2.5rem + +// 浅色模式 +// .theme-mode-light +// --bodyBg: rgba(255,255,255,1) +// --mainBg: rgba(255,255,255,1) +// --sidebarBg: rgba(255,255,255,.8) +// --blurBg: rgba(255,255,255,.9) +// // --textColor: #004050 +// --textLightenColor: #0085AD +// --borderColor: rgba(0,0,0,.15) +// --codeBg: #f6f6f6 +// --codeColor: #525252 +// codeThemeLight() + +// // 深色模式 +// .theme-mode-dark +// --bodyBg: rgba(30,30,34,1) +// --mainBg: rgba(30,30,34,1) +// --sidebarBg: rgba(30,30,34,.8) +// --blurBg: rgba(30,30,34,.8) +// --textColor: rgb(140,140,150) +// --textLightenColor: #0085AD +// --borderColor: #2C2C3A +// --codeBg: #252526 +// --codeColor: #fff +// codeThemeDark() + +// // 阅读模式 +// .theme-mode-read +// --bodyBg: rgba(245,245,213,1) +// --mainBg: rgba(245,245,213,1) +// --sidebarBg: rgba(245,245,213,.8) +// --blurBg: rgba(245,245,213,.9) +// --textColor: #004050 +// --textLightenColor: #0085AD +// --borderColor: rgba(0,0,0,.15) +// --codeBg: #282c34 +// --codeColor: #fff +// codeThemeDark() diff --git a/neutrino-proxy-vuepress/docs/01.使用教程/01.指南/01.主题初衷与诞生.md b/neutrino-proxy-vuepress/docs/01.使用教程/01.指南/01.主题初衷与诞生.md new file mode 100644 index 00000000..63170032 --- /dev/null +++ b/neutrino-proxy-vuepress/docs/01.使用教程/01.指南/01.主题初衷与诞生.md @@ -0,0 +1,39 @@ +--- +title: 主题初衷与诞生 +date: 2020-05-11 13:59:38 +permalink: /pages/52d5c3 +article: false +--- + +这个主题的初衷是打造一个好用的、面向程序员的`知识管理工具`。 + +对于程序员来说,繁杂的知识体系难免会有遗忘的地方。如果有一个方便好用的知识管理工具,可以帮助我们很好的管理知识,并能够快速地把遗忘的知识点找回来。 + +## Markdown +最初接触[Markdown](https://xugaoyi.com/pages/ad247c4332211551/)的时候,我就被它简洁的语法干净的文本结构吸引住,它的代码块和兼容`html`标签的能力更是让我爱上它,很高兴找到了一个高效记录学习笔记的工具。 + +## 知识管理 +在一段学习的日子里,我尝试过用`txt`记录笔记、云笔记、`Markdown`笔记,并把`Markdown`文件上传到`github`进行管理,但总感觉还是不够方便...直到我发现了`VuePress`,它似乎可以管理我的学习笔记,并且把站点部署到`github pages`不就是一个在线的云笔记网站了吗 + +## VuePress +[VuePress](https://vuepress.vuejs.org/zh/)是一个 Vue 驱动的静态网站生成器,正是以`Markdown`为中心的项目结构,它简洁至上的理念正合我心。对于我这个对Vue还算有一些了解的前端,迫不及待的想去使用它来搭建一个我的云笔记网站。 + +## 知识管理&博客主题-Vdoing的诞生 +我以前的一个领导和我们说过一个好的知识管理可以帮助我们提高开发质量和开发效率,下面这张图就是他想传达的,我表示赞同: +![知识库](https://fastly.jsdelivr.net/gh/xugaoyi/image_store/blog/20200318125116.jpg) + +什么是一个好用的知识管理工具呢?其实我也在不断的寻找和思考中。不过我觉得它至少要结构清晰、管理方便,在查找知识点的过程中可以快速的找到,正像上图所说的要在15秒内找到一个知识点,在添加内容的时候可以很方便的添加,并且保证结构清晰。 + +VuePress的官方默认主题是专门为写文档而生的,和我心目中的知识库有一些差距,比如在满足结构清晰这点上,每添加一个内容就得手动的添加侧边栏数据,还有在满足15秒内找到一个知识点上还是不够好,因此我觉得需要做一些改造。 + +在知识管理方面,有三种典型的知识形态: + +> * 结构化:看重知识的条理性和实用性,有一定专业背景才能看懂 +> * 碎片化:描述具体的知识点,通俗易懂 +> * 体系化:对某一领域的完整解读,通常是某类知识的专业之作 + +从这三种知识形态出发,我给主题添加了自动生成结构化侧边栏、目录页、面包屑等等。在满足了结构化之后,写博客应该算得上是一种碎片化的形态,我就给主题添加了分类、标签、归档等等。在满足更方便添加内容上,有了自动生成front matter、批量操作front matter等,更多关于主题的知识从开始使用它去探索吧~~ + +### 主题名称 + +Vdoing,中文大概是维度的意思。起这个名的原因,首先是我看过一个视频《尤雨溪创立vue的心路历程》[B站传送](https://b23.tv/xI9ONW) [youtube传送](https://www.youtube.com/watch?v=OrxmtDw4pVI),里面有讲到vue起名的故事,一开始想起的名其实是Seed.js,但是在npm上被占用了,然后发现vue是一个挺酷的一个词,才决定用vue。发现大佬起名可以这么酷。再者,这个主题我想它可以多维度的快速寻找一个知识点,要么就叫维度吧,那英文名就用Vdoing好了... diff --git a/neutrino-proxy-vuepress/docs/01.使用教程/01.指南/02.介绍.md b/neutrino-proxy-vuepress/docs/01.使用教程/01.指南/02.介绍.md new file mode 100644 index 00000000..c6ab74d7 --- /dev/null +++ b/neutrino-proxy-vuepress/docs/01.使用教程/01.指南/02.介绍.md @@ -0,0 +1,73 @@ +--- +title: 介绍 +date: 2020-05-11 13:54:03 +permalink: /pages/a2f161 +article: false +--- + + +Vdoing是[VuePress v1.x](https://vuepress.vuejs.org/zh/)的一个主题,是在[默认主题](https://vuepress.vuejs.org/zh/theme/option-api.html)基础上做的修改和扩展,很多配置仍然沿用[官方配置](https://vuepress.vuejs.org/zh/config/)。使用本主题可以很方便的搭建一个结构化的知识库或博客。 + +这个主题的初衷是打造一个好用的、面向程序员的知识管理工具: +[**主题初衷与诞生**。](/pages/52d5c3/) + +::: warning 注意 +1. Node请使用`v14.17.x`或以上版本 +2. 在使用本主题前,要求你至少会VuePress v1.x的基本使用和默认主题的基本配置,然后再查看本文档。 +3. 本文档仅负责介绍Vdoing主题对默认主题的扩展部分,更多配置请移步 [VuePress v1.x文档](https://vuepress.vuejs.org/zh/) +::: + +## 特性 +* **知识管理** + +包含三种典型的知识管理形态:结构化、碎片化、体系化。轻松打造属于你自己的知识管理平台。 + +* **结构化** + +自动生成侧边栏、目录页、索引页、面包屑等,轻松构建一个结构化知识库。 + +* **碎片化&个性化** + +博客功能提供一种知识的碎片化形态,并提供个性化的博客配置。 + +* **简洁高效** + +以 Markdown 为中心的项目结构,内置自动化工具,以更少的配置完成更多的事。配合多维索引快速定位每个知识点。 + +* **沉浸式阅读体验** + +专为阅读设计的UI,配合多种颜色模式、可关闭的侧边栏和导航栏,带给你一种沉浸式阅读体验。 + + + +## 扩展功能 +相较于默认主题,添加的功能内容主要有: + +* 添加方便管理学习笔记和技术文档的`自动生成结构化侧边栏`、`自动生成front matter`、`目录页`、`扩展的搜索框插件`、`面包屑`、`快捷翻页按钮` 等,让你快速定位到任何你想要找的内容。 + +* 添加博客相关的 `文章信息栏(作者与创建时间)`、`最近更新栏` 、`博主信息栏`、`页脚版权栏`、`分类功能+分类页`、`标签功能+标签页`、`归档页`、`评论插件`等。 + +* 方便好用的 `Markdown 容器`。 + +* 首页`文章列表`、`个性化配置`和`样式美化`等。 + +* 多种颜色模式供用户选择:`跟随系统`、`浅色模式`、`深色模式`、`阅读模式` + +* 提高搬砖效率的辅助工具: `批量操作front matter工具` + +* ... + +## 安利 +* 拥有它你就同时拥有了一个专属你个人的在线知识库(云笔记)、博客、文档库、Demo库、一站式技术搜索工具,内容全部采用Markdown编写,简单高效,各种代码随便贴。 +* 你可以在`.md`文件中写html、css、js、甚至是vue组件代码,[markdown天然的就支持vue组件](https://v1.vuepress.vuejs.org/zh/guide/using-vue.html),魔改页面什么的不要太简单。 +* 相当多的程序员喜欢深色模式,还有的视力也不太好(🤓),我们有浅色、深色和阅读模式,更有跟随系统自动响应深浅色模式功能,想怎么换就怎么换。 + + > 点击右下角换肤按钮 +* 当你习惯用vdoing主题后,在别处看文档发现是markdown编写的,但所在站点的目录、导航、主题等某个地方用起来不是很爽,你都可以把文档拷贝或把整个专栏下载(如支持下载的话)下来放到vdoing主题,vdoing的自动化工具助你生成一个结构清晰的、拥有目录、页面导航的,而且有多种颜色模式的文档站。让你更专注于内容的学习。 + + > 参考我博客中的[文档专栏](https://xugaoyi.com/note/typescript-axios/) +* 如果你想和更多的人分享你的文章,那么这款seo友好的主题是一个很不错的选择,更有为了加快百度收录而定制的每天定时[百度推送程序](https://xugaoyi.com/pages/f44d2f9ad04ab8d3/)。 + + > 参考我的博客[收录情况](https://www.baidu.com/s?word=site%3Axugaoyi.com)。 + +别犹豫了,赶快上手吧 diff --git a/neutrino-proxy-vuepress/docs/01.使用教程/01.指南/03.快速上手.md b/neutrino-proxy-vuepress/docs/01.使用教程/01.指南/03.快速上手.md new file mode 100644 index 00000000..cc052d7b --- /dev/null +++ b/neutrino-proxy-vuepress/docs/01.使用教程/01.指南/03.快速上手.md @@ -0,0 +1,110 @@ +--- +title: 快速上手 +date: 2020-05-11 13:54:40 +permalink: /pages/793dcb +article: false +--- + +## 安装和启动 + + + + +```bash +# clone the project +git clone https://github.com/xugaoyi/vuepress-theme-vdoing.git + +# enter the project directory +cd vuepress-theme-vdoing + +# install dependency 注意:如安装不成功请关闭淘宝源。 +npm install # or yarn install + +# develop +npm run dev # or yarn dev +``` + + + + +```bash +# clone the project +git clone https://github.com/xugaoyi/vuepress-theme-vdoing-doc.git + +# enter the project directory +cd vuepress-theme-vdoing-doc + +# install dependency 注意:如安装不成功请关闭淘宝源。 +npm install # or yarn install + +# develop +npm run dev # or yarn dev +``` +> 仓库地址: + + + + + +```bash +# clone the project +git clone https://github.com/u2sb/vuepress-theme-vdoing-template.git + +# enter the project directory +cd vuepress-theme-vdoing-template + +# install dependency 注意:如安装不成功请关闭淘宝源。 +npm install # or yarn install + +# develop +npm run dev # or yarn dev +``` +> 仓库地址: + + + + +::: warning +Node请使用`v14.17.x`或以上版本 +::: + +## 使用Vdoing主题 + +1. 安装最新的Vdoing主题包: +```sh +npm install vuepress-theme-vdoing -D +``` + +2. 在`.vuepress/config.js`中配置使用主题: +```js +// config.js +module.exports = { + theme: 'vdoing' +} +``` + +::: tip + 1. 不建议在原默认vuepress项目上单独安装使用本主题包,而是clone我的整个项目再替换你自己的内容即可。 + 2. 修改`config.js`配置后需要重新启动项目才会生效。 + 3. 更多关于项目上手的问题,请查阅 [问答](/pages/9cc27d/)。 +::: + + +## 版本升级 + +主题的版本会不定期更新,你只需更新npm主题包即可: +```sh +npm update vuepress-theme-vdoing +``` + +::: tip +1. 如更新后没起作用或报错,尝试把`node_modules`文件夹删除再`npm i`重新安装。 +2. 在.vuepress/config.js中,设置`theme: 'vdoing'`才是使用npm主题依赖包: +```js +// config.js +module.exports = { + theme: 'vdoing', // npm主题依赖包 + // theme: require.resolve('../../vdoing'), // 使用本地主题包 +} +``` +::: diff --git a/neutrino-proxy-vuepress/docs/01.使用教程/01.指南/04.目录结构.md b/neutrino-proxy-vuepress/docs/01.使用教程/01.指南/04.目录结构.md new file mode 100644 index 00000000..6f70d043 --- /dev/null +++ b/neutrino-proxy-vuepress/docs/01.使用教程/01.指南/04.目录结构.md @@ -0,0 +1,75 @@ +--- +title: 目录结构 +date: 2020-05-11 13:54:56 +permalink: /pages/2f674a +article: false +--- + +``` +. +├── .github (可选,GitHub 相关文件) +│ ├── workflows +│ │ ├── baiduPush.yml (可选,百度定时自动推送) +│ │ └── ci.yml (可选,自动部署) +├── docs (必须,不要修改文件夹名称) +│ ├── .vuepress (同官方,查看:https://vuepress.vuejs.org/zh/guide/directory-structure.html#目录结构) +│ ├── @pages (可选,自动生成的文件夹,存放分类页、标签页、归档页) +│ ├── _posts (可选,专门存放碎片化博客文章的文件夹) +│ ├── <结构化目录> +│ └── index.md (首页) +├── vdoing (可选,本地的vdoing主题) +├── utils (可选,vdoing主题使用的node工具) +│ ├── modules +│ ├── config.yml (可选,批量操作front matter配置) +│ ├── editFrontmatter.js (可选,批量操作front matter工具) +├── baiduPush.sh (可选,百度推送命令脚本) +├── deploy.sh (可选,部署命令脚本) +│ +└── package.json + +``` +* `docs` 文件夹名称请不要修改 + +* `docs/.vuepress` 用于存放全局的配置、样式、静态资源等,同官方,查看 [详情](https://vuepress.vuejs.org/zh/guide/directory-structure.html#目录结构) +* `docs/@pages` 此文件夹是自动生成的,存放分类页、标签页、归档页对应的`.md`文件,一般不需要改动 +* `docs/_posts` 专门用于存放碎片化博客文章,里面的`.md`文件不需要遵循命名约定,不会生成结构化侧边栏和目录页。 + +* `docs/<结构化目录>` 请查看[《构建结构化站点的核心配置和约定》](/pages/33d574/)。 + +* `docs/index.md` 首页 +* `vdoing` 存放在本地的vdoing主题文件,如果你想深度的修改主题,首先要在`docs/.vuepress/config.js`中配置使用的主题指向这个文件。 + + + + +``` js + module.exports = { + // theme: 'vdoing', // npm主题依赖包 + theme: require.resolve('../../vdoing'), // 使用本地主题包 + } +``` + + + + + +``` typescript + import { resolve } from 'path' + import { defineConfig4CustomTheme } from 'vuepress/config' + import { VdoingThemeConfig } from 'vuepress-theme-vdoing/types' + export default defineConfig4CustomTheme({ + // theme: 'vdoing', // 使用npm主题包 + theme: resolve(__dirname, '../../vdoing'), // 使用本地主题包 + }) +``` + + + + + **注意**:主题的后续维护升级只对npm主题包负责,就是说你使用本地主题就等于放弃了后续的升级服务。因此,建议能在`docs/.vuepress/`内配置和修改的,就尽量不要改动主题内部代码。 + +--- + +::: tip 提示 +为了方便您更快的学习和使用本主题,我在代码当中添加了比较多的注释说明。 +::: diff --git a/neutrino-proxy-vuepress/docs/01.使用教程/01.指南/05.核心配置和约定.md b/neutrino-proxy-vuepress/docs/01.使用教程/01.指南/05.核心配置和约定.md new file mode 100644 index 00000000..5c4ed373 --- /dev/null +++ b/neutrino-proxy-vuepress/docs/01.使用教程/01.指南/05.核心配置和约定.md @@ -0,0 +1,107 @@ +--- +title: 构建结构化站点的核心配置和约定 +date: 2020-05-12 11:01:21 +permalink: /pages/33d574 +article: false +--- + +本主题遵循“**约定优于配置**”原则,如果你想构建一个结构化的站点,需要遵循下面这些约定,约定可以为你省去很多配置,轻松拥有一个结构清晰的站点。 + + + +你需要在`config.js`中有如下配置: + +```js +// config.js +module.exports = { + themeConfig: { + sidebar: 'structuring' // 'structuring' | { mode: 'structuring', collapsable: Boolean} | 'auto' | 自定义 + } +} +``` +在运行开发服务`npm run dev`或打包`npm run build`时主题内部将会按照目录约定自动生成一个结构化的**侧边栏、目录页、面包屑等**数据。 + +在源目录(一般是`docs`)文件夹中,除了`.vuepress`、`@pages`、`_posts`、``index.md 或 README.md``之外的**文件夹**将会为其生成对应的侧边栏。生成的顺序取自序号,标题取自文件(夹)名称。 + +### 命名约定 + +* 无论是**文件**还是**文件夹**,请为其名称添加上正确的**正整数序号**和`.`,从`00`或`01`开始累计,如`01.文件夹`、`02.文件.md`,我们将会按照序号的顺序来决定其在侧边栏当中的顺序。 +* 同一级别目录别内即使只有一个文件或文件夹也要为其加上序号。 + + +::: tip 提示 + +序号只是用于决定先后顺序,并不一定需要连着,如`01、02、03...`,实际工作中可能会在两个文章中间插入一篇新的文章,因此为了方便可以采用间隔序号`10、20、30...`,后面如果需要在`10`和`20`中间插入一篇新文章,可以给定序号`15`。 + +::: + +### 级别说明 + +源目录(一般是`docs`)底下的级别现在我们称之为`一级目录`,`一级目录`的下一级为`二级目录`,以此类推,最多只能到`四级目录`。 + +* **一级目录** + 1. `.vuepress`、`@pages`、`_posts`、`index.md 或 README.md` 这些文件(文件夹)不参与数据生成。 + 2. 序号非必须。(如一些专栏,可以不用序号) +* **二级目录** + 1. 该级别下可以同时放文件夹和`.md`文件,但是两者序号要连贯(参考下面的例子中的`其他`)。 + 2. 必须有序号 +* **三级目录** + - (同上) +* **四级目录** + 1. 该级别下**只能**放`.md`文件。 + 2. 必须有序号 + +所有级别内至少有一个文件或文件夹。 + +### 目录结构例子 + +```html +. +├── docs +│ │ (不参与数据生成) +│ ├── .vuepress +│ ├── @pages +│ ├── _posts +│ ├── index.md +│ │ +│ │ (以下部分参与数据生成) +│ ├── 《JavaScript教程》专栏 (一级目录) +│ │ ├── 01.章节1 (二级目录) +│ │ | ├── 01.js1.md (三级目录-文件) +│ │ | ├── 02.js2.md +│ │ | └── 03.js3.md +│ │ └── 02.章节2 (二级目录) +│ │ | ├── 01.jsa.md +│ │ | ├── 02.小节 (三级目录) +│ │ | | └── 01.jsxx.md (四级目录-文件) +│ ├── 01.前端 +│ │ ├── 01.JavaScript +│ │ | ├── 01.js1.md +│ │ | ├── 02.js2.md +│ │ | └── 03.js3.md +│ │ └── 02.vue +│ │ | ├── 01.vue1.md +│ │ | └── 02.vue2.md +│ ├── 02.其他 +│ │ ├── 01.学习 +│ │ | ├── 01.xxa.md +│ │ | └── 02.xxb.md +│ │ ├── 02.学习笔记 +│ │ | ├── 01.xxa.md +│ │ | └── 02.xxb.md +│ │ ├── 03.文件x.md +│ │ └── 04.文件xx.md +│ └── 03.关于我 +│ │ └── 01.关于我.md +. . +``` + +### 如何知道侧边栏数据有没有正确生成? +在运行开发服务时(`npm run dev`),在命令行查看打印记录,如果正确生成会有这样的`绿色`提示记录: +```bash +tip: add sidebar data. 侧边栏数据添加成功。 +``` +如果有未按约定的文件,会有`黄色`警告记录,如: +```bash +warning: 该文件'xxx'序号出错,请填写正确的序号。 +``` diff --git a/neutrino-proxy-vuepress/docs/01.使用教程/01.指南/06.自动生成front matter.md b/neutrino-proxy-vuepress/docs/01.使用教程/01.指南/06.自动生成front matter.md new file mode 100644 index 00000000..2cf36f6c --- /dev/null +++ b/neutrino-proxy-vuepress/docs/01.使用教程/01.指南/06.自动生成front matter.md @@ -0,0 +1,108 @@ +--- +title: 自动生成front matter +date: 2020-05-12 11:46:37 +permalink: /pages/088c16 +article: false +--- + +当你没有给`.md`文件的[front matter](https://vuepress.vuejs.org/zh/guide/frontmatter.html)指定标题(`title`)、时间(`date`)、永久链接(`permalink`)、分类(`categories`)、标签(`tags`)、主题配置中[extendFrontmatter](/pages/a20ce8/#extendfrontmatte)配置的字段时,在运行开发服务`npm run dev`或打包`npm run build`时将自动为你生成这些数据,你也可以自己手动设置这些数据,当你手动设置之后,相应的数据就不会再自动生成。 + + + +### 生成示例 + +```yaml +--- +title: 《JavaScript教程》笔记 +date: 2020-01-12 11:51:53 +permalink: /pages/d8cae9 +categories: + - 前端 + - JavaScript +tags: + - +--- +``` + +### title + +* 类型: `string` + +* 默认:`.md`文件的名称 + +当前页面的标题 + + + +### date +* 类型: `string` +* 格式:`YYYY-MM-DD HH:MM:SS` +* 默认:`.md`文件在系统中创建的时间 + +当前页面的创建时间,如需手动添加或修改该字段时请按照格式添加或修改 + + + +### permalink +* 类型: `string` +* 默认:`/pages/`+ 6位字母加数字的随机码 + +当前页面的永久链接 + +> Q:自动生成front matter为什么要包含永久链接? +> +> A:使用永久链接是出于以下几点考虑: +> +> * 在config.js配置nav时使用永久链接,就不会因为文件的路径或名称的改变而改变。 +>* 对于博客而言,当别人收藏了你的文章,在未来的时间里都可以通过永久链接来访问到。 +>* 主题中的目录页需要通过永久链接来访问文章。 + + +### categories + +* 类型: `array` +* 默认: + * `.md`所在的文件夹名称。 + * 如果`.md`文件所在的目录是`三级目录`,则会有两个分类值,分别是`二级目录`和`一级目录`的文件夹名称。如果在`四级目录`,则再多一个`三级目录`的文件夹名称分类。([级别说明](/pages/33d574/#级别说明)) + * 如果`.md`文件所在的目录是`_posts`,则默认值是`随笔`,这个默认值可以在`config.js`中修改,参考:[config.js配置](/pages/a20ce8/#碎片化博文默认分类值) +* 如果在 [config.js配置](/pages/a20ce8/#category) 设置了`category: false` 将不会自动生成该字段 + +当前页面的分类 + + + +### tags + +* 类型: `array` +* 默认:空数组 +* 如果在 [config.js配置]() 设置了`tag: false` 将不会自动生成该字段 + +当前页面的标签,默认值是空数组,自动生成该字段只是为了方便后面添加标签值。 + + +### 扩展自动生成front matter + +当在主题配置中配置了`extendFrontmatter`时,将在自动生成front matter时添加相应配置的字段和数据。详见:[extendFrontmatter](/pages/a20ce8/#extendfrontmatter) + +### 碎片化文章‘分类’的自动生成规则 + +> 碎片化文章即放在_posts文件夹的文章,里面的`.md`文件不需要遵循命名约定,不会生成结构化侧边栏和目录页。 + +当文章在_posts根目录时,分类获取 `themeConfig.categoryText` 的值,如`_posts/foo.md` ,则`foo.md`文件的分类会生成为: + +```yaml +categories: + - 随笔 +``` + +> categoryText的默认值是‘随笔’,可在themeConfig修改,详见[categorytext](/pages/a20ce8/#categorytext)。 + +当文章在非_posts根目录时,获取父文件夹的名称作为分类,如 + + `_posts/想法/奇思妙想/foo.md` ,则`foo.md`文件的分类会生成为: + +```yaml +categories: + - 想法 + - 奇思妙想 +``` diff --git a/neutrino-proxy-vuepress/docs/01.使用教程/01.指南/07.Markdown 容器.md b/neutrino-proxy-vuepress/docs/01.使用教程/01.指南/07.Markdown 容器.md new file mode 100644 index 00000000..c01500d9 --- /dev/null +++ b/neutrino-proxy-vuepress/docs/01.使用教程/01.指南/07.Markdown 容器.md @@ -0,0 +1,373 @@ +--- +title: Markdown 容器 +date: 2020-05-29 11:16:18 +permalink: /pages/d0d7eb/ +article: false +--- + +Markdown 容器是对 Markdown 语法的一个扩展,使用简单的语法就可以在页面中呈现丰富的效果。 + +除了原默认主题自带的容器外,本主题还新增了一些好用的自定义容器。 + +## 信息框容器 +**输入** +```` md +::: tip +这是一条提示 +::: + +::: warning +这是一条注意 +::: + +::: danger +这是一条警告 +::: + +::: note +这是笔记容器,在 版本才支持哦~ +::: +```` + +**输出** +::: tip +这是一条提示 +::: + +::: warning +这是一条注意 +::: + +::: danger +这是一条警告 +::: + +::: note +这是笔记容器,在 以上版本才支持哦~ +::: + +以上容器均可自定义标题,如: +```` +::: tip 我的提示 +自定义标题的提示框 +::: +```` +::: tip 我的提示 +自定义标题的提示框 +::: + +## 布局容器 +**输入** +```` md +::: center + ### 我是居中的内容 + (可用于标题、图片等的居中) +::: + +::: right + [我是右浮动的内容](https://zh.wikipedia.org/wiki/%E7%89%9B%E9%A1%BF%E8%BF%90%E5%8A%A8%E5%AE%9A%E5%BE%8B) +::: + +::: details +这是一个详情块,在 IE / Edge 中不生效 +```js +console.log('这是一个详情块') +``` +::: + +::: theorem 牛顿第一定律 +假若施加于某物体的外力为零,则该物体的运动速度不变。 +::: right +来自 [维基百科](https://zh.wikipedia.org/wiki/%E7%89%9B%E9%A1%BF%E8%BF%90%E5%8A%A8%E5%AE%9A%E5%BE%8B) +::: +```` + +**输出** +::: center + ### 我是居中的内容 + (可用于标题、图片等的居中) +::: + +::: right + [我是右浮动的内容](https://zh.wikipedia.org/wiki/%E7%89%9B%E9%A1%BF%E8%BF%90%E5%8A%A8%E5%AE%9A%E5%BE%8B) +::: + +::: details +这是一个详情块,在 IE / Edge 中不生效 +```js +console.log('这是一个详情块') +``` +::: + +::: theorem 牛顿第一定律 +假若施加于某物体的外力为零,则该物体的运动速度不变。 + +::: right +来自 [维基百科](https://zh.wikipedia.org/wiki/%E7%89%9B%E9%A1%BF%E8%BF%90%E5%8A%A8%E5%AE%9A%E5%BE%8B) +::: + +> 注意:`right`、`details`、`theorem`这三个容器在`v1.3.0 +`版本才支持。`center`容器在`v1.3.3 +`版本才支持。 + + +## 普通卡片列表 + +普通卡片列表容器,可用于`友情链接`、`项目推荐`、`诗词展示`等。 + +先来看看效果: + +**输出** +::: cardList +```yaml +- name: 麋鹿鲁哟 + desc: 大道至简,知易行难 + avatar: https://fastly.jsdelivr.net/gh/xugaoyi/image_store/blog/20200122153807.jpg # 可选 + link: https://www.cnblogs.com/miluluyo/ # 可选 + bgColor: '#CBEAFA' # 可选,默认var(--bodyBg)。颜色值有#号时请添加单引号 + textColor: '#6854A1' # 可选,默认var(--textColor) +- name: XAOXUU + desc: '#IOS #Volantis主题作者' + avatar: https://fastly.jsdelivr.net/gh/xaoxuu/assets@master/avatar/avatar.png + link: https://xaoxuu.com + bgColor: '#718971' + textColor: '#fff' +- name: 平凡的你我 + desc: 理想成为大牛的小陈同学 + avatar: https://reinness.com/avatar.png + link: https://reinness.com + bgColor: '#FCDBA0' + textColor: '#A05F2C' +``` +::: + +上面效果在Markdown中的代码是这样的: + +**输入** +```` md +::: cardList +```yaml +- name: 麋鹿鲁哟 + desc: 大道至简,知易行难 + avatar: https://fastly.jsdelivr.net/gh/xugaoyi/image_store/blog/20200122153807.jpg # 可选 + link: https://www.cnblogs.com/miluluyo/ # 可选 + bgColor: '#CBEAFA' # 可选,默认var(--bodyBg)。颜色值有#号时请添加单引号 + textColor: '#6854A1' # 可选,默认var(--textColor) +- name: XAOXUU + desc: '#IOS #Volantis主题作者' + avatar: https://fastly.jsdelivr.net/gh/xaoxuu/assets@master/avatar/avatar.png + link: https://xaoxuu.com + bgColor: '#718971' + textColor: '#fff' +- name: 平凡的你我 + desc: 理想成为大牛的小陈同学 + avatar: https://reinness.com/avatar.png + link: https://reinness.com + bgColor: '#FCDBA0' + textColor: '#A05F2C' +``` +::: +```` + + +### 语法 +````md +::: cardList <每行显示数量> +``` yaml +- name: 名称 + desc: 描述 + avatar: https://xxx.jpg # 头像,可选 + link: https://xxx/ # 链接,可选 + bgColor: '#CBEAFA' # 背景色,可选,默认var(--bodyBg)。颜色值有#号时请添加引号 + textColor: '#6854A1' # 文本色,可选,默认var(--textColor) +``` +::: +```` + +* `<每行显示数量>` 数字,表示每行最多显示多少个,选值范围1~4,默认3。在小屏时会根据屏幕宽度减少每行显示数量。 +* 代码块需指定语言为`yaml` +* 代码块内是一个`yaml`格式的数组列表 +* 数组成员的属性有: + * `name`名称 + * `desc`描述 + * `avatar`头像,可选 + * `link`链接,可选 + * `bgColor`背景色,可选,默认`var(--bodyBg)`。颜色值有`#`号时请添加引号 + * `textColor`文本色,可选,默认`var(--textColor)` + +下面再来看另外一个示例: + +**输入** +```` md +::: cardList 2 +```yaml +- name: 《静夜思》 + desc: 床前明月光,疑是地上霜。举头望明月,低头思故乡。 + bgColor: '#F0DFB1' + textColor: '#242A38' +- name: Vdoing + desc: 🚀一款简洁高效的VuePress 知识管理&博客(blog) 主题 + link: https://github.com/xugaoyi/vuepress-theme-vdoing + bgColor: '#DFEEE7' + textColor: '#2A3344' +``` +::: +```` + + +**输出** +::: cardList 2 +```yaml +- name: 《静夜思》 + desc: 床前明月光,疑是地上霜。举头望明月,低头思故乡。 + bgColor: '#F0DFB1' + textColor: '#242A38' +- name: Vdoing + desc: 🚀一款简洁高效的VuePress 知识管理&博客(blog) 主题 + link: https://github.com/xugaoyi/vuepress-theme-vdoing + bgColor: '#DFEEE7' + textColor: '#2A3344' +``` +::: + + + + +## 图文卡片列表 + +图文卡片列表容器,可用于`项目展示`、`产品展示`等。 + +先看效果: + +**输出** +::: cardImgList +```yaml +- img: https://fastly.jsdelivr.net/gh/xugaoyi/image_store/blog/20200529162253.jpg + link: https://xugaoyi.com/ + name: 标题 + desc: 描述内容描述内容描述内容描述内容描述内容描述内容描述内容描述内容 # 描述,可选 + author: Evan Xu # 作者,可选 + avatar: https://fastly.jsdelivr.net/gh/xugaoyi/image_store/blog/20200103123203.jpg # 头像,可选 +- img: https://fastly.jsdelivr.net/gh/xugaoyi/image_store/blog/20200530100256.jpg + link: https://xugaoyi.com/ + name: 标题 + desc: 描述内容描述内容描述内容描述内容描述内容描述内容描述内容描述内容 + author: Evan Xu + avatar: https://fastly.jsdelivr.net/gh/xugaoyi/image_store/blog/20200103123203.jpg +- img: https://fastly.jsdelivr.net/gh/xugaoyi/image_store/blog/20200530100257.jpg + link: https://xugaoyi.com/ + name: 标题 + desc: 描述内容描述内容描述内容描述内容描述内容描述内容描述内容描述内容 + author: Evan Xu + avatar: https://fastly.jsdelivr.net/gh/xugaoyi/image_store/blog/20200103123203.jpg +``` +::: + +**输入** +````md +::: cardImgList +```yaml +- img: https://fastly.jsdelivr.net/gh/xugaoyi/image_store/blog/20200529162253.jpg + link: https://xugaoyi.com/ + name: 标题 + desc: 描述内容描述内容描述内容描述内容描述内容描述内容描述内容描述内容 # 描述,可选 + author: Evan Xu # 作者,可选 + avatar: https://fastly.jsdelivr.net/gh/xugaoyi/image_store/blog/20200103123203.jpg # 头像,可选 +- img: https://fastly.jsdelivr.net/gh/xugaoyi/image_store/blog/20200530100256.jpg + link: https://xugaoyi.com/ + name: 标题 + desc: 描述内容描述内容描述内容描述内容描述内容描述内容描述内容描述内容 + author: Evan Xu + avatar: https://fastly.jsdelivr.net/gh/xugaoyi/image_store/blog/20200103123203.jpg +- img: https://fastly.jsdelivr.net/gh/xugaoyi/image_store/blog/20200530100257.jpg + link: https://xugaoyi.com/ + name: 标题 + desc: 描述内容描述内容描述内容描述内容描述内容描述内容描述内容描述内容 + author: Evan Xu + avatar: https://fastly.jsdelivr.net/gh/xugaoyi/image_store/blog/20200103123203.jpg +``` +::: +```` + + +### 语法 +````md +::: cardImgList <每行显示数量> +``` yaml +- img: https://xxx.jpg # 图片地址 + link: https://xxx.com # 链接地址 + name: 标题 + desc: 描述 # 可选 + author: 作者名称 # 可选 + avatar: https://xxx.jpg # 作者头像,可选 +``` +::: +```` +* `<每行显示数量>` 数字,表示每行最多显示多少个,选值范围1~4,默认3。在小屏时会根据屏幕宽度减少每行显示数量。 +* 代码块需指定语言为`yaml` +* 代码块内是一个`yaml`格式的数组列表 +* 数组成员的属性有: + * `img`图片地址 + * `link`链接地址 + * `name`标题 + * `desc`描述,可选 + * `author`作者名称,可选 + * `avatar`作者头像,可选 + + +## 增强配置 +为了适应更多需求场景,`v1.9.0+`版本的普通卡片和图文卡片容器添加了一些新的配置: + +### 1. 普通卡片和图文卡片容器 + +#### target +- 链接的打开方式,默认`_blank` + + - `_self` 当前页面 + + - `_blank` 新窗口打开 + + + +### 2. 图文卡片容器 + +#### imgHeight +- 设置图片高度,默认 `auto` + + - 带单位 + + +#### objectFit +- 设置图片的填充方式(object-fit),默认 `cover` + + - `fill` 拉伸 (会改变宽高比) + - `contain` 缩放 (保持宽高比,会留空) + - `cover` 填充 (会裁剪) + - `none` 保持原有尺寸 (会留空或裁剪) + - `scale-down` 保证显示完整图片 (保持宽高比,会留空) + + +#### lineClamp +- 描述文本超出多少行显示省略号,默认`1` + +​ + +### 3. 配置示例: + +````yaml +::: cardImgList +``` yaml +config: + target: _blank + imgHeight: auto + objectFit: cover + lineClamp: 1 + +data: + - img: https://xxx.jpg + link: https://xugaoyi.com/ + name: 标题 + desc: 描述内容 + author: Evan Xu + avatar: https://xxx.jpg +``` +::: +```` diff --git a/neutrino-proxy-vuepress/docs/01.使用教程/01.指南/08.Markdown 中使用组件.md b/neutrino-proxy-vuepress/docs/01.使用教程/01.指南/08.Markdown 中使用组件.md new file mode 100644 index 00000000..87b1c398 --- /dev/null +++ b/neutrino-proxy-vuepress/docs/01.使用教程/01.指南/08.Markdown 中使用组件.md @@ -0,0 +1,70 @@ +--- +title: Markdown 中使用组件 +date: 2020-11-10 18:56:22 +permalink: /pages/197691/ +article: false +--- + +主题的内置组件可以直接在`Markdown`文件中以类似html标签的方式使用。 + +## 标记 +- **Props:** + - `text`- string + - `type` - string, 可选值: `tip | warning | error`,默认: `tip` + - `vertical` - string, 可选值: `top | middle`,默认: `top` + +- **Usage:** + +你可以在标题或其他内容中使用标记: +```md +#### 《沁园春·雪》 +北国风光,千里冰封,万里雪飘。 + +> : 北方的风光。 +``` +**效果:** +#### 《沁园春·雪》 +北国风光,千里冰封,万里雪飘。 + +> : 北方的风光。 + +## 代码块选项卡 + +在``中嵌套``来配合使用。在``标签添加`title`来指定tab标题,`active`指定当前tab: + +````md + + + ```bash + yarn add vuepress-theme-vdoing -D + ``` + + + + ```bash + npm install vuepress-theme-vdoing -D + ``` + + +```` + +**效果:** + + + + ```bash + yarn add vuepress-theme-vdoing -D + ``` + + + + ```bash + npm install vuepress-theme-vdoing -D + ``` + + + +::: warning +- 请在``标签与markdown内容之间使用空行隔开,否则可能会解析不出来。 +- 该组件只适用于放置代码块,放其他内容在体验上并不友好。如您确实需要放置其他内容的选项卡,推荐使用[vuepress-plugin-tabs](https://superbiger.github.io/vuepress-plugin-tabs)插件。 +::: diff --git a/neutrino-proxy-vuepress/docs/01.使用教程/02.相关文章/03.使目录栏支持h2~h6标题.md b/neutrino-proxy-vuepress/docs/01.使用教程/02.相关文章/03.使目录栏支持h2~h6标题.md new file mode 100644 index 00000000..2d054a25 --- /dev/null +++ b/neutrino-proxy-vuepress/docs/01.使用教程/02.相关文章/03.使目录栏支持h2~h6标题.md @@ -0,0 +1,26 @@ +--- +title: 使目录栏支持h2~h6标题 +date: 2022-03-18 15:02:52 +permalink: /pages/8dfab5/ +article: false +--- + +在`.vuepress/config.js`添加如下配置即可使 VuePress 提取相应标题级别的数据,并应用到主题的右侧目录栏中。 + + +## markdown.extractHeaders + +- 类型: Array +- 默认: ['h2', 'h3'] + +Markdown 文件的 headers (标题 & 小标题) 会在准备阶段被提取出来,并存储在 this.$page.headers 中。默认情况下,VuePress 会提取 h2 和 h3 标题。你可以通过这个选项来修改提取出的标题级别。 + +```js +module.exports = { + markdown: { + extractHeaders: [ 'h2', 'h3', 'h4', 'h5', 'h6' ] + } +} +``` + +注:此配置来自 [VuePress官方文档](https://vuepress.vuejs.org/zh/config/#markdown-extractheaders) diff --git a/neutrino-proxy-vuepress/docs/01.使用教程/02.相关文章/06.如何让你的笔记更有表现力.md b/neutrino-proxy-vuepress/docs/01.使用教程/02.相关文章/06.如何让你的笔记更有表现力.md new file mode 100644 index 00000000..8a046957 --- /dev/null +++ b/neutrino-proxy-vuepress/docs/01.使用教程/02.相关文章/06.如何让你的笔记更有表现力.md @@ -0,0 +1,230 @@ +--- +title: 如何让你的笔记更有表现力 +date: 2020-09-26 21:13:59 +permalink: /pages/dd027d/ +article: false +--- + +你的知识笔记枯燥无味没有重点?基于本主题,配合各种骚操作,让你的知识笔记表现力爆棚~~ + +::: note +Markdown的基本语法就不再重复啦 (对Markdown不了解的可以看 [这里](https://xugaoyi.com/pages/ad247c4332211551/)), +下面将介绍一些可以在本主题Markdown中使用的骚操作~ +::: + +## 1. 文本高亮 +使用``标签让文本高亮 + +```text +Vdoing是一款简洁高效的 知识管理&博客 主题 +``` +Vdoing是一款简洁高效的 知识管理&博客 主题 + +## 2. 标记 +### 内置标记 +主题内置的[Badge组件](https://vuepress.vuejs.org/zh/guide/using-vue.html#badge),直接在 Markdown 文件中使用 + +```html + + +``` + + + +### 外部标记 +使用 [shields](https://shields.io/) 生成标记,在Markdown中使用 +```markdown +![npm](https://img.shields.io/npm/v/vuepress-theme-vdoing) +![star](https://img.shields.io/github/stars/xugaoyi/vuepress-theme-vdoing) +``` +![npm](https://img.shields.io/npm/v/vuepress-theme-vdoing) +![star](https://img.shields.io/github/stars/xugaoyi/vuepress-theme-vdoing) + +> 这类标记图标可以生成动态统计数据。 + +## 3. 折叠列表 +主题内置的容器,直接在 Markdown 文件中使用 +````html +::: details +这是一个详情块 +```js +console.log('这是一个详情块') +``` +::: +```` +::: details +这是一个详情块 +```js +console.log('这是一个详情块') +``` +::: + +> 更多:[Markdown 容器](/pages/d0d7eb/) + +## 4. 思维导图 & 流程图 +### 方法一: +1. 使用[Markmap](https://markmap.js.org/)生成思维导图html文件 +2. 将html文件放在`docs/.vuepress/public/markmap/` +3. 通过` +``` + + + +### 方法二: +通过` +``` + + +### 方法三: +使用流程图插件: +* [vuepress-plugin-flowchart](https://www.npmjs.com/package/vuepress-plugin-flowchart) +* [vuepress-plugin-mermaidjs](https://github.com/eFrane/vuepress-plugin-mermaidjs) + +## 5.Demo演示框 +### 方法一: +1. 安装 [vuepress-plugin-demo-block](https://www.npmjs.com/package/vuepress-plugin-demo-block)或其他同类插件,使用方法看插件文档 +2. 在`.vuepress/config.js`配置插件 +3. Markdown中使用 + +> 同类插件:[vuepress-plugin-demo-container](https://github.com/calebman/vuepress-plugin-demo-container) + + +::: demo [vanilla] +```html + +
+
旋转动画1
+
+
旋转动画2
+

+

+

+

+
+
弹性动画
+
曲线弹性
+
+ + + +``` +::: + +### 方法二: +嵌入[codepen](https://codepen.io/) + +```html + +``` + + +::: note +`