Lumengde's Blog

本站的搭建和配置教程

2024-09-13
互联网技术
建站
最后更新:2024-10-02
3分钟
561字

本网站由Astro-yi主题搭建

相关链接

站点搭建

评论区搭建

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

其他小功能

文件结构

运行指令:

1
- 重新编译:`npm run build`
2
- 本地运行:`npm run dev`

重要文件:

  • src/consts.ts内修改站点配置
  • src/content/blog内编写文章
  • src/content/feed内编写动态
  • src/pages内添加新页面
  • src/consts.tsexport const categories数组内添加顶部导航项

待完成:

  • 站点地图
  • 其他部分继续抄作者的

远程推送

一、推送到github

1. 配置 Git 账户信息

1
git config --global user.name "你的用户名"
2
git config --global user.email "你的邮箱"

2. 进入项目目录

1
cd /path/to/your/project

3. 初始化本地 Git 仓库

1
git init

4. 添加所有文件到 Git 仓库

1
git add .

5. 创建初始提交

1
git commit -m "Initial commit"

6. 切换分支为 main

1
git branch -M main

7. 添加远程仓库

1
git remote add origin https://github.com/yourusername/new-repo-name.git

8. 推送本地代码到远程仓库

1
git branch -M main
2
git push -u origin main

二、后续推送

1. 检查本地仓库状态

1
git status

2. 添加更改到 Git 仓库

1
git add .

3. 创建新的提交

1
git commit -m "描述你的更改内容"

4. 推送更改到远程仓库

1
git push origin main

三、改仓库名后本地需修改

1. 查看当前远程仓库 URL

1
git remote -v

2. 更新远程仓库 URL

1
git remote set-url origin https://github.com/yourusername/new-repo-name.git

3. 验证更新

1
git remote -v

4. 正常进行 push/pull 操作

1
git pull origin main
2
git push origin main
本文标题:本站的搭建和配置教程
文章作者:lumengde
发布时间:2024-09-13
感谢大佬送的咖啡!!!☕
alipayQRCode
wechatQRCode