常见问题
常见问题解答
路由#
博客特定路由#
博客的路由格式类似 /blog/:year/:id
内容#
heroImage 支持网络图片#
应配合 inferSize: true 使用以获取图片尺寸。示例:
heroImage:
{ src: 'https://img.tukuppt.com/ad_preview/00/15/09/5e715a320b68e.jpg!/fw/980', inferSize: true }yaml构建#
Vite 阻塞请求#
Blocked request. This host ("xxx")is not allowed.
To allow this host, add "xxx" to `preview.allowedHosts` in vite.config.js.log参见 选项 server.allowedHosts 未考虑 “true” ↗
BUN_LINK_PKG 问题#
构建报错:No “exports” main defined#
07:39:23 [ERROR] [@astrojs/vercel] An unhandled error occurred while running the "astro:build:done" hook
No "exports" main defined in /vercel/path0/node_modules/estree-walker/package.json
Stack trace:
...log请尝试在不使用现有构建缓存的情况下重新部署你的项目。