常见问题
经常被问到的问题
路径#
博客特定路径#
将博客路由格式设置为 /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参见 option server.allowedHosts doesn’t take into account “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尝试在不使用现有构建缓存的情况下重新部署您的项目。