Astro Theme Pure

Back

FAQs

Frequently asked questions

Path#

Blog specific path#

Routing blogs format like /blog/:year/:id

See 4.0.2-beta如何使文章链接中包含年份.

Content#

Support web images for heroImage#

It should be used with inferSize: true to get the image size. Example:

heroImage:
  { src: 'https://img.tukuppt.com/ad_preview/00/15/09/5e715a320b68e.jpg!/fw/980', inferSize: true }
yaml

Build#

Vite Block Request#

Blocked request. This host ("xxx")is not allowed.
To allow this host, add "xxx" to `preview.allowedHosts` in vite.config.js.
log

See option server.allowedHosts doesn’t take into account “true”

See BUN_LINK_PKG 环境变量无法设置成功

Build 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

Try redeploy your project without existing build cache.

Detail: oven-sh/bun/issues: error No “exports” main defined in /vercel/path0/node_modules/estree-walker/package.json