未命名日记本

返回 我的日记

第二篇日记

学习 Astro 框架#

今天学习了 Astro 框架的基础知识。

主要内容#

  1. 组件系统
  2. 内容集合
  3. 布局系统

代码示例#

export async function getStaticPaths() {
const posts = await getCollection('posts');
return posts.map(post => ({
params: { slug: post.slug },
props: { post },
}));
}

心得#

Astro 的零 JS 理念很有意思,可以大幅提升网站性能。

评论区

Profile Image of the Author
一只喵⁹
Hello, Everyone.
公告
版本测试中 ~
音乐
封面

音乐

暂未播放

0:000:00
暂无歌词
分类
标签
站点统计
文章
13
分类
2
标签
14
总字数
10,777
运行时长
0
最后活动
0 天前
站点信息
构建平台
GitHub Actions
博客版本
Firefly v6.13.5
文章许可
CC BY-NC-SA 4.0

文章目录