Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
MyGithub-1 committed Sep 6, 2024
2 parents d66b485 + c3cf7af commit 2dc812c
Show file tree
Hide file tree
Showing 122 changed files with 18,054 additions and 4,360 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,6 @@ Thumbs.db

# build output
src/index.html
nav.config.json
_upload
test.md
162 changes: 79 additions & 83 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,64 +1,76 @@
<p align="center">
<a href="https://nav3.cn/?g">
<img src="src/assets/logo.png" width="130" />
<img src="https://gcore.jsdelivr.net/gh/xjh22222228/public@gh-pages/nav/logo.svg" width="130" />
</a>
<br />
<b>发现导航</b>
<p align="center">一个纯静态、支持SEO、在线编辑的强大导航网站,希望您会喜欢</p>
<p align="center">内置收录多达 800+ 优质网站, 助您工作、学习和生活</p>
<p align="center">
<!-- <a href="README_en.md">
<img src="https://img.shields.io/badge/lang-English-red.svg?longCache=true&style=flat-square">
</a> -->
<img src="https://img.shields.io/github/v/release/xjh22222228/nav" />
<a href="https://github.com/xjh22222228/nav/stargazers"><img src="https://img.shields.io/github/stars/xjh22222228/nav" alt="Stars"/></a>
<img alt="Angular" src="https://img.shields.io/static/v1.svg?label=&message=Angular&style=flat-square&color=C82B38">
<img src="https://img.shields.io/github/license/xjh22222228/nav" />
</p>
</p>

## 预览

- [https://nav3.cn/](https://nav3.cn/)
- [https://faxian.vercel.app/](https://faxian.vercel.app/)
- [https://xjh22222228.github.io/nav-web/](https://xjh22222228.github.io/nav-web/)

![Preview](https://cdn.jsdelivr.net/gh/xjh22222228/public@gh-pages/nav/1.png)
![Preview](https://cdn.jsdelivr.net/gh/xjh22222228/public@gh-pages/nav/8.png)
![Preview](https://cdn.jsdelivr.net/gh/xjh22222228/public@gh-pages/nav/3.png)
![Preview](https://cdn.jsdelivr.net/gh/xjh22222228/public@gh-pages/nav/4.png)
![Preview](https://cdn.jsdelivr.net/gh/xjh22222228/public@gh-pages/nav/6.png)
![Preview](https://cdn.jsdelivr.net/gh/xjh22222228/public@gh-pages/nav/9.png)
![Preview](https://cdn.jsdelivr.net/gh/xjh22222228/public@gh-pages/nav/7.png)
<picture>
<source
media="(prefers-color-scheme: dark)"
srcset="
https://api.star-history.com/svg?repos=xjh22222228/nav&type=Date&theme=dark
"
/>
<source
media="(prefers-color-scheme: light)"
srcset="
https://api.star-history.com/svg?repos=xjh22222228/nav&type=Date
"
/>
<img
alt="Star History Chart"
src="https://api.star-history.com/svg?repos=xjh22222228/nav&type=Date"
/>
</picture>

## 特性

三不需:`无需数据库``无需服务器``无需成本`

`发现导航` 的理念就是做一款无需依赖后端服务既简单又方便,没有繁杂的配置和数据库等配置概念, 做到开箱即用。

- 🍰 内置 `800+` 优质网站
- 🍰 支持 [码云 Gitee](https://gitee.com/xiejiahe/nav)
- 🍰 支持从浏览器书签导入
- 🍰 支持将数据导出到浏览器书签
- 🍰 支持用户提交收录
- 🍰 支持自有部署/Fork
- 🍰 丰富的资源配置系统
- 🍰 支持 SEO 搜索引擎
- 🍰 完全纯静态, 提供自动化部署功能
- 🍰 三叉树分类、结构清晰、分类清晰
- 🍰 支持一个网站关联多个网址
- 🍰 颜值与简约并存,不再是杀马特时代
- 🍰 完全开源,轻松定制化
- 🍰 支持网站关联多个网址
- 🍰 支持检测网站存活状态
- 🍰 支持配置仅自己可见
- 🍰 自动抓取网站图标/名称/描述
- 🍰 支持暗黑模式
- 🍰 支持后台管理, 无需部署
- 🍰 支持多种浏览模式,创新
- 🍰 支持足迹记忆
- 🍰 支持多种搜索查询
- 🍰 支持自定义引擎搜索
- 🍰 多款高颜值主题切换
- 🍰 支持暗黑模式
- 🍰 支持后台管理, 无需部署
- 🍰 支持从 Chrome 书签导入
- 🍰 强大的响应式系统
- 🍰 多种 Loading 加载动画
- 🍰 多种卡片风格设计
- 🍰 支持检测网站存活状态
- 🍰 支持配置仅自己可见
- 🍰 强大的响应式系统
- 🍰 自动抓取网站图标/名称/描述
- 🍰 完全纯静态, 提供自动化部署功能
- 🍰 三叉树分类、结构清晰、分类清晰

## 预览

- [https://nav3.cn/](https://nav3.cn/)
- [https://faxian.vercel.app/](https://faxian.vercel.app/)
- [https://xjh22222228.github.io/nav-web/](https://xjh22222228.github.io/nav-web/)

![Preview](https://gcore.jsdelivr.net/gh/xjh22222228/public@gh-pages/nav/preview.gif)

## 可以干嘛

Expand All @@ -80,7 +92,7 @@

4、打开 https://github.com/你的用户名/nav/actions 开启 action 自动部署

5、修改项目根目录配置文件 [nav.config.ts](nav.config.ts) 只需要修改仓库地址
5、修改项目根目录配置文件 [package.json](package.json) 只需要修改仓库地址 `gitRepoUrl` 字段

6、打开 https://你的用户名.github.io/nav 就能看到一个非常强大的导航网站了。

Expand All @@ -96,51 +108,63 @@

[https://github.com/apps/vercel](https://github.com/apps/vercel)

#### 关于自有部署
#### 自有部署

前提服务器必须能访问公网。
自有部署一直不是发现导航的需求目标,但陆续有人问,决定从`v8.8.0`版本开始支持!

将代码拉到服务器 `git clone https://github.com/xjh22222228/nav.git` 还需要安装`Node >= 18`
[成为我们的会员](https://gcore.jsdelivr.net/gh/xjh22222228/public@gh-pages/nav/support2.svg)

执行 `npm i && npm i pm2 -g && npm run build` 用服务器指向导出的 `dist` 目录, 尝试访问
#### Fork vs 自有部署

使用项目自带服务器 [server.js](server.js) ,需要修改文件内的服务器仓库位置
| | 自有部署 | Fork |
| -------- | ---------------- | ---------------- |
| 速度 | 保存即时生效 | 需要等待构建完成 |
| 成本 | 需要自己有服务器 | 各种平台免费部署 |
| 数据存储 | 需要定时备份 | 永久存储 |
| 存活状态 | 未知 | 只要`GitHub`还在 |
| 图片 | 走服务器带宽 | 免费 CDN 加速 |

在导航网站后台系统配置补充 `请求地址` 当每次发生保存时会请求下面启动的服务器实现自动部署。
自有部署只有保存快,其他 `Fork` 完虐!

```bash
# 启动 公网IP:7777/server
npm run server
```
如果是部署在公司内网可以用`自有部署`,其他强烈建议 `Fork` 模式。

#### 其他
## 配置说明

如果您有更好的部署方式,请给我们提 PR
只需要修改根目录 `package.json` 以下相关字段
|Fork |自有部署 | 字段 | 说明 |
| --------------------------------------------- | -------- |--- |--- |
|| | gitRepoUrl | 填写您的仓库地址 |
|| | provider | 部署平台,`Github` / `Gitee`, 作者 `Gitee` 仓库地址 [https://gitee.com/xiejiahe/nav](https://gitee.com/xiejiahe/nav) |
|| | branch | 部署分支 |
||| hashMode | 路由是否 Hash 模式, 如果是部署在 `github pages` 务必设为 true |
| || password | 自有部署登录密码,`Fork` 用户无需填写 |
| || address | 自有部署, 一旦填写认为你是自有部署 |
||| email | 用户提交收录通知 |

## 后台

将路由地址修改为 `system` 即可进入,如: https://www.nav3.cn/#/light 修改为 https://www.nav3.cn/#/system
将路由地址修改为 `system` 即可进入,如: https://www.nav3.cn 修改为 https://www.nav3.cn/system

## 书签导入
## 升级

自动检测满足三级分类导航,其他一律设为未分类:
#### 自动

![](https://raw.githubusercontent.com/xjh22222228/public/gh-pages/nav/import.png)
仅限于 `Fork` 用户

浏览器打开 [chrome://bookmarks/](chrome://bookmarks/) 导出书签得到 html 文件, 接着从导航网站后台导入即可
[点这里安装 Pull](https://github.com/apps/pull) , 只要有升级会自动给你的仓库提交 `Pull Requests` 点击合并即可

## 升级
#### 手动

将你的仓库克隆下来执行以下命令

```bash
git pull
git remote add upstream https://github.com/xjh22222228/nav.git
git remote add upstream https://gitee.com/xiejiahe/nav.git
git fetch upstream main
git merge upstream/main --allow-unrelated-histories --no-edit
git push

# 或者执行
# 如果安装了node只需执行
npm run update
```

Expand All @@ -150,15 +174,15 @@ npm run update

## 开发构建

NODE: >= v18
NODE: >= v20

```bash
# 下载
git clone --depth=1 https://github.com/xjh22222228/nav.git

cd nav

# 安装依赖 NODE: v18
# 安装依赖
yarn

# 启动
Expand All @@ -168,43 +192,15 @@ yarn start
yarn build
```

## 贡献

Thank you for your [contribution](https://github.com/xjh22222228/nav/issues), men.

<a href="https://github.com/YutHelloWorld">
<img src="https://avatars1.githubusercontent.com/u/20860159?s=460&v=4" width="30px" height="30px" />
</a>
<a href="https://github.com/JJJTHuang">
<img src="https://avatars3.githubusercontent.com/u/22817432?s=460&v=4" width="30px" height="30px" />
</a>
<a href="https://github.com/Fechin">
<img src="https://avatars1.githubusercontent.com/u/2541482?s=460&v=4" width="30px" height="30px" />
</a>
<a href="https://github.com/setdiaoyong">
<img src="https://avatars1.githubusercontent.com/u/62551864?s=460&v=4" width="30px" height="30px" />
</a>

## 建议

如果有任何功能上的建议可通过 [issue](https://github.com/xjh22222228/nav/issues) 发起, Thank you.

## 支持

项目于 2018 年到至今一直坚持维护和开源, 经过 N 次的迭代与优化, 如果项目能帮到您是我的荣幸。

您可以请作者喝杯咖啡,继续战斗下去(请备注 Github 名字)~
您可以请作者喝杯咖啡,继续战斗下去(请备注 GitHub 名字)~

<img src="https://cdn.jsdelivr.net/gh/xjh22222228/public@gh-pages/img/32.png" width="600">
<img src="https://gcore.jsdelivr.net/gh/xjh22222228/public@gh-pages/img/32.png" width="600">

感谢您的认可:
| ID | 支持金额 |
| --------------------------------------- |----------- |
| [aiyou9](https://github.com/aiyou9) | ¥ 100 |
| [lastares](https://github.com/lastares) | ¥ 25.00 |
| [MrJxySteven](https://github.com/MrJxySteven) | ¥ 20.00 |
| [admol](https://github.com/admol) | ¥ 6.66 |
| 路人甲 | ¥ 50.00 |
<img src="https://gcore.jsdelivr.net/gh/xjh22222228/public@gh-pages/nav/thank.png" width="200" />

## License

Expand Down
Loading

0 comments on commit 2dc812c

Please sign in to comment.