Skip to content

astro小东西

随便找个项目练练手

astro小东西

项目https://github.com/GaiheiluKamei/GaiheiluKamei.github.io
原站https://rubyist.run/

本地开发

安装依赖

pnpm i

启动开发

pnpm dev

http://localhost:4321/

修改

astro.config.mjs 修改site:站点域名

public/CNAME 原站的部署域名,删掉
public/ 修改站标icon

src/assets/ 修改LOGO图片

src/components/BaseHead.astro 规范链接那里修改站点标题(选项卡上面那个),顺便删除Google标签管理器等
src/components/Footer.astro 修改页脚
src/components/Header.astro 修改LOGO尺寸

src/styles/base.css 背景和文字颜色啥的,原站这个色调有点离谱哈哈哈

src/content/js 文章目录

Markdown文章抬头

bash
---
title: 标题
publishedAt: 2024-03-07 时间
---

其它

bash
| :------------------------ | :----------------------------------------------- |
| `npm install`             | Installs dependencies                            |
| `npm run dev`             | Starts local dev server at `localhost:4321`      |
| `npm run build`           | Build your production site to `./dist/`          |
| `npm run preview`         | Preview your build locally, before deploying     |
| `npm run astro ...`       | Run CLI commands like `astro add`, `astro check` |
| `npm run astro -- --help` | Get help using the Astro CLI                     |
| :------------------------ | :----------------------------------------------- |