Skip to content

Commit

Permalink
feat: 新增更新日志和调整主页展示
Browse files Browse the repository at this point in the history
  • Loading branch information
heytl committed Jan 9, 2025
1 parent 6f81ebf commit 04f5fad
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 119 deletions.
99 changes: 8 additions & 91 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,105 +1,22 @@
# vitepress-nav-template
# <div align="center">猪阿阿导航</div>

<p align="center">
<img src="https://raw.githubusercontent.com/maomao1996/picture/main/vitepress-nav-template/home.webp" alt="home" />
<img src="https://ong.ruiduobao.com/logo.png" alt="home" />
</p>
<p align="center"> 基于 <b>VitePress</b> 的个人前端导航页面模板 </p>
<p align='center'><a href="/guide.md">基础教程</a> | <a href="https://notes.fe-mm.com/">作者博客</a></p>
<p align="center"> 基于 <b>VitePress</b> 的个人导航合集页面 </p>

---

## 预览地址

- <https://fe-nav.netlify.app/nav/>
- <https://maomao1996.github.io/vitepress-nav-template/nav/>
- <https://vitepress-nav-seven.vercel.app/>
- <https://ong.ruiduobao.com>

## 功能

- 新增 `layout-class` 方便更好的自定义样式
- 默认中文
- 自带前端导航模块
- 支持访客统计
- 支持 [giscus 评论](https://giscus.app/zh-CN)
- 支持日夜颜色模式自适应切换
- 支持 Github Pages 直接部署上线
- 1. 开启 github actions
- 2. 配置 Pages 的 Branch 为 `gh-pages` 分支,文件夹为 `/(root)`
- 3. 访问地址为 `https://<username>.github.io/<repository>/` 或自定义域名
- 支持 [tailwindcss](https://github.com/tailwindlabs/tailwindcss)
- 支持查看 vue 示例组件源码(使用 [vite-plugin-markdown-preview](https://github.com/jaskang/vite-plugin-markdown-preview)

#### 使用自定义域名部署

当 Github Pages 使用自定义域名时,需要修改 `.github/workflows/deploy.yml` 脚本中的 `APP_BASE_PATH``/`

**推荐使用第三方服务绑定域名来部署**

- [Netlify](https://www.netlify.com/)
- [Vercel](https://vercel.com/)
- [Cloudflare Pages](https://pages.cloudflare.com/)

使用仪表板创建新项目并更改这些设置:

- **构建命令:** `npm run build`
- **输出目录:** `dist`
- **node 版本:** `18` (或更高版本)

更多部署指南请查看 [VitePress 各平台部署指南](https://vitepress.dev/zh/guide/deploy#platform-guides)

### 开启访客统计

需在 `docs/.vitepress/config.ts` 中配置 `themeConfig.visitor`

```ts
export default defineConfig({
themeConfig: {
/* 访客统计 */
visitor: {
/** 统计 id(单独页面的统计会作为前缀使用)*/
badgeId: 'maomao1996.vitepress-nav-template',
},
},
})
```

### 开启 giscus 评论

需在 `docs/.vitepress/config.ts` 中配置 `themeConfig.comment`

```ts
export default defineConfig({
themeConfig: {
/**
* giscus 评论配置
* 请根据 https://giscus.app/zh-CN 生成内容填写
*/
comment: {
/** github 仓库地址 */
repo: '',
/** giscus 仓库 ID */
repoId: '',
/** Discussion 分类 */
category: '',
/** giscus 分类 ID */
categoryId: '',
},
},
})
```

#### 在指定页面关闭评论

需在指定页面的 `markdown` 文件中添加如下 `frontmatter` 配置

```md
---
comment: false
---

# 功能测试页
```

docs: 更新 README
- [影视导航](https://ong.ruiduobao.com/tv/)
- [AI 导航](https://ong.ruiduobao.com/ai-nav/)
- [书籍导航](https://ong.ruiduobao.com/book-nav/)

## 说明

Expand Down
10 changes: 10 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# 更新日志

## 2025.01.09
- 影视导航内容

## 2025.01.07
- AI 导航内容

## 2025.01.03
- 电子书导航内容
57 changes: 29 additions & 28 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,35 +24,36 @@ hero:
# link: /test
# theme: alt
features:
- icon: 📖
title: 前端物语
details: 整理前端常用知识点<small>(面试八股文)</small><br />如有异议按你的理解为主,不接受反驳
link: https://notes.fe-mm.com/fe/javascript/types
linkText: 前端常用知识
- icon: 📽️
title: 影视导航
details: 整理各类在线、下载、网盘等影视站<br />方便大家观看
link: tv
linkText: 找影视看一看
- icon: 🤖
title: AI 导航
details: 整理各类 AI 相关的网站<br />方便大家学习
link: ai-nav
linkText: 找 AI 聊一聊
- icon: 📘
title: 源码阅读
details: 了解各种库的实现原理<br />学习其中的小技巧和冷知识
link: https://notes.fe-mm.com/analysis/utils/only-allow
linkText: 源码阅读
- icon: 💡
title: Workflow
details: 在工作中学到的一切<small>(常用库/工具/奇淫技巧等)</small><br />配合 CV 大法来更好的摸鱼
link: https://notes.fe-mm.com/workflow/utils/library
linkText: 常用工具库
- icon: 🧰
title: 提效工具
details: 工欲善其事,必先利其器<br />记录开发和日常使用中所用到的软件、插件、扩展等
link: https://notes.fe-mm.com/efficiency/online-tools
linkText: 提效工具
- icon: 🐞
title: 踩坑记录
details: 那些年我们踩过的坑<br />总有一些让你意想不到的问题
link: https://notes.fe-mm.com/pit/npm
linkText: 踩坑记录
- icon: 💯
title: 吾志所向,一往无前。
details: '<small class="bottom-small">一个想躺平的小开发</small>'
link: https://notes.fe-mm.com/mao
title: 书籍导航
details: 整理各类下载电子书籍的网站<br />方便大家阅读
link: book-nav
linkText: 找本书读一读
- icon: 👀
title: 影视在线看
details: 整理各类在线看影视的网站<br />方便大家观看
link: tv/#在线观看
linkText: 在线观看
- icon: 📘
title: 书籍搜一搜
details: 整理各类搜索电子书籍的网站<br />方便大家查找
link: book-nav/#书籍搜索
linkText: 书籍搜索
- icon: 📝
title: 更新日志。
details: 记录本站的更新日志<br />方便大家查看
link: changelog
linkText: 看一看更新日志
---

<style>
Expand Down

0 comments on commit 04f5fad

Please sign in to comment.