This repository has been archived by the owner on Jun 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b695542
commit f4e19cb
Showing
17 changed files
with
451 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
module.exports = { | ||
base: '/', | ||
dest: 'public', | ||
plugins: { | ||
'@vuepress/plugin-back-to-top': true, | ||
}, | ||
locales: { | ||
'/': { | ||
lang: 'zh-CN', | ||
title: 'Super Search Hub', | ||
description: '超级聚合搜索:将任何能搜索的网页的搜索结果处理成一种统一的格式', | ||
}, | ||
}, | ||
themeConfig: { | ||
repo: 'CaoMeiYouRen/super-search-hub', | ||
editLinks: true, | ||
docsDir: 'docs', | ||
smoothScroll: true, | ||
locales: { | ||
'/': { | ||
lang: 'zh-CN', | ||
selectText: 'Languages', | ||
label: '简体中文', | ||
editLinkText: '在 GitHub 上编辑此页', | ||
lastUpdated: '上次更新', | ||
nav: [ | ||
{ | ||
text: '指南', | ||
link: '/', | ||
}, | ||
{ | ||
text: '参与我们', | ||
link: '/joinus/', | ||
}, | ||
{ | ||
text: '部署', | ||
link: '/install/', | ||
}, | ||
{ | ||
text: '支持', | ||
link: '/support/', | ||
}, | ||
{ | ||
text: '更新日志', | ||
link: '/changelog/', | ||
}, | ||
], | ||
sidebar: { | ||
'/changelog/': [ | ||
'', | ||
], | ||
'/': [ | ||
{ | ||
title: '指南', | ||
collapsable: true, | ||
children: [ | ||
'', | ||
'api', | ||
], | ||
}, | ||
// { | ||
// title: '路由', | ||
// collapsable: false, | ||
// sidebarDepth: 1, | ||
// children: [ | ||
// ], | ||
// }, | ||
], | ||
}, | ||
}, | ||
}, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
# 介绍 | ||
|
||
设计参考:[RSSHub](https://github.com/DIYgod/RSSHub) | ||
|
||
设计目标: | ||
|
||
- 将任何能搜索的网页的搜索结果处理成标准的RSS规范格式。 | ||
- 同时支持json和xml。 | ||
- 返回结果以json优先,xml通过转换产生 | ||
- 目标并不是支持RSS阅读器,而是将搜索结果转换为一种统一的格式,方便进行二次开发。仅参考RSS规范进行设计 | ||
- 项目的dist文件应当可以在node.js环境下直接运行,无需其他依赖【除redis缓存外】 | ||
|
||
|
||
|
||
通用参数约定 | ||
|
||
- text : string 查询内容。原则上必须有text | ||
- page : number [可选] 第几页结果,默认为1 | ||
- limit : number [可选] 条数限制,默认为10 | ||
- filter :string [可选] 过滤参数,将在返回结果的基础上进行过滤 | ||
- sort: string [可选] 排序方式 | ||
- nocache : boolean [可选] 是否禁用缓存,默认启用缓存(false) | ||
- token : string [可选] 持有token可以不限制接口调用次数 | ||
|
||
|
||
|
||
接口返回格式约定 | ||
|
||
```json | ||
{ | ||
"statusCode": 404,//状态码 | ||
"error": "Not Found",//状态码对应的status text,仅>=400时存在 | ||
"message": "Welcome to super-search-hub",//说明文本,成功或失败的说明 | ||
"data": {}//返回的数据,数组或对象 | ||
} | ||
``` | ||
|
||
|
||
|
||
routes规范约定 | ||
|
||
- 文件夹以目标网站主域名命名,在不混淆的情况下不包含顶级域名。 | ||
- 如果需要取子域名则在主域名文件夹下再划分 | ||
- 例如 www.baidu.com 命名为 baidu | ||
- 例如 tieba.baidu.com 在 baidu 文件夹下面,可命名为tieba | ||
- 若要区分 example.com 和 example.cn ,则需包含顶级域名 | ||
- 但是先建的文件夹可以不包含顶级域名 | ||
- 文件夹下必须有 index.ts | ||
- index.ts 中只允许挂载路由,业务逻辑请在其他文件完成 | ||
- 路由一律采用默认导出的形式,即`export default router` | ||
- 路由名称同文件夹名称,若文件夹名称为` example`,则挂载路由为`router.use('/example', example.routes(), example.allowedMethods())` | ||
|
||
文档约定【待补充】 | ||
|
||
# 开发流程 | ||
|
||
## 使用 | ||
|
||
``` | ||
npm start | ||
``` | ||
|
||
## 开发 | ||
|
||
``` | ||
npm i | ||
npm run dev | ||
``` | ||
|
||
## 编译 | ||
|
||
``` | ||
npm run build | ||
``` | ||
|
||
## 风格检查 | ||
|
||
``` | ||
npm run lint | ||
``` | ||
|
||
## 文档开发 | ||
|
||
```sh | ||
npm run docs:dev | ||
``` | ||
|
||
## 文档编译 | ||
|
||
```sh | ||
docs:build | ||
``` | ||
|
||
## 提交变更 | ||
|
||
```sh | ||
npm run commit #请勿直接提交git commit | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# API介绍 | ||
|
||
API介绍 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
## [1.0.9](https://github.com/CaoMeiYouRen/super-search-hub/compare/v1.0.8...v1.0.9) (2020-05-28) | ||
|
||
|
||
### 🐛 Bug 修复 | ||
|
||
* 优化了缓存机制 ([420edaa](https://github.com/CaoMeiYouRen/super-search-hub/commit/420edaa)) | ||
|
||
|
||
|
||
## [1.0.8](https://github.com/CaoMeiYouRen/super-search-hub/compare/v1.0.7...v1.0.8) (2020-05-28) | ||
|
||
|
||
### 🐛 Bug 修复 | ||
|
||
* 修复limit问题 ([35d9cf0](https://github.com/CaoMeiYouRen/super-search-hub/commit/35d9cf0)) | ||
|
||
|
||
|
||
## [1.0.7](https://github.com/CaoMeiYouRen/super-search-hub/compare/v1.0.6...v1.0.7) (2020-05-27) | ||
|
||
|
||
### 🐛 Bug 修复 | ||
|
||
* 完善缓存机制和根路径响应 ([b9a91e9](https://github.com/CaoMeiYouRen/super-search-hub/commit/b9a91e9)) | ||
|
||
|
||
|
||
## [1.0.6](https://github.com/CaoMeiYouRen/super-search-hub/compare/v1.0.5...v1.0.6) (2020-05-27) | ||
|
||
|
||
### 🐛 Bug 修复 | ||
|
||
* 修复docker配置 ([c07a96c](https://github.com/CaoMeiYouRen/super-search-hub/commit/c07a96c)) | ||
|
||
|
||
|
||
## [1.0.5](https://github.com/CaoMeiYouRen/super-search-hub/compare/v1.0.4...v1.0.5) (2020-05-27) | ||
|
||
|
||
### 🐛 Bug 修复 | ||
|
||
* 修复Dockerfile启动命令 ([30200da](https://github.com/CaoMeiYouRen/super-search-hub/commit/30200da)) | ||
|
||
|
||
|
||
## [1.0.4](https://github.com/CaoMeiYouRen/super-search-hub/compare/v1.0.3...v1.0.4) (2020-05-27) | ||
|
||
|
||
### 🐛 Bug 修复 | ||
|
||
* 修复CI问题 ([dfbfb6d](https://github.com/CaoMeiYouRen/super-search-hub/commit/dfbfb6d)) | ||
* 修复github-release问题 ([bddcf92](https://github.com/CaoMeiYouRen/super-search-hub/commit/bddcf92)) | ||
|
||
|
||
|
||
## [1.0.3](https://github.com/CaoMeiYouRen/super-search-hub/compare/v1.0.2...v1.0.3) (2020-05-27) | ||
|
||
|
||
### 🐛 Bug 修复 | ||
|
||
* 修复路由导入问题 ([a908825](https://github.com/CaoMeiYouRen/super-search-hub/commit/a908825)) | ||
|
||
|
||
|
||
## [1.0.2](https://github.com/CaoMeiYouRen/super-search-hub/compare/v1.0.1...v1.0.2) (2020-05-27) | ||
|
||
|
||
### 🐛 Bug 修复 | ||
|
||
* 修复CI错误;修改release文件 ([68f0115](https://github.com/CaoMeiYouRen/super-search-hub/commit/68f0115)) | ||
|
||
|
||
|
||
## [1.0.1](https://github.com/CaoMeiYouRen/super-search-hub/compare/v1.0.0...v1.0.1) (2020-05-27) | ||
|
||
|
||
### 🐛 Bug 修复 | ||
|
||
* 移除不必要的文件 ([a97aa72](https://github.com/CaoMeiYouRen/super-search-hub/commit/a97aa72)) | ||
|
||
|
||
|
||
# [1.0.0](https://github.com/CaoMeiYouRen/super-search-hub/compare/da97ce8...v1.0.0) (2020-05-27) | ||
|
||
|
||
### ♻ 代码重构 | ||
|
||
* 修正依赖 ([8eb3d2f](https://github.com/CaoMeiYouRen/super-search-hub/commit/8eb3d2f)) | ||
|
||
|
||
### ✨ 新功能 | ||
|
||
* 完成项目必须脚手架安装 ([da97ce8](https://github.com/CaoMeiYouRen/super-search-hub/commit/da97ce8)) | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!DOCTYPE html> | ||
<html lang="zh-CN"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width,initial-scale=1"> | ||
<title>Super Search Hub</title> | ||
<meta name="generator" content="VuePress 1.5.0"> | ||
|
||
<meta name="description" content="超级聚合搜索:将任何能搜索的网页的搜索结果处理成一种统一的格式"> | ||
<link rel="preload" href="/assets/css/0.styles.10310706.css" as="style"><link rel="preload" href="/assets/js/app.dafecf18.js" as="script"><link rel="preload" href="/assets/js/4.ab9c21b1.js" as="script"><link rel="prefetch" href="/assets/js/2.62b80f65.js"><link rel="prefetch" href="/assets/js/3.d036a698.js"><link rel="prefetch" href="/assets/js/5.e287d386.js"><link rel="prefetch" href="/assets/js/6.f6ccc075.js"><link rel="prefetch" href="/assets/js/7.f0df67ff.js"> | ||
<link rel="stylesheet" href="/assets/css/0.styles.10310706.css"> | ||
</head> | ||
<body> | ||
<div id="app" data-server-rendered="true"><div class="theme-container"><div class="theme-default-content"><h1>404</h1> <blockquote>How did we get here?</blockquote> <a href="/" class="router-link-active"> | ||
Take me home. | ||
</a></div></div><div class="global-ui"><!----></div></div> | ||
<script src="/assets/js/app.dafecf18.js" defer></script><script src="/assets/js/4.ab9c21b1.js" defer></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<!DOCTYPE html> | ||
<html lang="zh-CN"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="viewport" content="width=device-width,initial-scale=1"> | ||
<title>API介绍 | Super Search Hub</title> | ||
<meta name="generator" content="VuePress 1.5.0"> | ||
|
||
<meta name="description" content="超级聚合搜索:将任何能搜索的网页的搜索结果处理成一种统一的格式"> | ||
<link rel="preload" href="/assets/css/0.styles.10310706.css" as="style"><link rel="preload" href="/assets/js/app.dafecf18.js" as="script"><link rel="preload" href="/assets/js/2.62b80f65.js" as="script"><link rel="preload" href="/assets/js/6.f6ccc075.js" as="script"><link rel="prefetch" href="/assets/js/3.d036a698.js"><link rel="prefetch" href="/assets/js/4.ab9c21b1.js"><link rel="prefetch" href="/assets/js/5.e287d386.js"><link rel="prefetch" href="/assets/js/7.f0df67ff.js"> | ||
<link rel="stylesheet" href="/assets/css/0.styles.10310706.css"> | ||
</head> | ||
<body> | ||
<div id="app" data-server-rendered="true"><div class="theme-container"><header class="navbar"><div class="sidebar-button"><svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 448 512" class="icon"><path fill="currentColor" d="M436 124H12c-6.627 0-12-5.373-12-12V80c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12zm0 160H12c-6.627 0-12-5.373-12-12v-32c0-6.627 5.373-12 12-12h424c6.627 0 12 5.373 12 12v32c0 6.627-5.373 12-12 12z"></path></svg></div> <a href="/" class="home-link router-link-active"><!----> <span class="site-name">Super Search Hub</span></a> <div class="links"><div class="search-box"><input aria-label="Search" autocomplete="off" spellcheck="false" value=""> <!----></div> <nav class="nav-links can-hide"><div class="nav-item"><a href="/" class="nav-link"> | ||
指南 | ||
</a></div><div class="nav-item"><a href="/joinus/" class="nav-link"> | ||
参与我们 | ||
</a></div><div class="nav-item"><a href="/install/" class="nav-link"> | ||
部署 | ||
</a></div><div class="nav-item"><a href="/support/" class="nav-link"> | ||
支持 | ||
</a></div><div class="nav-item"><a href="/changelog/" class="nav-link"> | ||
更新日志 | ||
</a></div> <a href="https://github.com/CaoMeiYouRen/super-search-hub" target="_blank" rel="noopener noreferrer" class="repo-link"> | ||
GitHub | ||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></nav></div></header> <div class="sidebar-mask"></div> <aside class="sidebar"><nav class="nav-links"><div class="nav-item"><a href="/" class="nav-link"> | ||
指南 | ||
</a></div><div class="nav-item"><a href="/joinus/" class="nav-link"> | ||
参与我们 | ||
</a></div><div class="nav-item"><a href="/install/" class="nav-link"> | ||
部署 | ||
</a></div><div class="nav-item"><a href="/support/" class="nav-link"> | ||
支持 | ||
</a></div><div class="nav-item"><a href="/changelog/" class="nav-link"> | ||
更新日志 | ||
</a></div> <a href="https://github.com/CaoMeiYouRen/super-search-hub" target="_blank" rel="noopener noreferrer" class="repo-link"> | ||
GitHub | ||
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></a></nav> <ul class="sidebar-links"><li><section class="sidebar-group collapsable depth-0"><p class="sidebar-heading open"><span>指南</span> <span class="arrow down"></span></p> <ul class="sidebar-links sidebar-group-items"><li><a href="/" aria-current="page" class="sidebar-link">介绍</a></li><li><a href="/api.html" aria-current="page" class="active sidebar-link">API介绍</a></li></ul></section></li></ul> </aside> <main class="page"> <div class="theme-default-content content__default"><h1 id="api介绍"><a href="#api介绍" class="header-anchor">#</a> API介绍</h1> <p>API介绍</p></div> <footer class="page-edit"><div class="edit-link"><a href="https://github.com/CaoMeiYouRen/super-search-hub/edit/master/docs/api.md" target="_blank" rel="noopener noreferrer">在 GitHub 上编辑此页</a> <svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" x="0px" y="0px" viewBox="0 0 100 100" width="15" height="15" class="icon outbound"><path fill="currentColor" d="M18.8,85.1h56l0,0c2.2,0,4-1.8,4-4v-32h-8v28h-48v-48h28v-8h-32l0,0c-2.2,0-4,1.8-4,4v56C14.8,83.3,16.6,85.1,18.8,85.1z"></path> <polygon fill="currentColor" points="45.7,48.7 51.3,54.3 77.2,28.5 77.2,37.2 85.2,37.2 85.2,14.9 62.8,14.9 62.8,22.9 71.5,22.9"></polygon></svg></div> <!----></footer> <div class="page-nav"><p class="inner"><span class="prev"> | ||
← | ||
<a href="/" class="prev router-link-active"> | ||
介绍 | ||
</a></span> <!----></p></div> </main></div><div class="global-ui"><!----></div></div> | ||
<script src="/assets/js/app.dafecf18.js" defer></script><script src="/assets/js/2.62b80f65.js" defer></script><script src="/assets/js/6.f6ccc075.js" defer></script> | ||
</body> | ||
</html> |
Large diffs are not rendered by default.
Oops, something went wrong.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.