Files
SiMengWebSite_Notes/README.md
祀梦 5dba6ac5b4 docs: 完善安装指南并增强启动脚本功能
- 扩展 README.md 中的安装说明,增加环境要求、详细步骤和常见问题排查
- 重写 start.bat 脚本,支持参数化配置并添加多重回退机制
- 优化开发服务器启动流程,提升不同环境下的兼容性
2025-10-22 16:26:29 +08:00

90 lines
2.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 祀梦的笔记网站
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
一个基于 VuePress 的个人学习笔记和博客网站,记录编程学习、算法练习和日常生活的点滴。
## 项目简介
这个网站是我(祀梦)记录学习和生活的个人空间,主要包含以下内容:
- **编程笔记**记录C++、LeetCode算法等编程相关的学习笔记
- **博客**:分享日常生活和学习心得
- **工具推荐**:记录实用的开发工具和资源
- **友情链接**:展示朋友的个人网站
## 技术栈
- [VuePress](https://vuepress.vuejs.org/) - 静态网站生成器
- [VuePress Theme Plume](https://theme-plume.vuejs.press/) - 美观的博客主题
- [Vue 3](https://vuejs.org/) - 前端框架
- [Vite](https://vitejs.dev/) - 构建工具
## 安装
- 环境要求:
- Node.js`^20.6.0``>=22.0.0`(推荐使用当前 LTS 或稳定版)
- npm`>=10`
- 安装步骤:
1. 在项目根目录执行依赖安装:
```sh
npm install
```
2. 启动开发服务器(任选其一):
- 常规方式:
```sh
npm run docs:dev
```
- Windows 快捷方式(尝试监听 `0.0.0.0` 以便局域网访问):
```bat
.\start.bat
```
- 若端口或权限受限,使用备用命令(绑定到本机并更换端口):
```sh
npx vuepress@2.0.0-rc.24 dev docs --port 5173 --host localhost
```
3. 打开浏览器访问:
- `http://localhost:4567/`(默认)或
- `http://localhost:5173/`(如果使用备用命令)
- 常见问题与排查:
- “`vuepress` 不是内部或外部命令”:通常为依赖未安装或安装失败,执行 `npm install` 后重试。
- “listen EACCES: permission denied 0.0.0.0:4567”端口或绑定权限受限改用 `--host localhost` 或更换端口(如 `--port 5173`)。
- 需要清理缓存后重试:
```sh
npm run docs:dev-clean
```
- 更换端口示例(以 8080 为例):
```sh
npx vuepress dev docs --port 8080 --host localhost
```
## 使用
```sh
# 启动开发服务器(带热重载)
npm run docs:dev
# 清除缓存并启动开发服务器
npm run docs:dev-clean
# 构建生产版本
npm run docs:build
# 本地预览生产版本
npm run docs:preview
# 更新 VuePress 和主题
npm run vp-update
```
## 文档链接
- [VuePress 官方文档](https://vuepress.vuejs.org/)
- [VuePress Theme Plume 文档](https://theme-plume.vuejs.press/)
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.