本网站由Astro-yi主题搭建
相关链接
站点搭建
评论区搭建
- 配置Waline评论区
- Waline - 快速上手:部署完成后访问
<serverURL>/ui/register进行注册,首个登录的账号会成为管理员,可以管理评论和用户。后续可在<serverURL>/ui/login登录。 - 需要在Vercel对应项目Settings里添加一些变量才能正常使用

其他小功能
- Astro-Yi 图片功能预览:可以一行显示多张图片
- 基于Astro框架的博客网站添加Sitemap:在项目根目录运行
npx astro add sitemap即可;配置完成后打包npm run build,在dist文件夹中会生成文件sitemap-0.xml,本地运行是没有的,部署到vercel后点击站点地图是可以正常显示的。
文件结构
运行指令:
1- 重新编译:`npm run build`2- 本地运行:`npm run dev`重要文件:
- 在
src/consts.ts内修改站点配置 - 在
src/content/blog内编写文章 - 在
src/content/feed内编写动态 - 在
src/pages内添加新页面 - 在
src/consts.ts的export const categories数组内添加顶部导航项
待完成:
- 站点地图
- 其他部分继续抄作者的
远程推送
一、推送到github
1. 配置 Git 账户信息
1 git config --global user.name "你的用户名"2 git config --global user.email "你的邮箱"2. 进入项目目录
1 cd /path/to/your/project3. 初始化本地 Git 仓库
1 git init4. 添加所有文件到 Git 仓库
1 git add .5. 创建初始提交
1 git commit -m "Initial commit"6. 切换分支为 main
1 git branch -M main7. 添加远程仓库
1 git remote add origin https://github.com/yourusername/new-repo-name.git8. 推送本地代码到远程仓库
1 git branch -M main2 git push -u origin main二、后续推送
1. 检查本地仓库状态
1 git status2. 添加更改到 Git 仓库
1 git add .3. 创建新的提交
1 git commit -m "描述你的更改内容"4. 推送更改到远程仓库
1 git push origin main三、改仓库名后本地需修改
1. 查看当前远程仓库 URL
1 git remote -v2. 更新远程仓库 URL
1 git remote set-url origin https://github.com/yourusername/new-repo-name.git3. 验证更新
1 git remote -v4. 正常进行 push/pull 操作
1 git pull origin main2 git push origin main