skillfullstack 0.0.0-stage → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (775) hide show
  1. package/.skillsRegistry/catalog.json +231 -0
  2. package/AGENTS.md +89 -0
  3. package/README.md +210 -2
  4. package/bin/index.js +508 -0
  5. package/package.json +57 -4
  6. package/skills/backend/apiEngineering/SKILL.md +102 -0
  7. package/skills/backend/apiEngineering/evals/evalApiEngineering.py +81 -0
  8. package/skills/backend/apiEngineering/evals/fixtures/invalid/sampleInvalidOpenApi.json +40 -0
  9. package/skills/backend/apiEngineering/evals/fixtures/valid/sampleValidOpenApi.json +47 -0
  10. package/skills/backend/apiEngineering/policies/compatibility.md +42 -0
  11. package/skills/backend/apiEngineering/policies/mandatory.md +48 -0
  12. package/skills/backend/apiEngineering/policies/performance.md +39 -0
  13. package/skills/backend/apiEngineering/policies/security.md +36 -0
  14. package/skills/backend/apiEngineering/references/apiObservability.md +39 -0
  15. package/skills/backend/apiEngineering/references/apiReference.md +3 -0
  16. package/skills/backend/apiEngineering/references/apiSecurityOwasp.md +47 -0
  17. package/skills/backend/apiEngineering/references/contractCompatibility.md +26 -0
  18. package/skills/backend/apiEngineering/references/databaseTransactions.md +40 -0
  19. package/skills/backend/apiEngineering/references/distributedReliability.md +26 -0
  20. package/skills/backend/apiEngineering/references/multiTenancy.md +27 -0
  21. package/skills/backend/apiEngineering/references/openApi32Standards.md +58 -0
  22. package/skills/backend/apiEngineering/references/paginationVersioning.md +57 -0
  23. package/skills/backend/apiEngineering/references/responseStandards.md +94 -0
  24. package/skills/backend/apiEngineering/scripts/auditApiContract.py +123 -0
  25. package/skills/backend/apiEngineering/scripts/checkBreakingChanges.py +77 -0
  26. package/skills/backend/apiEngineering/scripts/generateResponseEnvelope.py +88 -0
  27. package/skills/backend/apiEngineering/templates/apiChecklist.md +27 -0
  28. package/skills/backend/apiEngineering/templates/openapi.yaml +125 -0
  29. package/skills/backend/apiEngineering/templates/problemDetails.json +44 -0
  30. package/skills/backend/databaseArchitecture/SKILL.md +118 -0
  31. package/skills/backend/databaseArchitecture/evals/evalDatabaseArchitecture.py +85 -0
  32. package/skills/backend/databaseArchitecture/evals/fixtures/dangerousMigration.sql +4 -0
  33. package/skills/backend/databaseArchitecture/evals/fixtures/invalidSchema.sql +23 -0
  34. package/skills/backend/databaseArchitecture/evals/fixtures/safeMigration.sql +3 -0
  35. package/skills/backend/databaseArchitecture/evals/fixtures/validSchema.sql +37 -0
  36. package/skills/backend/databaseArchitecture/policies/integrity.md +25 -0
  37. package/skills/backend/databaseArchitecture/policies/mandatory.md +32 -0
  38. package/skills/backend/databaseArchitecture/policies/migration.md +22 -0
  39. package/skills/backend/databaseArchitecture/policies/normalization.md +25 -0
  40. package/skills/backend/databaseArchitecture/policies/performance.md +26 -0
  41. package/skills/backend/databaseArchitecture/policies/recovery.md +23 -0
  42. package/skills/backend/databaseArchitecture/policies/security.md +26 -0
  43. package/skills/backend/databaseArchitecture/policies/tableCreationChecklist.md +70 -0
  44. package/skills/backend/databaseArchitecture/references/analyticsWarehousing.md +32 -0
  45. package/skills/backend/databaseArchitecture/references/apiReference.md +3 -0
  46. package/skills/backend/databaseArchitecture/references/backupDisasterRecovery.md +27 -0
  47. package/skills/backend/databaseArchitecture/references/dataModelingLifecycle.md +30 -0
  48. package/skills/backend/databaseArchitecture/references/databaseTaxonomy.md +32 -0
  49. package/skills/backend/databaseArchitecture/references/indexingOptimization.md +32 -0
  50. package/skills/backend/databaseArchitecture/references/normalizationTheory.md +61 -0
  51. package/skills/backend/databaseArchitecture/references/scalabilitySharding.md +37 -0
  52. package/skills/backend/databaseArchitecture/references/transactionConcurrency.md +39 -0
  53. package/skills/backend/databaseArchitecture/scripts/analyzeMigration.py +99 -0
  54. package/skills/backend/databaseArchitecture/scripts/auditDatabaseSchema.py +177 -0
  55. package/skills/backend/databaseArchitecture/scripts/inspectDatabaseIndexes.py +149 -0
  56. package/skills/backend/databaseArchitecture/templates/adrTemplate.md +32 -0
  57. package/skills/backend/databaseArchitecture/templates/databaseChecklist.md +29 -0
  58. package/skills/backend/databaseArchitecture/templates/migrationPlan.md +40 -0
  59. package/skills/backend/durableBackgroundJobs/SKILL.md +112 -0
  60. package/skills/backend/durableBackgroundJobs/evals/durableJobVerification.json +14 -0
  61. package/skills/backend/durableBackgroundJobs/references/apiReference.md +3 -0
  62. package/skills/backend/durableBackgroundJobs/references/durableStepPatterns.md +6 -0
  63. package/skills/backend/durableBackgroundJobs/references/idempotencyKeys.md +5 -0
  64. package/skills/backend/durableBackgroundJobs/scripts/testWorkflowDispatch.py +24 -0
  65. package/skills/backend/golangStandard/SKILL.md +155 -0
  66. package/skills/backend/golangStandard/evals/goVerification.json +14 -0
  67. package/skills/backend/golangStandard/references/apiReference.md +3 -0
  68. package/skills/backend/golangStandard/references/layoutGuide.md +26 -0
  69. package/skills/backend/golangStandard/references/slogPatterns.md +26 -0
  70. package/skills/backend/golangStandard/scripts/scaffoldGoModule.py +105 -0
  71. package/skills/backend/pythonStandard/SKILL.md +138 -0
  72. package/skills/backend/pythonStandard/evals/pythonVerification.json +14 -0
  73. package/skills/backend/pythonStandard/references/apiReference.md +3 -0
  74. package/skills/backend/pythonStandard/references/pydanticPatterns.md +16 -0
  75. package/skills/backend/pythonStandard/references/pyprojectSpecs.md +37 -0
  76. package/skills/backend/pythonStandard/scripts/scaffoldUvProject.py +79 -0
  77. package/skills/backend/upstash/SKILL.md +98 -0
  78. package/skills/backend/upstash/evals/upstashVerification.json +14 -0
  79. package/skills/backend/upstash/references/apiReference.md +3 -0
  80. package/skills/backend/upstash/references/qstashFlowControl.md +34 -0
  81. package/skills/backend/upstash/references/ratelimitPatterns.md +53 -0
  82. package/skills/backend/upstash/references/workflowPatterns.md +35 -0
  83. package/skills/backend/upstash/scripts/testRedisConnection.py +36 -0
  84. package/skills/cicdDevops/cicdPipeline/SKILL.md +148 -0
  85. package/skills/cicdDevops/cicdPipeline/evals/evalCicd.py +37 -0
  86. package/skills/cicdDevops/cicdPipeline/references/apiReference.md +3 -0
  87. package/skills/cicdDevops/cicdPipeline/references/cicdDeploymentPatterns.md +27 -0
  88. package/skills/cicdDevops/cicdPipeline/scripts/auditDockerfileSecurity.py +56 -0
  89. package/skills/dataAi/mcpServerDevelopment/SKILL.md +123 -0
  90. package/skills/dataAi/mcpServerDevelopment/evals/mcpVerification.json +14 -0
  91. package/skills/dataAi/mcpServerDevelopment/references/apiReference.md +3 -0
  92. package/skills/dataAi/mcpServerDevelopment/references/mcpClientConfigs.md +38 -0
  93. package/skills/dataAi/mcpServerDevelopment/references/toolSchemaDesign.md +6 -0
  94. package/skills/dataAi/mcpServerDevelopment/scripts/runFastMcpBoilerplate.py +36 -0
  95. package/skills/dataAi/ragPipelineProduction/SKILL.md +113 -0
  96. package/skills/dataAi/ragPipelineProduction/evals/ragVerification.json +14 -0
  97. package/skills/dataAi/ragPipelineProduction/references/apiReference.md +3 -0
  98. package/skills/dataAi/ragPipelineProduction/references/chunkingStrategies.md +10 -0
  99. package/skills/dataAi/ragPipelineProduction/references/rrfAlgorithm.md +13 -0
  100. package/skills/dataAi/ragPipelineProduction/scripts/runHybridRrfSearch.py +33 -0
  101. package/skills/devopsCloud/cloudflare/SKILL.md +282 -0
  102. package/skills/devopsCloud/cloudflare/assets/README.md +48 -0
  103. package/skills/devopsCloud/cloudflare/assets/ai/agents-sdk.md +118 -0
  104. package/skills/devopsCloud/cloudflare/assets/ai/ai-gateway.md +105 -0
  105. package/skills/devopsCloud/cloudflare/assets/ai/ai-search.md +129 -0
  106. package/skills/devopsCloud/cloudflare/assets/ai/workers-ai.md +127 -0
  107. package/skills/devopsCloud/cloudflare/assets/cli/c3.md +292 -0
  108. package/skills/devopsCloud/cloudflare/assets/cli/cf-cli.md +90 -0
  109. package/skills/devopsCloud/cloudflare/assets/cli/wrangler.md +43 -0
  110. package/skills/devopsCloud/cloudflare/assets/compute/cron-triggers.md +486 -0
  111. package/skills/devopsCloud/cloudflare/assets/compute/service-bindings.md +251 -0
  112. package/skills/devopsCloud/cloudflare/assets/compute/smart-placement.md +435 -0
  113. package/skills/devopsCloud/cloudflare/assets/compute/static-assets.md +220 -0
  114. package/skills/devopsCloud/cloudflare/assets/compute/workers.md +129 -0
  115. package/skills/devopsCloud/cloudflare/assets/database-storage/d1.md +105 -0
  116. package/skills/devopsCloud/cloudflare/assets/database-storage/durable-objects.md +122 -0
  117. package/skills/devopsCloud/cloudflare/assets/database-storage/hyperdrive.md +210 -0
  118. package/skills/devopsCloud/cloudflare/assets/database-storage/kv.md +198 -0
  119. package/skills/devopsCloud/cloudflare/assets/database-storage/queues.md +105 -0
  120. package/skills/devopsCloud/cloudflare/assets/database-storage/r2.md +105 -0
  121. package/skills/devopsCloud/cloudflare/assets/database-storage/vectorize.md +97 -0
  122. package/skills/devopsCloud/cloudflare/assets/database-storage/workflows.md +141 -0
  123. package/skills/devopsCloud/cloudflare/assets/llms.txt +143 -0
  124. package/skills/devopsCloud/cloudflare/assets/networking-security/cache-cdn.md +109 -0
  125. package/skills/devopsCloud/cloudflare/assets/networking-security/dns.md +71 -0
  126. package/skills/devopsCloud/cloudflare/assets/networking-security/rate-limiting.md +130 -0
  127. package/skills/devopsCloud/cloudflare/assets/networking-security/tunnels.md +57 -0
  128. package/skills/devopsCloud/cloudflare/assets/networking-security/waf.md +143 -0
  129. package/skills/devopsCloud/cloudflare/assets/troubleshooting/1xxx-errors.md +209 -0
  130. package/skills/devopsCloud/cloudflare/assets/troubleshooting/5xx-errors.md +111 -0
  131. package/skills/devopsCloud/cloudflare/assets/troubleshooting/http-status-codes.md +38 -0
  132. package/skills/devopsCloud/cloudflare/evals/evals.json +75 -0
  133. package/skills/devopsCloud/cloudflare/references/ai-gateway/README.md +27 -0
  134. package/skills/devopsCloud/cloudflare/references/ai-gateway/configuration.md +18 -0
  135. package/skills/devopsCloud/cloudflare/references/ai-gateway/dynamic-routing.md +15 -0
  136. package/skills/devopsCloud/cloudflare/references/ai-gateway/features.md +22 -0
  137. package/skills/devopsCloud/cloudflare/references/ai-gateway/sdk-integration.md +19 -0
  138. package/skills/devopsCloud/cloudflare/references/ai-gateway/troubleshooting.md +16 -0
  139. package/skills/devopsCloud/cloudflare/references/ai-search/README.md +25 -0
  140. package/skills/devopsCloud/cloudflare/references/ai-search/api.md +13 -0
  141. package/skills/devopsCloud/cloudflare/references/ai-search/configuration.md +16 -0
  142. package/skills/devopsCloud/cloudflare/references/ai-search/gotchas.md +13 -0
  143. package/skills/devopsCloud/cloudflare/references/ai-search/patterns.md +15 -0
  144. package/skills/devopsCloud/cloudflare/references/bindings/README.md +16 -0
  145. package/skills/devopsCloud/cloudflare/references/bindings/api.md +19 -0
  146. package/skills/devopsCloud/cloudflare/references/bindings/configuration.md +20 -0
  147. package/skills/devopsCloud/cloudflare/references/bindings/gotchas.md +18 -0
  148. package/skills/devopsCloud/cloudflare/references/bindings/patterns.md +20 -0
  149. package/skills/devopsCloud/cloudflare/references/browser-rendering/README.md +18 -0
  150. package/skills/devopsCloud/cloudflare/references/browser-rendering/api.md +12 -0
  151. package/skills/devopsCloud/cloudflare/references/browser-rendering/configuration.md +12 -0
  152. package/skills/devopsCloud/cloudflare/references/browser-rendering/gotchas.md +15 -0
  153. package/skills/devopsCloud/cloudflare/references/browser-rendering/patterns.md +12 -0
  154. package/skills/devopsCloud/cloudflare/references/cliComparison.md +93 -0
  155. package/skills/devopsCloud/cloudflare/references/containers/README.md +23 -0
  156. package/skills/devopsCloud/cloudflare/references/containers/api.md +13 -0
  157. package/skills/devopsCloud/cloudflare/references/containers/configuration.md +15 -0
  158. package/skills/devopsCloud/cloudflare/references/containers/gotchas.md +16 -0
  159. package/skills/devopsCloud/cloudflare/references/containers/patterns.md +18 -0
  160. package/skills/devopsCloud/cloudflare/references/cron-triggers/README.md +20 -0
  161. package/skills/devopsCloud/cloudflare/references/cron-triggers/api.md +16 -0
  162. package/skills/devopsCloud/cloudflare/references/cron-triggers/configuration.md +16 -0
  163. package/skills/devopsCloud/cloudflare/references/cron-triggers/gotchas.md +17 -0
  164. package/skills/devopsCloud/cloudflare/references/cron-triggers/patterns.md +18 -0
  165. package/skills/devopsCloud/cloudflare/references/d1/README.md +15 -0
  166. package/skills/devopsCloud/cloudflare/references/d1/api.md +18 -0
  167. package/skills/devopsCloud/cloudflare/references/d1/configuration.md +18 -0
  168. package/skills/devopsCloud/cloudflare/references/d1/gotchas.md +18 -0
  169. package/skills/devopsCloud/cloudflare/references/d1/patterns.md +21 -0
  170. package/skills/devopsCloud/cloudflare/references/frameworkCompatibility.md +110 -0
  171. package/skills/devopsCloud/cloudflare/references/hyperdrive/README.md +28 -0
  172. package/skills/devopsCloud/cloudflare/references/hyperdrive/api.md +26 -0
  173. package/skills/devopsCloud/cloudflare/references/hyperdrive/configuration.md +34 -0
  174. package/skills/devopsCloud/cloudflare/references/hyperdrive/gotchas.md +20 -0
  175. package/skills/devopsCloud/cloudflare/references/hyperdrive/patterns.md +15 -0
  176. package/skills/devopsCloud/cloudflare/references/images/README.md +12 -0
  177. package/skills/devopsCloud/cloudflare/references/images/api.md +13 -0
  178. package/skills/devopsCloud/cloudflare/references/images/configuration.md +17 -0
  179. package/skills/devopsCloud/cloudflare/references/images/gotchas.md +16 -0
  180. package/skills/devopsCloud/cloudflare/references/images/patterns.md +16 -0
  181. package/skills/devopsCloud/cloudflare/references/kv/README.md +15 -0
  182. package/skills/devopsCloud/cloudflare/references/kv/api.md +18 -0
  183. package/skills/devopsCloud/cloudflare/references/kv/configuration.md +16 -0
  184. package/skills/devopsCloud/cloudflare/references/kv/gotchas.md +17 -0
  185. package/skills/devopsCloud/cloudflare/references/kv/patterns.md +21 -0
  186. package/skills/devopsCloud/cloudflare/references/miniflare/README.md +22 -0
  187. package/skills/devopsCloud/cloudflare/references/miniflare/api.md +16 -0
  188. package/skills/devopsCloud/cloudflare/references/miniflare/configuration.md +16 -0
  189. package/skills/devopsCloud/cloudflare/references/miniflare/gotchas.md +15 -0
  190. package/skills/devopsCloud/cloudflare/references/miniflare/patterns.md +19 -0
  191. package/skills/devopsCloud/cloudflare/references/observability/README.md +27 -0
  192. package/skills/devopsCloud/cloudflare/references/observability/api.md +20 -0
  193. package/skills/devopsCloud/cloudflare/references/observability/configuration.md +23 -0
  194. package/skills/devopsCloud/cloudflare/references/observability/gotchas.md +25 -0
  195. package/skills/devopsCloud/cloudflare/references/observability/patterns.md +14 -0
  196. package/skills/devopsCloud/cloudflare/references/pages/README.md +20 -0
  197. package/skills/devopsCloud/cloudflare/references/pages/api.md +13 -0
  198. package/skills/devopsCloud/cloudflare/references/pages/configuration.md +16 -0
  199. package/skills/devopsCloud/cloudflare/references/pages/gotchas.md +19 -0
  200. package/skills/devopsCloud/cloudflare/references/pages/patterns.md +15 -0
  201. package/skills/devopsCloud/cloudflare/references/pages-functions/README.md +20 -0
  202. package/skills/devopsCloud/cloudflare/references/pages-functions/api.md +13 -0
  203. package/skills/devopsCloud/cloudflare/references/pages-functions/configuration.md +14 -0
  204. package/skills/devopsCloud/cloudflare/references/pages-functions/gotchas.md +17 -0
  205. package/skills/devopsCloud/cloudflare/references/pages-functions/patterns.md +16 -0
  206. package/skills/devopsCloud/cloudflare/references/productSelectionMatrix.md +54 -0
  207. package/skills/devopsCloud/cloudflare/references/queues/README.md +24 -0
  208. package/skills/devopsCloud/cloudflare/references/queues/api.md +16 -0
  209. package/skills/devopsCloud/cloudflare/references/queues/configuration.md +20 -0
  210. package/skills/devopsCloud/cloudflare/references/queues/gotchas.md +18 -0
  211. package/skills/devopsCloud/cloudflare/references/queues/patterns.md +21 -0
  212. package/skills/devopsCloud/cloudflare/references/r2/README.md +26 -0
  213. package/skills/devopsCloud/cloudflare/references/r2/api.md +16 -0
  214. package/skills/devopsCloud/cloudflare/references/r2/configuration.md +19 -0
  215. package/skills/devopsCloud/cloudflare/references/r2/gotchas.md +17 -0
  216. package/skills/devopsCloud/cloudflare/references/r2/patterns.md +18 -0
  217. package/skills/devopsCloud/cloudflare/references/secrets-store/README.md +22 -0
  218. package/skills/devopsCloud/cloudflare/references/secrets-store/api.md +21 -0
  219. package/skills/devopsCloud/cloudflare/references/secrets-store/configuration.md +25 -0
  220. package/skills/devopsCloud/cloudflare/references/secrets-store/gotchas.md +19 -0
  221. package/skills/devopsCloud/cloudflare/references/secrets-store/patterns.md +27 -0
  222. package/skills/devopsCloud/cloudflare/references/skill-feedback.md +41 -0
  223. package/skills/devopsCloud/cloudflare/references/static-assets/README.md +21 -0
  224. package/skills/devopsCloud/cloudflare/references/static-assets/api.md +16 -0
  225. package/skills/devopsCloud/cloudflare/references/static-assets/configuration.md +16 -0
  226. package/skills/devopsCloud/cloudflare/references/static-assets/gotchas.md +18 -0
  227. package/skills/devopsCloud/cloudflare/references/static-assets/patterns.md +17 -0
  228. package/skills/devopsCloud/cloudflare/references/stream/README.md +22 -0
  229. package/skills/devopsCloud/cloudflare/references/stream/api-live.md +18 -0
  230. package/skills/devopsCloud/cloudflare/references/stream/api.md +21 -0
  231. package/skills/devopsCloud/cloudflare/references/stream/configuration.md +18 -0
  232. package/skills/devopsCloud/cloudflare/references/stream/gotchas.md +18 -0
  233. package/skills/devopsCloud/cloudflare/references/stream/patterns.md +22 -0
  234. package/skills/devopsCloud/cloudflare/references/tail-workers/README.md +21 -0
  235. package/skills/devopsCloud/cloudflare/references/tail-workers/api.md +13 -0
  236. package/skills/devopsCloud/cloudflare/references/tail-workers/configuration.md +15 -0
  237. package/skills/devopsCloud/cloudflare/references/tail-workers/gotchas.md +16 -0
  238. package/skills/devopsCloud/cloudflare/references/tail-workers/patterns.md +15 -0
  239. package/skills/devopsCloud/cloudflare/references/tunnel/README.md +20 -0
  240. package/skills/devopsCloud/cloudflare/references/tunnel/api.md +14 -0
  241. package/skills/devopsCloud/cloudflare/references/tunnel/configuration.md +14 -0
  242. package/skills/devopsCloud/cloudflare/references/tunnel/gotchas.md +15 -0
  243. package/skills/devopsCloud/cloudflare/references/tunnel/networking.md +14 -0
  244. package/skills/devopsCloud/cloudflare/references/tunnel/patterns.md +15 -0
  245. package/skills/devopsCloud/cloudflare/references/vectorize/README.md +22 -0
  246. package/skills/devopsCloud/cloudflare/references/vectorize/api.md +18 -0
  247. package/skills/devopsCloud/cloudflare/references/vectorize/configuration.md +19 -0
  248. package/skills/devopsCloud/cloudflare/references/vectorize/gotchas.md +15 -0
  249. package/skills/devopsCloud/cloudflare/references/vectorize/patterns.md +24 -0
  250. package/skills/devopsCloud/cloudflare/references/waf/README.md +21 -0
  251. package/skills/devopsCloud/cloudflare/references/waf/api.md +17 -0
  252. package/skills/devopsCloud/cloudflare/references/waf/configuration.md +18 -0
  253. package/skills/devopsCloud/cloudflare/references/waf/gotchas.md +19 -0
  254. package/skills/devopsCloud/cloudflare/references/waf/patterns.md +17 -0
  255. package/skills/devopsCloud/cloudflare/references/workers-ai/README.md +24 -0
  256. package/skills/devopsCloud/cloudflare/references/workers-ai/api.md +13 -0
  257. package/skills/devopsCloud/cloudflare/references/workers-ai/configuration.md +16 -0
  258. package/skills/devopsCloud/cloudflare/references/workers-ai/gotchas.md +15 -0
  259. package/skills/devopsCloud/cloudflare/references/workers-ai/patterns.md +14 -0
  260. package/skills/devopsCloud/cloudflare/references/workflows/README.md +23 -0
  261. package/skills/devopsCloud/cloudflare/references/workflows/api.md +17 -0
  262. package/skills/devopsCloud/cloudflare/references/workflows/configuration.md +18 -0
  263. package/skills/devopsCloud/cloudflare/references/workflows/gotchas.md +19 -0
  264. package/skills/devopsCloud/cloudflare/references/workflows/patterns.md +30 -0
  265. package/skills/devopsCloud/cloudflare/scripts/auditCloudflareProduction.py +95 -0
  266. package/skills/foundation/promptEvalTesting/SKILL.md +114 -0
  267. package/skills/foundation/promptEvalTesting/evals/promptEvalVerification.json +14 -0
  268. package/skills/foundation/promptEvalTesting/references/apiReference.md +3 -0
  269. package/skills/foundation/promptEvalTesting/references/evalMetricsCatalog.md +7 -0
  270. package/skills/foundation/promptEvalTesting/references/promptfooConfigSpecs.md +16 -0
  271. package/skills/foundation/promptEvalTesting/scripts/runPromptEvalSuite.py +29 -0
  272. package/skills/frontend/astro/SKILL.md +327 -0
  273. package/skills/frontend/astro/assets/README.md +71 -0
  274. package/skills/frontend/astro/assets/add-content-to-your-site/content-collections.md +1061 -0
  275. package/skills/frontend/astro/assets/add-content-to-your-site/data-fetching.md +109 -0
  276. package/skills/frontend/astro/assets/add-content-to-your-site/images.md +719 -0
  277. package/skills/frontend/astro/assets/add-content-to-your-site/markdown.md +725 -0
  278. package/skills/frontend/astro/assets/build-your-ui/components.md +402 -0
  279. package/skills/frontend/astro/assets/build-your-ui/fonts.md +437 -0
  280. package/skills/frontend/astro/assets/build-your-ui/front-end-frameworks.md +245 -0
  281. package/skills/frontend/astro/assets/build-your-ui/layouts.md +267 -0
  282. package/skills/frontend/astro/assets/build-your-ui/scripts-and-event-handling.md +229 -0
  283. package/skills/frontend/astro/assets/build-your-ui/styles-and-css.md +782 -0
  284. package/skills/frontend/astro/assets/build-your-ui/syntax-highlighting.md +269 -0
  285. package/skills/frontend/astro/assets/configuration/build-with-ai.md +389 -0
  286. package/skills/frontend/astro/assets/configuration/configuration-overview.md +122 -0
  287. package/skills/frontend/astro/assets/configuration/dev-toolbar.md +86 -0
  288. package/skills/frontend/astro/assets/configuration/editor-setup.md +166 -0
  289. package/skills/frontend/astro/assets/configuration/environment-variables.md +352 -0
  290. package/skills/frontend/astro/assets/configuration/typescript.md +379 -0
  291. package/skills/frontend/astro/assets/configuration/working-with-integrations.md +606 -0
  292. package/skills/frontend/astro/assets/reference/adapter-reference.md +1242 -0
  293. package/skills/frontend/astro/assets/reference/cli-reference.md +575 -0
  294. package/skills/frontend/astro/assets/reference/configuration-reference.md +3144 -0
  295. package/skills/frontend/astro/assets/reference/content-loader-reference.md +1682 -0
  296. package/skills/frontend/astro/assets/reference/directives-reference.md +324 -0
  297. package/skills/frontend/astro/assets/reference/image-service-reference.md +346 -0
  298. package/skills/frontend/astro/assets/reference/integrations-reference.md +2813 -0
  299. package/skills/frontend/astro/assets/reference/modules/astro-actions.md +604 -0
  300. package/skills/frontend/astro/assets/reference/modules/astro-app.md +460 -0
  301. package/skills/frontend/astro/assets/reference/modules/astro-assets.md +1657 -0
  302. package/skills/frontend/astro/assets/reference/modules/astro-config.md +395 -0
  303. package/skills/frontend/astro/assets/reference/modules/astro-content.md +720 -0
  304. package/skills/frontend/astro/assets/reference/modules/astro-env.md +46 -0
  305. package/skills/frontend/astro/assets/reference/modules/astro-fetch.md +346 -0
  306. package/skills/frontend/astro/assets/reference/modules/astro-hono.md +37 -0
  307. package/skills/frontend/astro/assets/reference/modules/astro-i18n.md +462 -0
  308. package/skills/frontend/astro/assets/reference/modules/astro-middleware.md +292 -0
  309. package/skills/frontend/astro/assets/reference/modules/astro-static-paths.md +74 -0
  310. package/skills/frontend/astro/assets/reference/modules/astro-transitions.md +595 -0
  311. package/skills/frontend/astro/assets/reference/modules/astro-zod.md +120 -0
  312. package/skills/frontend/astro/assets/reference/session-driver-reference.md +205 -0
  313. package/skills/frontend/astro/assets/routing-and-navigation/endpoints.md +251 -0
  314. package/skills/frontend/astro/assets/routing-and-navigation/internationalization.md +374 -0
  315. package/skills/frontend/astro/assets/routing-and-navigation/middleware.md +288 -0
  316. package/skills/frontend/astro/assets/routing-and-navigation/pages.md +205 -0
  317. package/skills/frontend/astro/assets/routing-and-navigation/prefetch.md +273 -0
  318. package/skills/frontend/astro/assets/routing-and-navigation/routing.md +760 -0
  319. package/skills/frontend/astro/assets/routing-and-navigation/view-transitions.md +792 -0
  320. package/skills/frontend/astro/assets/server-rendering/actions.md +770 -0
  321. package/skills/frontend/astro/assets/server-rendering/caching.md +255 -0
  322. package/skills/frontend/astro/assets/server-rendering/on-demand-rendering.md +289 -0
  323. package/skills/frontend/astro/assets/server-rendering/server-islands.md +126 -0
  324. package/skills/frontend/astro/assets/server-rendering/sessions.md +270 -0
  325. package/skills/frontend/astro/assets/start-a-new-project/develop-and-build.md +147 -0
  326. package/skills/frontend/astro/assets/start-a-new-project/installation.md +342 -0
  327. package/skills/frontend/astro/assets/start-a-new-project/project-structure.md +137 -0
  328. package/skills/frontend/astro/assets/upgrade-and-troubleshooting/testing.md +412 -0
  329. package/skills/frontend/astro/assets/upgrade-and-troubleshooting/troubleshooting.md +229 -0
  330. package/skills/frontend/astro/assets/upgrade-and-troubleshooting/upgrade-astro.md +205 -0
  331. package/skills/frontend/astro/assets/welcome/courses.md +46 -0
  332. package/skills/frontend/astro/assets/welcome/islands-architecture.md +135 -0
  333. package/skills/frontend/astro/assets/welcome/why-astro.md +90 -0
  334. package/skills/frontend/astro/evals/evals.json +66 -0
  335. package/skills/frontend/astro/references/contentCollections.md +164 -0
  336. package/skills/frontend/astro/references/islandsArchitecture.md +128 -0
  337. package/skills/frontend/astro/references/serverIslandsAndActions.md +187 -0
  338. package/skills/frontend/astro/scripts/auditAstroProduction.py +78 -0
  339. package/skills/frontend/generativeUi/SKILL.md +128 -0
  340. package/skills/frontend/generativeUi/evals/generativeUiVerification.json +14 -0
  341. package/skills/frontend/generativeUi/references/apiReference.md +3 -0
  342. package/skills/frontend/generativeUi/references/clientToolComponentMapping.md +8 -0
  343. package/skills/frontend/generativeUi/references/dataStreamProtocol.md +10 -0
  344. package/skills/frontend/generativeUi/scripts/generateUiComponentStub.py +46 -0
  345. package/skills/frontend/nextjs/SKILL.md +138 -0
  346. package/skills/frontend/nextjs/assets/README.md +67 -0
  347. package/skills/frontend/nextjs/assets/api-reference/cli/create-next-app.md +210 -0
  348. package/skills/frontend/nextjs/assets/api-reference/cli/next.md +484 -0
  349. package/skills/frontend/nextjs/assets/api-reference/components/font.md +952 -0
  350. package/skills/frontend/nextjs/assets/api-reference/components/form.md +387 -0
  351. package/skills/frontend/nextjs/assets/api-reference/components/image.md +1372 -0
  352. package/skills/frontend/nextjs/assets/api-reference/components/link.md +954 -0
  353. package/skills/frontend/nextjs/assets/api-reference/components/script.md +421 -0
  354. package/skills/frontend/nextjs/assets/api-reference/directives/use-cache-private.md +211 -0
  355. package/skills/frontend/nextjs/assets/api-reference/directives/use-cache-remote.md +652 -0
  356. package/skills/frontend/nextjs/assets/api-reference/directives/use-cache.md +848 -0
  357. package/skills/frontend/nextjs/assets/api-reference/directives/use-client.md +149 -0
  358. package/skills/frontend/nextjs/assets/api-reference/directives/use-server.md +234 -0
  359. package/skills/frontend/nextjs/assets/api-reference/edge-runtime.md +188 -0
  360. package/skills/frontend/nextjs/assets/api-reference/file-conventions/default.md +80 -0
  361. package/skills/frontend/nextjs/assets/api-reference/file-conventions/dynamic-routes.md +417 -0
  362. package/skills/frontend/nextjs/assets/api-reference/file-conventions/error.md +361 -0
  363. package/skills/frontend/nextjs/assets/api-reference/file-conventions/forbidden.md +75 -0
  364. package/skills/frontend/nextjs/assets/api-reference/file-conventions/instrumentation-client.md +308 -0
  365. package/skills/frontend/nextjs/assets/api-reference/file-conventions/instrumentation.md +177 -0
  366. package/skills/frontend/nextjs/assets/api-reference/file-conventions/intercepting-routes.md +78 -0
  367. package/skills/frontend/nextjs/assets/api-reference/file-conventions/layout.md +803 -0
  368. package/skills/frontend/nextjs/assets/api-reference/file-conventions/loading.md +209 -0
  369. package/skills/frontend/nextjs/assets/api-reference/file-conventions/mdx-components.md +84 -0
  370. package/skills/frontend/nextjs/assets/api-reference/file-conventions/metadata/app-icons.md +302 -0
  371. package/skills/frontend/nextjs/assets/api-reference/file-conventions/metadata/manifest.md +90 -0
  372. package/skills/frontend/nextjs/assets/api-reference/file-conventions/metadata/opengraph-image.md +580 -0
  373. package/skills/frontend/nextjs/assets/api-reference/file-conventions/metadata/robots.md +234 -0
  374. package/skills/frontend/nextjs/assets/api-reference/file-conventions/metadata/sitemap.md +459 -0
  375. package/skills/frontend/nextjs/assets/api-reference/file-conventions/not-found.md +278 -0
  376. package/skills/frontend/nextjs/assets/api-reference/file-conventions/page.md +283 -0
  377. package/skills/frontend/nextjs/assets/api-reference/file-conventions/parallel-routes.md +517 -0
  378. package/skills/frontend/nextjs/assets/api-reference/file-conventions/proxy.md +857 -0
  379. package/skills/frontend/nextjs/assets/api-reference/file-conventions/public-folder.md +47 -0
  380. package/skills/frontend/nextjs/assets/api-reference/file-conventions/route-groups.md +40 -0
  381. package/skills/frontend/nextjs/assets/api-reference/file-conventions/route-segment-config/dynamicParams.md +40 -0
  382. package/skills/frontend/nextjs/assets/api-reference/file-conventions/route-segment-config/ensureStatic.md +195 -0
  383. package/skills/frontend/nextjs/assets/api-reference/file-conventions/route-segment-config/instant.md +204 -0
  384. package/skills/frontend/nextjs/assets/api-reference/file-conventions/route-segment-config/maxDuration.md +42 -0
  385. package/skills/frontend/nextjs/assets/api-reference/file-conventions/route-segment-config/preferredRegion.md +55 -0
  386. package/skills/frontend/nextjs/assets/api-reference/file-conventions/route-segment-config/prefetch.md +113 -0
  387. package/skills/frontend/nextjs/assets/api-reference/file-conventions/route-segment-config/runtime.md +43 -0
  388. package/skills/frontend/nextjs/assets/api-reference/file-conventions/route.md +772 -0
  389. package/skills/frontend/nextjs/assets/api-reference/file-conventions/src-folder.md +42 -0
  390. package/skills/frontend/nextjs/assets/api-reference/file-conventions/template.md +174 -0
  391. package/skills/frontend/nextjs/assets/api-reference/file-conventions/unauthorized.md +143 -0
  392. package/skills/frontend/nextjs/assets/api-reference/functions/after.md +332 -0
  393. package/skills/frontend/nextjs/assets/api-reference/functions/cacheLife.md +642 -0
  394. package/skills/frontend/nextjs/assets/api-reference/functions/cacheTag.md +272 -0
  395. package/skills/frontend/nextjs/assets/api-reference/functions/catchError.md +267 -0
  396. package/skills/frontend/nextjs/assets/api-reference/functions/connection.md +114 -0
  397. package/skills/frontend/nextjs/assets/api-reference/functions/cookies.md +349 -0
  398. package/skills/frontend/nextjs/assets/api-reference/functions/draft-mode.md +173 -0
  399. package/skills/frontend/nextjs/assets/api-reference/functions/fetch.md +141 -0
  400. package/skills/frontend/nextjs/assets/api-reference/functions/forbidden.md +327 -0
  401. package/skills/frontend/nextjs/assets/api-reference/functions/generate-image-metadata.md +311 -0
  402. package/skills/frontend/nextjs/assets/api-reference/functions/generate-metadata.md +1510 -0
  403. package/skills/frontend/nextjs/assets/api-reference/functions/generate-sitemaps.md +102 -0
  404. package/skills/frontend/nextjs/assets/api-reference/functions/generate-static-params.md +606 -0
  405. package/skills/frontend/nextjs/assets/api-reference/functions/generate-viewport.md +347 -0
  406. package/skills/frontend/nextjs/assets/api-reference/functions/headers.md +92 -0
  407. package/skills/frontend/nextjs/assets/api-reference/functions/image-response.md +225 -0
  408. package/skills/frontend/nextjs/assets/api-reference/functions/io.md +131 -0
  409. package/skills/frontend/nextjs/assets/api-reference/functions/navigation.md +220 -0
  410. package/skills/frontend/nextjs/assets/api-reference/functions/next-request.md +116 -0
  411. package/skills/frontend/nextjs/assets/api-reference/functions/next-response.md +219 -0
  412. package/skills/frontend/nextjs/assets/api-reference/functions/next-root-params.md +479 -0
  413. package/skills/frontend/nextjs/assets/api-reference/functions/not-found.md +269 -0
  414. package/skills/frontend/nextjs/assets/api-reference/functions/permanentRedirect.md +92 -0
  415. package/skills/frontend/nextjs/assets/api-reference/functions/prefetch.md +202 -0
  416. package/skills/frontend/nextjs/assets/api-reference/functions/redirect.md +255 -0
  417. package/skills/frontend/nextjs/assets/api-reference/functions/refresh.md +91 -0
  418. package/skills/frontend/nextjs/assets/api-reference/functions/revalidatePath.md +248 -0
  419. package/skills/frontend/nextjs/assets/api-reference/functions/revalidateTag.md +175 -0
  420. package/skills/frontend/nextjs/assets/api-reference/functions/unauthorized.md +389 -0
  421. package/skills/frontend/nextjs/assets/api-reference/functions/unstable_cache.md +131 -0
  422. package/skills/frontend/nextjs/assets/api-reference/functions/unstable_noStore.md +61 -0
  423. package/skills/frontend/nextjs/assets/api-reference/functions/unstable_rethrow.md +79 -0
  424. package/skills/frontend/nextjs/assets/api-reference/functions/updateTag.md +173 -0
  425. package/skills/frontend/nextjs/assets/api-reference/functions/use-link-status.md +268 -0
  426. package/skills/frontend/nextjs/assets/api-reference/functions/use-offline.md +222 -0
  427. package/skills/frontend/nextjs/assets/api-reference/functions/use-params.md +102 -0
  428. package/skills/frontend/nextjs/assets/api-reference/functions/use-pathname.md +189 -0
  429. package/skills/frontend/nextjs/assets/api-reference/functions/use-report-web-vitals.md +175 -0
  430. package/skills/frontend/nextjs/assets/api-reference/functions/use-router.md +214 -0
  431. package/skills/frontend/nextjs/assets/api-reference/functions/use-search-params.md +416 -0
  432. package/skills/frontend/nextjs/assets/api-reference/functions/use-selected-layout-segment.md +214 -0
  433. package/skills/frontend/nextjs/assets/api-reference/functions/use-selected-layout-segments.md +116 -0
  434. package/skills/frontend/nextjs/assets/api-reference/functions/use-server-inserted-html.md +145 -0
  435. package/skills/frontend/nextjs/assets/api-reference/functions/userAgent.md +95 -0
  436. package/skills/frontend/nextjs/assets/api-reference/turbopack.md +552 -0
  437. package/skills/frontend/nextjs/assets/architecture/accessibility.md +47 -0
  438. package/skills/frontend/nextjs/assets/architecture/fast-refresh.md +122 -0
  439. package/skills/frontend/nextjs/assets/architecture/nextjs-compiler.md +376 -0
  440. package/skills/frontend/nextjs/assets/architecture/supported-browsers.md +146 -0
  441. package/skills/frontend/nextjs/assets/community/contribution-guide.md +459 -0
  442. package/skills/frontend/nextjs/assets/community/rspack.md +25 -0
  443. package/skills/frontend/nextjs/assets/getting-started/caching.md +626 -0
  444. package/skills/frontend/nextjs/assets/getting-started/css.md +336 -0
  445. package/skills/frontend/nextjs/assets/getting-started/deploying.md +115 -0
  446. package/skills/frontend/nextjs/assets/getting-started/error-handling.md +485 -0
  447. package/skills/frontend/nextjs/assets/getting-started/fetching-data.md +743 -0
  448. package/skills/frontend/nextjs/assets/getting-started/fonts.md +232 -0
  449. package/skills/frontend/nextjs/assets/getting-started/images.md +272 -0
  450. package/skills/frontend/nextjs/assets/getting-started/installation.md +446 -0
  451. package/skills/frontend/nextjs/assets/getting-started/layouts-and-pages.md +386 -0
  452. package/skills/frontend/nextjs/assets/getting-started/linking-and-navigating.md +475 -0
  453. package/skills/frontend/nextjs/assets/getting-started/metadata-and-og-images.md +370 -0
  454. package/skills/frontend/nextjs/assets/getting-started/mutating-data.md +679 -0
  455. package/skills/frontend/nextjs/assets/getting-started/project-structure.md +290 -0
  456. package/skills/frontend/nextjs/assets/getting-started/proxy.md +107 -0
  457. package/skills/frontend/nextjs/assets/getting-started/revalidating.md +241 -0
  458. package/skills/frontend/nextjs/assets/getting-started/route-handlers.md +233 -0
  459. package/skills/frontend/nextjs/assets/getting-started/server-and-client-components.md +683 -0
  460. package/skills/frontend/nextjs/assets/getting-started/upgrading.md +137 -0
  461. package/skills/frontend/nextjs/assets/glossary.md +315 -0
  462. package/skills/frontend/nextjs/evals/nextjsVerification.json +14 -0
  463. package/skills/frontend/nextjs/references/apiReference.md +3 -0
  464. package/skills/frontend/nextjs/references/dataAccessLayer.md +39 -0
  465. package/skills/frontend/nextjs/references/nextjsFeatureMap.md +276 -0
  466. package/skills/frontend/nextjs/references/productionChecklist.md +49 -0
  467. package/skills/frontend/nextjs/references/securityHeadersCsp.md +44 -0
  468. package/skills/frontend/nextjs/scripts/auditProductionReadiness.py +85 -0
  469. package/skills/frontend/shadcn-ui/SKILL.md +102 -0
  470. package/skills/frontend/shadcn-ui/assets/README.md +82 -0
  471. package/skills/frontend/shadcn-ui/assets/advanced/javascript.md +44 -0
  472. package/skills/frontend/shadcn-ui/assets/advanced/monorepo.md +254 -0
  473. package/skills/frontend/shadcn-ui/assets/advanced/react-19.md +166 -0
  474. package/skills/frontend/shadcn-ui/assets/advanced/tailwind-v4.md +333 -0
  475. package/skills/frontend/shadcn-ui/assets/ai-elements/chain-of-thought.md +519 -0
  476. package/skills/frontend/shadcn-ui/assets/ai-elements/chat.md +581 -0
  477. package/skills/frontend/shadcn-ui/assets/ai-elements/checkpoint.md +243 -0
  478. package/skills/frontend/shadcn-ui/assets/ai-elements/confirmation.md +382 -0
  479. package/skills/frontend/shadcn-ui/assets/ai-elements/context.md +188 -0
  480. package/skills/frontend/shadcn-ui/assets/ai-elements/file-tree.md +248 -0
  481. package/skills/frontend/shadcn-ui/assets/ai-elements/index.md +307 -0
  482. package/skills/frontend/shadcn-ui/assets/ai-elements/inline-citation.md +219 -0
  483. package/skills/frontend/shadcn-ui/assets/ai-elements/message.md +298 -0
  484. package/skills/frontend/shadcn-ui/assets/ai-elements/model-selector.md +368 -0
  485. package/skills/frontend/shadcn-ui/assets/ai-elements/plan.md +398 -0
  486. package/skills/frontend/shadcn-ui/assets/ai-elements/prompt-input.md +403 -0
  487. package/skills/frontend/shadcn-ui/assets/ai-elements/queue.md +517 -0
  488. package/skills/frontend/shadcn-ui/assets/ai-elements/reasoning.md +349 -0
  489. package/skills/frontend/shadcn-ui/assets/ai-elements/sources.md +303 -0
  490. package/skills/frontend/shadcn-ui/assets/ai-elements/stack-trace.md +514 -0
  491. package/skills/frontend/shadcn-ui/assets/ai-elements/subagent.md +551 -0
  492. package/skills/frontend/shadcn-ui/assets/ai-elements/suggestion.md +246 -0
  493. package/skills/frontend/shadcn-ui/assets/ai-elements/task.md +380 -0
  494. package/skills/frontend/shadcn-ui/assets/ai-elements/terminal.md +463 -0
  495. package/skills/frontend/shadcn-ui/assets/ai-elements/test-results.md +641 -0
  496. package/skills/frontend/shadcn-ui/assets/ai-elements/tool.md +915 -0
  497. package/skills/frontend/shadcn-ui/assets/components/accordion.md +490 -0
  498. package/skills/frontend/shadcn-ui/assets/components/alert-dialog.md +520 -0
  499. package/skills/frontend/shadcn-ui/assets/components/alert.md +351 -0
  500. package/skills/frontend/shadcn-ui/assets/components/aspect-ratio.md +206 -0
  501. package/skills/frontend/shadcn-ui/assets/components/attachment.md +715 -0
  502. package/skills/frontend/shadcn-ui/assets/components/avatar.md +581 -0
  503. package/skills/frontend/shadcn-ui/assets/components/badge.md +276 -0
  504. package/skills/frontend/shadcn-ui/assets/components/breadcrumb.md +556 -0
  505. package/skills/frontend/shadcn-ui/assets/components/bubble.md +706 -0
  506. package/skills/frontend/shadcn-ui/assets/components/button-group.md +969 -0
  507. package/skills/frontend/shadcn-ui/assets/components/button.md +523 -0
  508. package/skills/frontend/shadcn-ui/assets/components/calendar.md +959 -0
  509. package/skills/frontend/shadcn-ui/assets/components/card.md +684 -0
  510. package/skills/frontend/shadcn-ui/assets/components/carousel.md +643 -0
  511. package/skills/frontend/shadcn-ui/assets/components/chart.md +1295 -0
  512. package/skills/frontend/shadcn-ui/assets/components/checkbox.md +553 -0
  513. package/skills/frontend/shadcn-ui/assets/components/code-block.md +2041 -0
  514. package/skills/frontend/shadcn-ui/assets/components/collapsible.md +504 -0
  515. package/skills/frontend/shadcn-ui/assets/components/combobox.md +1102 -0
  516. package/skills/frontend/shadcn-ui/assets/components/command.md +682 -0
  517. package/skills/frontend/shadcn-ui/assets/components/context-menu.md +949 -0
  518. package/skills/frontend/shadcn-ui/assets/components/data-table.md +1667 -0
  519. package/skills/frontend/shadcn-ui/assets/components/date-picker.md +698 -0
  520. package/skills/frontend/shadcn-ui/assets/components/dialog.md +454 -0
  521. package/skills/frontend/shadcn-ui/assets/components/direction.md +205 -0
  522. package/skills/frontend/shadcn-ui/assets/components/drawer.md +806 -0
  523. package/skills/frontend/shadcn-ui/assets/components/dropdown-menu.md +1315 -0
  524. package/skills/frontend/shadcn-ui/assets/components/empty.md +562 -0
  525. package/skills/frontend/shadcn-ui/assets/components/field.md +1321 -0
  526. package/skills/frontend/shadcn-ui/assets/components/hover-card.md +342 -0
  527. package/skills/frontend/shadcn-ui/assets/components/index.md +82 -0
  528. package/skills/frontend/shadcn-ui/assets/components/input-group.md +980 -0
  529. package/skills/frontend/shadcn-ui/assets/components/input-otp.md +551 -0
  530. package/skills/frontend/shadcn-ui/assets/components/input.md +555 -0
  531. package/skills/frontend/shadcn-ui/assets/components/item.md +937 -0
  532. package/skills/frontend/shadcn-ui/assets/components/kbd.md +290 -0
  533. package/skills/frontend/shadcn-ui/assets/components/label.md +327 -0
  534. package/skills/frontend/shadcn-ui/assets/components/marker.md +445 -0
  535. package/skills/frontend/shadcn-ui/assets/components/menubar.md +804 -0
  536. package/skills/frontend/shadcn-ui/assets/components/message-scroller.md +2770 -0
  537. package/skills/frontend/shadcn-ui/assets/components/message.md +618 -0
  538. package/skills/frontend/shadcn-ui/assets/components/native-select.md +321 -0
  539. package/skills/frontend/shadcn-ui/assets/components/navigation-menu.md +568 -0
  540. package/skills/frontend/shadcn-ui/assets/components/pagination.md +425 -0
  541. package/skills/frontend/shadcn-ui/assets/components/popover.md +402 -0
  542. package/skills/frontend/shadcn-ui/assets/components/progress.md +240 -0
  543. package/skills/frontend/shadcn-ui/assets/components/questionnaire.md +2055 -0
  544. package/skills/frontend/shadcn-ui/assets/components/radio-group.md +440 -0
  545. package/skills/frontend/shadcn-ui/assets/components/resizable.md +302 -0
  546. package/skills/frontend/shadcn-ui/assets/components/scroll-area.md +226 -0
  547. package/skills/frontend/shadcn-ui/assets/components/select.md +647 -0
  548. package/skills/frontend/shadcn-ui/assets/components/separator.md +235 -0
  549. package/skills/frontend/shadcn-ui/assets/components/sheet.md +354 -0
  550. package/skills/frontend/shadcn-ui/assets/components/sidebar.md +1156 -0
  551. package/skills/frontend/shadcn-ui/assets/components/skeleton.md +217 -0
  552. package/skills/frontend/shadcn-ui/assets/components/slider.md +253 -0
  553. package/skills/frontend/shadcn-ui/assets/components/spinner.md +352 -0
  554. package/skills/frontend/shadcn-ui/assets/components/switch.md +296 -0
  555. package/skills/frontend/shadcn-ui/assets/components/table.md +572 -0
  556. package/skills/frontend/shadcn-ui/assets/components/tabs.md +425 -0
  557. package/skills/frontend/shadcn-ui/assets/components/textarea.md +218 -0
  558. package/skills/frontend/shadcn-ui/assets/components/toast.md +260 -0
  559. package/skills/frontend/shadcn-ui/assets/components/toggle-group.md +419 -0
  560. package/skills/frontend/shadcn-ui/assets/components/toggle.md +220 -0
  561. package/skills/frontend/shadcn-ui/assets/components/tooltip.md +332 -0
  562. package/skills/frontend/shadcn-ui/assets/components/trace.md +1890 -0
  563. package/skills/frontend/shadcn-ui/assets/components/typography.md +561 -0
  564. package/skills/frontend/shadcn-ui/assets/dark-mode/next.md +108 -0
  565. package/skills/frontend/shadcn-ui/assets/dark-mode/overview.md +75 -0
  566. package/skills/frontend/shadcn-ui/assets/dark-mode/vite.md +144 -0
  567. package/skills/frontend/shadcn-ui/assets/forms/next.md +716 -0
  568. package/skills/frontend/shadcn-ui/assets/forms/overview.md +60 -0
  569. package/skills/frontend/shadcn-ui/assets/forms/react-hook-form.md +2055 -0
  570. package/skills/frontend/shadcn-ui/assets/forms/tanstack-form.md +2236 -0
  571. package/skills/frontend/shadcn-ui/assets/installation/astro.md +252 -0
  572. package/skills/frontend/shadcn-ui/assets/installation/manual.md +255 -0
  573. package/skills/frontend/shadcn-ui/assets/installation/next.md +256 -0
  574. package/skills/frontend/shadcn-ui/assets/installation/react-router.md +226 -0
  575. package/skills/frontend/shadcn-ui/assets/installation/remix.md +52 -0
  576. package/skills/frontend/shadcn-ui/assets/installation/vite.md +314 -0
  577. package/skills/frontend/shadcn-ui/assets/mcp/mcp.md +338 -0
  578. package/skills/frontend/shadcn-ui/assets/overview/changelog.md +6 -0
  579. package/skills/frontend/shadcn-ui/assets/overview/cli.md +738 -0
  580. package/skills/frontend/shadcn-ui/assets/overview/components-json.md +379 -0
  581. package/skills/frontend/shadcn-ui/assets/overview/directory.md +74 -0
  582. package/skills/frontend/shadcn-ui/assets/overview/introduction.md +77 -0
  583. package/skills/frontend/shadcn-ui/assets/overview/skills.md +71 -0
  584. package/skills/frontend/shadcn-ui/assets/overview/theming.md +304 -0
  585. package/skills/frontend/shadcn-ui/assets/overview/typeset.md +242 -0
  586. package/skills/frontend/shadcn-ui/assets/registry/getting-started.md +648 -0
  587. package/skills/frontend/shadcn-ui/assets/registry/overview.md +90 -0
  588. package/skills/frontend/shadcn-ui/assets/registry/registry-item-json.md +483 -0
  589. package/skills/frontend/shadcn-ui/assets/registry/registry-json.md +178 -0
  590. package/skills/frontend/shadcn-ui/evals/componentVerification.json +19 -0
  591. package/skills/frontend/shadcn-ui/references/aiComponentsCatalog.md +51 -0
  592. package/skills/frontend/shadcn-ui/references/apiReference.md +3 -0
  593. package/skills/frontend/shadcn-ui/references/blocksCatalog.md +32 -0
  594. package/skills/frontend/shadcn-ui/references/cliCommands.md +47 -0
  595. package/skills/frontend/shadcn-ui/references/componentMarkdownSources.md +48 -0
  596. package/skills/frontend/shadcn-ui/scripts/fetchComponentDocs.py +43 -0
  597. package/skills/frontend/tsxReactStandard/SKILL.md +150 -0
  598. package/skills/frontend/tsxReactStandard/evals/tsxVerification.json +14 -0
  599. package/skills/frontend/tsxReactStandard/references/apiReference.md +3 -0
  600. package/skills/frontend/tsxReactStandard/references/discriminatedUnions.md +31 -0
  601. package/skills/frontend/tsxReactStandard/references/tsconfigStrict.md +36 -0
  602. package/skills/frontend/tsxReactStandard/scripts/validateTsxTypes.py +44 -0
  603. package/skills/gitVersionControl/gitWorkflow/SKILL.md +128 -0
  604. package/skills/gitVersionControl/gitWorkflow/assets/README.md +23 -0
  605. package/skills/gitVersionControl/gitWorkflow/assets/cli/gh-environment.md +87 -0
  606. package/skills/gitVersionControl/gitWorkflow/assets/cli/gh-formatting.md +156 -0
  607. package/skills/gitVersionControl/gitWorkflow/assets/cli/gh-reference.md +2363 -0
  608. package/skills/gitVersionControl/gitWorkflow/assets/using-git/about-git.md +156 -0
  609. package/skills/gitVersionControl/gitWorkflow/assets/using-git/about-remote-repositories.md +65 -0
  610. package/skills/gitVersionControl/gitWorkflow/assets/using-git/associating-text-editors-with-git.md +93 -0
  611. package/skills/gitVersionControl/gitWorkflow/assets/using-git/caching-your-github-credentials.md +115 -0
  612. package/skills/gitVersionControl/gitWorkflow/assets/using-git/getting-changes-from-a-remote-repository.md +76 -0
  613. package/skills/gitVersionControl/gitWorkflow/assets/using-git/ignoring-files.md +51 -0
  614. package/skills/gitVersionControl/gitWorkflow/assets/using-git/managing-remote-repositories.md +231 -0
  615. package/skills/gitVersionControl/gitWorkflow/assets/using-git/pushing-commits-to-a-remote-repository.md +119 -0
  616. package/skills/gitVersionControl/gitWorkflow/evals/evalGitWorkflow.py +43 -0
  617. package/skills/gitVersionControl/gitWorkflow/references/apiReference.md +3 -0
  618. package/skills/gitVersionControl/gitWorkflow/references/branchingModels.md +32 -0
  619. package/skills/gitVersionControl/gitWorkflow/scripts/diagnoseGitGraph.py +68 -0
  620. package/skills/github/assets/README.md +39 -0
  621. package/skills/github/assets/cli/gh-environment.md +87 -0
  622. package/skills/github/assets/cli/gh-formatting.md +156 -0
  623. package/skills/github/assets/cli/gh-reference.md +2363 -0
  624. package/skills/github/assets/docs-api/github-docs-api.md +60 -0
  625. package/skills/github/assets/rest-api/actions-secrets.md +1272 -0
  626. package/skills/github/assets/rest-api/actions-variables.md +1247 -0
  627. package/skills/github/assets/rest-api/actions-workflow-runs.md +1697 -0
  628. package/skills/github/assets/rest-api/actions-workflows.md +348 -0
  629. package/skills/github/assets/rest-api/authenticating.md +174 -0
  630. package/skills/github/assets/rest-api/branches.md +727 -0
  631. package/skills/github/assets/rest-api/checks-runs.md +1013 -0
  632. package/skills/github/assets/rest-api/checks-suites.md +1142 -0
  633. package/skills/github/assets/rest-api/code-scanning.md +2957 -0
  634. package/skills/github/assets/rest-api/collaborators.md +547 -0
  635. package/skills/github/assets/rest-api/commits.md +957 -0
  636. package/skills/github/assets/rest-api/dependabot-alerts.md +895 -0
  637. package/skills/github/assets/rest-api/orgs.md +1172 -0
  638. package/skills/github/assets/rest-api/overview.md +875 -0
  639. package/skills/github/assets/rest-api/pull-reviews.md +722 -0
  640. package/skills/github/assets/rest-api/pulls.md +1605 -0
  641. package/skills/github/assets/rest-api/quickstart.md +344 -0
  642. package/skills/github/assets/rest-api/releases.md +650 -0
  643. package/skills/github/assets/rest-api/repos.md +2957 -0
  644. package/skills/github/assets/rest-api/rules.md +1507 -0
  645. package/skills/github/assets/rest-api/secret-scanning.md +947 -0
  646. package/skills/github/assets/rest-api/teams.md +1690 -0
  647. package/skills/github/githubAction/SKILL.md +159 -0
  648. package/skills/github/githubAction/assets/README.md +38 -0
  649. package/skills/github/githubAction/assets/reference/contexts.md +918 -0
  650. package/skills/github/githubAction/assets/reference/dependency-caching.md +393 -0
  651. package/skills/github/githubAction/assets/reference/events-that-trigger-workflows.md +1348 -0
  652. package/skills/github/githubAction/assets/reference/expressions.md +441 -0
  653. package/skills/github/githubAction/assets/reference/metadata-syntax.md +803 -0
  654. package/skills/github/githubAction/assets/reference/variables.md +149 -0
  655. package/skills/github/githubAction/assets/reference/workflow-cancellation.md +22 -0
  656. package/skills/github/githubAction/assets/reference/workflow-commands.md +1056 -0
  657. package/skills/github/githubAction/assets/reference/workflow-syntax.md +1721 -0
  658. package/skills/github/githubAction/assets/rest-api/secrets.md +1272 -0
  659. package/skills/github/githubAction/assets/rest-api/workflow-runs.md +1697 -0
  660. package/skills/github/githubAction/assets/rest-api/workflows.md +348 -0
  661. package/skills/github/githubAction/assets/starter-workflows/automation/stale.yml +27 -0
  662. package/skills/github/githubAction/assets/starter-workflows/ci/blank.yml +36 -0
  663. package/skills/github/githubAction/assets/starter-workflows/ci/docker-image.yml +18 -0
  664. package/skills/github/githubAction/assets/starter-workflows/ci/go.yml +28 -0
  665. package/skills/github/githubAction/assets/starter-workflows/ci/maven.yml +35 -0
  666. package/skills/github/githubAction/assets/starter-workflows/ci/node.js.yml +31 -0
  667. package/skills/github/githubAction/assets/starter-workflows/ci/python-app.yml +39 -0
  668. package/skills/github/githubAction/assets/starter-workflows/ci/rust.yml +22 -0
  669. package/skills/github/githubAction/assets/starter-workflows/code-scanning/codeql.yml +97 -0
  670. package/skills/github/githubAction/evals/actionVerification.json +14 -0
  671. package/skills/github/githubAction/references/apiReference.md +3 -0
  672. package/skills/github/githubAction/references/workflowPatterns.md +81 -0
  673. package/skills/github/githubAction/scripts/validateWorkflowYaml.py +53 -0
  674. package/skills/github/githubQuality/SKILL.md +136 -0
  675. package/skills/github/githubQuality/assets/README.md +24 -0
  676. package/skills/github/githubQuality/assets/pull-requests/about-code-owners.md +178 -0
  677. package/skills/github/githubQuality/assets/pull-requests/about-merge-methods.md +48 -0
  678. package/skills/github/githubQuality/assets/pull-requests/creating-a-pull-request.md +170 -0
  679. package/skills/github/githubQuality/assets/pull-requests/giving-reviews.md +48 -0
  680. package/skills/github/githubQuality/assets/pull-requests/managing-a-merge-queue.md +134 -0
  681. package/skills/github/githubQuality/assets/pull-requests/merging-a-pull-request.md +101 -0
  682. package/skills/github/githubQuality/assets/pull-requests/resolving-reviews.md +59 -0
  683. package/skills/github/githubQuality/assets/pull-requests/status-checks.md +135 -0
  684. package/skills/github/githubQuality/assets/rest-api/checks-runs.md +1013 -0
  685. package/skills/github/githubQuality/assets/rest-api/checks-suites.md +1142 -0
  686. package/skills/github/githubQuality/assets/rest-api/commits.md +957 -0
  687. package/skills/github/githubQuality/assets/rest-api/pulls.md +1605 -0
  688. package/skills/github/githubQuality/assets/rest-api/reviews.md +722 -0
  689. package/skills/github/githubQuality/evals/qualityVerification.json +14 -0
  690. package/skills/github/githubQuality/references/apiReference.md +3 -0
  691. package/skills/github/githubQuality/references/codeownersExample.md +26 -0
  692. package/skills/github/githubQuality/references/prTemplate.md +20 -0
  693. package/skills/github/githubQuality/scripts/auditPrQuality.py +52 -0
  694. package/skills/github/githubSecurity/SKILL.md +170 -0
  695. package/skills/github/githubSecurity/assets/README.md +32 -0
  696. package/skills/github/githubSecurity/assets/code-scanning/code-scanning-alerts.md +133 -0
  697. package/skills/github/githubSecurity/assets/code-scanning/code-scanning.md +67 -0
  698. package/skills/github/githubSecurity/assets/code-scanning/codeql-code-scanning.md +79 -0
  699. package/skills/github/githubSecurity/assets/code-scanning/configure-code-scanning.md +121 -0
  700. package/skills/github/githubSecurity/assets/dependabot/about-the-dependabot-yml-file.md +74 -0
  701. package/skills/github/githubSecurity/assets/dependabot/dependabot-alerts.md +133 -0
  702. package/skills/github/githubSecurity/assets/dependabot/dependabot-security-updates.md +95 -0
  703. package/skills/github/githubSecurity/assets/dependabot/dependabot-version-updates.md +80 -0
  704. package/skills/github/githubSecurity/assets/rest-api/code-scanning.md +2957 -0
  705. package/skills/github/githubSecurity/assets/rest-api/dependabot-alerts.md +895 -0
  706. package/skills/github/githubSecurity/assets/rest-api/secret-scanning.md +947 -0
  707. package/skills/github/githubSecurity/assets/secret-scanning/enable-secret-scanning.md +59 -0
  708. package/skills/github/githubSecurity/assets/secret-scanning/secret-scanning.md +105 -0
  709. package/skills/github/githubSecurity/assets/security-advisories/github-advisory-database.md +148 -0
  710. package/skills/github/githubSecurity/evals/securityVerification.json +14 -0
  711. package/skills/github/githubSecurity/references/apiReference.md +3 -0
  712. package/skills/github/githubSecurity/references/codeqlAnalysis.yml +42 -0
  713. package/skills/github/githubSecurity/references/dependabotConfig.yml +27 -0
  714. package/skills/github/githubSecurity/scripts/auditRepoSecurity.py +47 -0
  715. package/skills/github/githubSetup/SKILL.md +137 -0
  716. package/skills/github/githubSetup/assets/README.md +40 -0
  717. package/skills/github/githubSetup/assets/branches/about-protected-branches.md +198 -0
  718. package/skills/github/githubSetup/assets/branches/changing-the-default-branch.md +49 -0
  719. package/skills/github/githubSetup/assets/branches/deleting-and-restoring-branches.md +44 -0
  720. package/skills/github/githubSetup/assets/branches/managing-a-branch-protection-rule.md +115 -0
  721. package/skills/github/githubSetup/assets/branches/renaming-a-branch.md +74 -0
  722. package/skills/github/githubSetup/assets/branches/viewing-branches-in-your-repository.md +30 -0
  723. package/skills/github/githubSetup/assets/repositories/about-repositories.md +127 -0
  724. package/skills/github/githubSetup/assets/repositories/cloning-a-repository.md +114 -0
  725. package/skills/github/githubSetup/assets/repositories/creating-a-new-repository.md +82 -0
  726. package/skills/github/githubSetup/assets/repositories/creating-a-repository-from-a-template.md +51 -0
  727. package/skills/github/githubSetup/assets/repositories/deleting-a-repository.md +34 -0
  728. package/skills/github/githubSetup/assets/repositories/managing-teams-and-people-with-access.md +69 -0
  729. package/skills/github/githubSetup/assets/repositories/renaming-a-repository.md +47 -0
  730. package/skills/github/githubSetup/assets/repositories/restoring-a-deleted-repository.md +61 -0
  731. package/skills/github/githubSetup/assets/repositories/setting-repository-visibility.md +137 -0
  732. package/skills/github/githubSetup/assets/rest-api/branches.md +727 -0
  733. package/skills/github/githubSetup/assets/rest-api/quickstart.md +344 -0
  734. package/skills/github/githubSetup/assets/rest-api/repos.md +2957 -0
  735. package/skills/github/githubSetup/assets/rulesets/about-rulesets.md +72 -0
  736. package/skills/github/githubSetup/assets/rulesets/available-rules-for-rulesets.md +383 -0
  737. package/skills/github/githubSetup/assets/rulesets/converting-branch-protections-to-rulesets.md +92 -0
  738. package/skills/github/githubSetup/assets/rulesets/creating-rulesets-for-a-repository.md +108 -0
  739. package/skills/github/githubSetup/assets/rulesets/managing-rulesets-for-a-repository.md +149 -0
  740. package/skills/github/githubSetup/assets/rulesets/troubleshooting-rules.md +122 -0
  741. package/skills/github/githubSetup/evals/setupVerification.json +14 -0
  742. package/skills/github/githubSetup/references/apiReference.md +3 -0
  743. package/skills/github/githubSetup/references/repoSettingsBlueprint.md +13 -0
  744. package/skills/github/githubSetup/references/rulesetTemplates.json +42 -0
  745. package/skills/github/githubSetup/scripts/configureRepoBaseline.py +46 -0
  746. package/skills/github/githubTeam/SKILL.md +115 -0
  747. package/skills/github/githubTeam/assets/README.md +21 -0
  748. package/skills/github/githubTeam/assets/organizations/about-organizations.md +69 -0
  749. package/skills/github/githubTeam/assets/organizations/repository-roles-for-an-organization.md +94 -0
  750. package/skills/github/githubTeam/assets/rest-api/collaborators.md +547 -0
  751. package/skills/github/githubTeam/assets/rest-api/orgs.md +1172 -0
  752. package/skills/github/githubTeam/assets/rest-api/teams.md +1690 -0
  753. package/skills/github/githubTeam/assets/teams/about-teams.md +82 -0
  754. package/skills/github/githubTeam/assets/teams/adding-members-to-a-team.md +55 -0
  755. package/skills/github/githubTeam/evals/teamVerification.json +14 -0
  756. package/skills/github/githubTeam/references/apiReference.md +3 -0
  757. package/skills/github/githubTeam/references/permissionMatrix.md +17 -0
  758. package/skills/github/githubTeam/references/reviewAssignment.md +17 -0
  759. package/skills/github/githubTeam/scripts/manageTeamSync.py +31 -0
  760. package/skills/securityQa/llmSecurityRedteaming/SKILL.md +86 -0
  761. package/skills/securityQa/llmSecurityRedteaming/evals/securityRedteamVerification.json +14 -0
  762. package/skills/securityQa/llmSecurityRedteaming/references/apiReference.md +3 -0
  763. package/skills/securityQa/llmSecurityRedteaming/references/jailbreakTaxonomy.md +6 -0
  764. package/skills/securityQa/llmSecurityRedteaming/references/owaspLlmTopTen.md +12 -0
  765. package/skills/securityQa/llmSecurityRedteaming/scripts/testPromptInjection.py +34 -0
  766. package/skills/softwareDevelopment/requirementsEngineering/SKILL.md +110 -0
  767. package/skills/softwareDevelopment/requirementsEngineering/evals/evalRequirements.py +33 -0
  768. package/skills/softwareDevelopment/requirementsEngineering/references/apiReference.md +3 -0
  769. package/skills/softwareDevelopment/requirementsEngineering/references/requirementsAnalysisModels.md +34 -0
  770. package/skills/softwareDevelopment/requirementsEngineering/scripts/validateUserStories.py +49 -0
  771. package/skills/testing/testDrivenDevelopment/SKILL.md +122 -0
  772. package/skills/testing/testDrivenDevelopment/evals/evalTdd.py +25 -0
  773. package/skills/testing/testDrivenDevelopment/references/apiReference.md +3 -0
  774. package/skills/testing/testDrivenDevelopment/references/testPyramidDoubles.md +35 -0
  775. package/skills/testing/testDrivenDevelopment/scripts/auditTestPyramid.py +58 -0
@@ -0,0 +1,3144 @@
1
+ ---
2
+ # NOTE: This file is auto-generated from 'scripts/docgen.mjs'
3
+ # Do not make edits to it directly, they will be overwritten.
4
+ # Instead, change this file: https://github.com/withastro/astro/blob/main/packages/astro/src/types/public/config.ts
5
+ # Translators, please remove this note and the <DontEditWarning/> component.
6
+
7
+ title: Configuration Reference
8
+ i18nReady: true
9
+ githubURL: https://github.com/withastro/astro/blob/main/packages/astro/src/types/public/config.ts
10
+ ---
11
+
12
+ import Since from '~/components/Since.astro'
13
+ import DontEditWarning from '~/components/DontEditWarning.astro'
14
+
15
+ <DontEditWarning />
16
+
17
+ The following reference covers all supported configuration options in Astro. To learn more about configuring Astro, read our guide on [Configuring Astro](/en/guides/configuring-astro/).
18
+
19
+ ```js
20
+ // astro.config.mjs
21
+ import { defineConfig } from 'astro/config'
22
+
23
+ export default defineConfig({
24
+ // your configuration options here...
25
+ })
26
+ ```
27
+ ## Top-Level Options
28
+
29
+
30
+ ### site
31
+
32
+ <p>
33
+
34
+ **Type:** `string`
35
+ </p>
36
+
37
+ Your final, deployed URL. Astro uses this full URL to generate your sitemap and canonical URLs in your final build. It is strongly recommended that you set this configuration to get the most out of Astro.
38
+
39
+ ```js
40
+ // astro.config.mjs
41
+ import { defineConfig } from 'astro/config';
42
+
43
+ export default defineConfig({
44
+ site: 'https://www.my-site.dev'
45
+ });
46
+ ```
47
+
48
+ ### base
49
+
50
+ <p>
51
+
52
+ **Type:** `string`
53
+ </p>
54
+
55
+ The base path to deploy to. Astro will use this path as the root for your pages and assets both in development and in production build.
56
+
57
+ In the example below, `astro dev` will start your server at `/docs`.
58
+
59
+ ```js
60
+ // astro.config.mjs
61
+ import { defineConfig } from 'astro/config';
62
+
63
+ export default defineConfig({
64
+ base: '/docs'
65
+ });
66
+ ```
67
+
68
+ When using this option, all of your static asset imports and URLs should add the base as a prefix. You can access this value via `import.meta.env.BASE_URL`.
69
+
70
+ The value of `import.meta.env.BASE_URL` will be determined by your `trailingSlash` config, no matter what value you have set for `base`.
71
+
72
+ A trailing slash is always included if `trailingSlash: "always"` is set. If `trailingSlash: "never"` is set, `BASE_URL` will not include a trailing slash, even if `base` includes one.
73
+
74
+ Additionally, Astro will internally manipulate the configured value of `config.base` before making it available to integrations. The value of `config.base` as read by integrations will also be determined by your `trailingSlash` configuration in the same way.
75
+
76
+ In the example below, the values of `import.meta.env.BASE_URL` and `config.base` when processed will both be `/docs`:
77
+ ```js
78
+ // astro.config.mjs
79
+ import { defineConfig } from 'astro/config';
80
+
81
+ export default defineConfig({
82
+ base: '/docs/',
83
+ trailingSlash: "never"
84
+ });
85
+ ```
86
+
87
+ In the example below, the values of `import.meta.env.BASE_URL` and `config.base` when processed will both be `/docs/`:
88
+
89
+ ```js
90
+ // astro.config.mjs
91
+ import { defineConfig } from 'astro/config';
92
+
93
+ export default defineConfig({
94
+ base: '/docs',
95
+ trailingSlash: "always"
96
+ });
97
+ ```
98
+
99
+ ### trailingSlash
100
+
101
+ <p>
102
+
103
+ **Type:** `'always' | 'never' | 'ignore'`<br />
104
+ **Default:** `'ignore'`
105
+ </p>
106
+
107
+ Set the route matching behavior for trailing slashes in the dev server and on-demand rendered pages. Choose from the following options:
108
+ - `'ignore'` - Match URLs regardless of whether a trailing "/" exists. Requests for "/about" and "/about/" will both match the same route.
109
+ - `'always'` - Only match URLs that include a trailing slash (e.g: "/about/"). In production, requests for on-demand rendered URLs without a trailing slash will be redirected to the correct URL for your convenience. However, in development, they will display a warning page reminding you that you have `always` configured.
110
+ - `'never'` - Only match URLs that do not include a trailing slash (e.g: "/about"). In production, requests for on-demand rendered URLs with a trailing slash will be redirected to the correct URL for your convenience. However, in development, they will display a warning page reminding you that you have `never` configured.
111
+
112
+ When redirects occur in production for GET requests, the redirect will be a 301 (permanent) redirect. For all other request methods, it will be a 308 (permanent, and preserve the request method) redirect.
113
+
114
+ Trailing slashes on prerendered pages are handled by the hosting platform, and may not respect your chosen configuration.
115
+ See your hosting platform's documentation for more information. You cannot use Astro [redirects](#redirects) for this use case at this point.
116
+
117
+ ```js
118
+ // astro.config.mjs
119
+ import { defineConfig } from 'astro/config';
120
+
121
+ export default defineConfig({
122
+ // Example: Require a trailing slash during development
123
+ trailingSlash: 'always'
124
+ });
125
+ ```
126
+ **See Also:**
127
+ - build.format
128
+
129
+ ### redirects
130
+
131
+ <p>
132
+
133
+ **Type:** `Record<string, RedirectConfig>`<br />
134
+ **Default:** `{}`<br />
135
+ <Since v="2.9.0" />
136
+ </p>
137
+
138
+ Specify a mapping of redirects where the key is the route to match
139
+ and the value is the path to redirect to.
140
+
141
+ You can redirect both static and dynamic routes, but only to the same kind of route.
142
+ For example, you cannot have a `'/article': '/blog/[...slug]'` redirect.
143
+
144
+
145
+ ```js
146
+ // astro.config.mjs
147
+ import { defineConfig } from 'astro/config';
148
+
149
+ export default defineConfig({
150
+ redirects: {
151
+ '/old': '/new',
152
+ '/blog/[...slug]': '/articles/[...slug]',
153
+ '/about': 'https://example.com/about',
154
+ '/news': {
155
+ status: 302,
156
+ destination: 'https://example.com/news'
157
+ },
158
+ // '/product1/', '/product1' // Note, this is not supported
159
+ }
160
+ });
161
+ ```
162
+
163
+
164
+ For statically-generated sites with no adapter installed, this will produce a client redirect using a [`<meta http-equiv="refresh">` tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#http-equiv) and does not support status codes.
165
+
166
+ When using SSR or with a static adapter in `output: static`
167
+ mode, status codes are supported.
168
+ Astro will serve redirected GET requests with a status of `301`
169
+ and use a status of `308` for any other request method.
170
+
171
+ You can customize the [redirection status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#redirection_messages) using an object in the redirect config:
172
+
173
+ ```js
174
+ // astro.config.mjs
175
+ import { defineConfig } from 'astro/config';
176
+
177
+ export default defineConfig({
178
+ redirects: {
179
+ '/other': {
180
+ status: 302,
181
+ destination: '/place',
182
+ },
183
+ }
184
+ });
185
+ ```
186
+
187
+ ### output
188
+
189
+ <p>
190
+
191
+ **Type:** `'static' | 'server'`<br />
192
+ **Default:** `'static'`
193
+ </p>
194
+
195
+ Specifies the output target for builds.
196
+
197
+ - `'static'` - Prerender all your pages by default, outputting a completely static site if none of your pages opt out of prerendering.
198
+ - `'server'` - Use server-side rendering (SSR) for all pages by default, always outputting a server-rendered site.
199
+
200
+ ```js
201
+ // astro.config.mjs
202
+ import { defineConfig } from 'astro/config';
203
+
204
+ export default defineConfig({
205
+ output: 'static'
206
+ });
207
+ ```
208
+ **See Also:**
209
+ - adapter
210
+
211
+ ### adapter
212
+
213
+ <p>
214
+
215
+ **Type:** `AstroIntegration`
216
+ </p>
217
+
218
+ Deploy to your favorite server, serverless, or edge host with build adapters. Import one of our first-party adapters ([Cloudflare](/en/guides/integrations-guide/cloudflare/), [Netlify](/en/guides/integrations-guide/netlify/), [Node.js](/en/guides/integrations-guide/node/), [Vercel](/en/guides/integrations-guide/vercel/)) or explore [community adapters](https://astro.build/integrations/2/?search=&categories%5B%5D=adapters) to enable on-demand rendering in your Astro project.
219
+
220
+ See our [on-demand rendering guide](/en/guides/on-demand-rendering/) for more on Astro's server rendering options.
221
+
222
+ ```js
223
+ // astro.config.mjs
224
+ import { defineConfig } from 'astro/config';
225
+ import netlify from '@astrojs/netlify';
226
+
227
+ export default defineConfig({
228
+ // Example: Build for Netlify serverless deployment
229
+ adapter: netlify(),
230
+ });
231
+ ```
232
+ **See Also:**
233
+ - output
234
+
235
+ ### integrations
236
+
237
+ <p>
238
+
239
+ **Type:** `AstroIntegration[]`
240
+ </p>
241
+
242
+ Extend Astro with custom integrations. Integrations are your one-stop-shop for adding framework support (like Solid.js), new features (like sitemaps), and new libraries (like Partytown).
243
+
244
+ Read our [Integrations Guide](/en/guides/integrations/) for help getting started with Astro Integrations.
245
+
246
+ ```js
247
+ // astro.config.mjs
248
+ import { defineConfig } from 'astro/config';
249
+ import react from '@astrojs/react';
250
+ import mdx from '@astrojs/mdx';
251
+
252
+ export default defineConfig({
253
+ // Example: Add React + MDX support to Astro
254
+ integrations: [react(), mdx()]
255
+ });
256
+ ```
257
+
258
+ ### root
259
+
260
+ <p>
261
+
262
+ **Type:** `string`<br />
263
+ **CLI:** `--root`<br />
264
+ **Default:** `"."` (current working directory)
265
+ </p>
266
+
267
+ You should only provide this option if you run the `astro` CLI commands in a directory other than the project root directory. Usually, this option is provided via the CLI instead of the Astro config file, since Astro needs to know your project root before it can locate your config file.
268
+
269
+ If you provide a relative path (ex: `--root: './my-project'`) Astro will resolve it against your current working directory.
270
+
271
+ ```js
272
+ // astro.config.mjs
273
+ import { defineConfig } from 'astro/config';
274
+
275
+ export default defineConfig({
276
+ root: './my-project-directory'
277
+ });
278
+ ```
279
+
280
+ The following example sets the root directory using the CLI:
281
+
282
+ ```bash
283
+ astro build --root ./my-project-directory
284
+ ```
285
+
286
+ ### srcDir
287
+
288
+ <p>
289
+
290
+ **Type:** `string`<br />
291
+ **Default:** `"./src"`
292
+ </p>
293
+
294
+ Set the directory that Astro will read your site from.
295
+
296
+ The value can be either an absolute file system path or a path relative to the project root.
297
+
298
+ ```js
299
+ // astro.config.mjs
300
+ import { defineConfig } from 'astro/config';
301
+
302
+ export default defineConfig({
303
+ srcDir: './www'
304
+ });
305
+ ```
306
+
307
+ ### publicDir
308
+
309
+ <p>
310
+
311
+ **Type:** `string`<br />
312
+ **Default:** `"./public"`
313
+ </p>
314
+
315
+ Set the directory for your static assets. Files in this directory are served at `/` during dev and copied to your build directory during build. These files are always served or copied as-is, without transform or bundling.
316
+
317
+ The value can be either an absolute file system path or a path relative to the project root.
318
+
319
+ ```js
320
+ // astro.config.mjs
321
+ import { defineConfig } from 'astro/config';
322
+
323
+ export default defineConfig({
324
+ publicDir: './my-custom-publicDir-directory'
325
+ });
326
+ ```
327
+
328
+ ### outDir
329
+
330
+ <p>
331
+
332
+ **Type:** `string`<br />
333
+ **Default:** `"./dist"`
334
+ </p>
335
+
336
+ Set the directory that `astro build` writes your final build to.
337
+
338
+ The value can be either an absolute file system path or a path relative to the project root.
339
+
340
+ ```js
341
+ // astro.config.mjs
342
+ import { defineConfig } from 'astro/config';
343
+
344
+ export default defineConfig({
345
+ outDir: './my-custom-build-directory'
346
+ });
347
+ ```
348
+ **See Also:**
349
+ - build.server
350
+
351
+ ### cacheDir
352
+
353
+ <p>
354
+
355
+ **Type:** `string`<br />
356
+ **Default:** `"./node_modules/.astro"`
357
+ </p>
358
+
359
+ Set the directory for caching build artifacts. Files in this directory will be used in subsequent builds to speed up the build time.
360
+
361
+ The value can be either an absolute file system path or a path relative to the project root.
362
+
363
+ ```js
364
+ // astro.config.mjs
365
+ import { defineConfig } from 'astro/config';
366
+
367
+ export default defineConfig({
368
+ cacheDir: './my-custom-cache-directory'
369
+ });
370
+ ```
371
+
372
+ ### compressHTML
373
+
374
+ <p>
375
+
376
+ **Type:** `boolean | "jsx"`<br />
377
+ **Default:** `'jsx'`
378
+ </p>
379
+
380
+ Controls how Astro handles whitespace in your HTML. This affects both development mode and the final build output.
381
+
382
+ Since v7.0, Astro applies by default the JSX whitespace rules used by frameworks like React. This removes whitespace and line breaks around elements, collapses multi-line text onto a single line, and preserves whitespace within a single line (e.g. a space between two inline elements). To keep a space that would otherwise be removed, include it explicitly in the source through constructs such as `{" "}`.
383
+
384
+ Setting this option to `true` instead removes whitespace, including line breaks, in a lossless manner from `.astro` components. Some whitespace may be preserved as needed to maintain the visual rendering of your HTML.
385
+
386
+ Setting this option to `false` disables HTML compression and preserves all whitespace.
387
+
388
+ ```js
389
+ // astro.config.mjs
390
+ import { defineConfig } from 'astro/config';
391
+
392
+ export default defineConfig({
393
+ compressHTML: true
394
+ // or:
395
+ // compressHTML: false
396
+ });
397
+ ```
398
+
399
+ ### scopedStyleStrategy
400
+
401
+ <p>
402
+
403
+ **Type:** `'where' | 'class' | 'attribute'`<br />
404
+ **Default:** `'attribute'`<br />
405
+ <Since v="2.4" />
406
+ </p>
407
+
408
+ Specify the strategy used for scoping styles within Astro components. Choose from:
409
+ - `'where'` - Use `:where` selectors, causing no specificity increase.
410
+ - `'class'` - Use class-based selectors, causing a +1 specificity increase.
411
+ - `'attribute'` - Use `data-` attributes, causing a +1 specificity increase.
412
+
413
+ Using `'class'` is helpful when you want to ensure that element selectors within an Astro component override global style defaults (e.g. from a global stylesheet).
414
+ Using `'where'` gives you more control over specificity, but requires that you use higher-specificity selectors, layers, and other tools to control which selectors are applied.
415
+ Using `'attribute'` is useful when you are manipulating the `class` attribute of elements and need to avoid conflicts between your own styling logic and Astro's application of styles.
416
+
417
+ ### prerenderConflictBehavior
418
+
419
+ <p>
420
+
421
+ **Type:** `'error' | 'warn' | 'ignore'`<br />
422
+ **Default:** `'warn'`<br />
423
+ <Since v="6.0" />
424
+ </p>
425
+
426
+ Determines the default behavior when two routes generate the same prerendered URL:
427
+ - `error`: fail the build and display an error, forcing you to resolve the conflict
428
+ - `warn` (default): log a warning when conflicts occur, but build using the highest-priority route
429
+ - `ignore`: silently build using the highest-priority route when conflicts occur
430
+
431
+ ```js
432
+ // astro.config.mjs
433
+ import { defineConfig } from 'astro/config';
434
+
435
+ export default defineConfig({
436
+ prerenderConflictBehavior: 'error'
437
+ });
438
+ ```
439
+
440
+ ### vite
441
+
442
+ <p>
443
+
444
+ **Type:** `ViteUserConfig`
445
+ </p>
446
+
447
+ Pass additional configuration options to Vite. Useful when Astro doesn't support some advanced configuration that you may need.
448
+
449
+ View the full `vite` configuration object documentation on [vite.dev](https://vite.dev/config/).
450
+
451
+ #### Examples
452
+
453
+ ```js
454
+ // astro.config.mjs
455
+ import { defineConfig } from 'astro/config';
456
+
457
+ export default defineConfig({
458
+ vite: {
459
+ ssr: {
460
+ // Example: Force a broken package to skip SSR processing, if needed
461
+ external: ['broken-npm-package'],
462
+ }
463
+ }
464
+ });
465
+ ```
466
+
467
+ ```js
468
+ // astro.config.mjs
469
+ import { defineConfig } from 'astro/config';
470
+
471
+ export default defineConfig({
472
+ vite: {
473
+ // Example: Add custom vite plugins directly to your Astro project
474
+ plugins: [myPlugin()],
475
+ }
476
+ });
477
+ ```
478
+
479
+ ### security
480
+
481
+ <p>
482
+
483
+ **Type:** `Record<"checkOrigin", boolean> | undefined`<br />
484
+ **Default:** `{checkOrigin: true}`<br />
485
+ <Since v="4.9.0" />
486
+ </p>
487
+
488
+ Enables security measures for an Astro website.
489
+
490
+ These features only exist for pages rendered on demand (SSR) using `server` mode or pages that opt out of prerendering in `static` mode.
491
+
492
+ By default, Astro checks browser request metadata to ensure that form submissions
493
+ to on-demand rendered pages come from the same origin. To disable this
494
+ behavior set `checkOrigin` to `false`:
495
+
496
+ ```js
497
+ // astro.config.mjs
498
+ import { defineConfig } from 'astro/config';
499
+
500
+ export default defineConfig({
501
+ output: "server",
502
+ security: {
503
+ checkOrigin: false
504
+ }
505
+ });
506
+ ```
507
+
508
+ #### security.checkOrigin
509
+
510
+ <p>
511
+
512
+ **Type:** `boolean`<br />
513
+ **Default:** `true`<br />
514
+ <Since v="4.9.0" />
515
+ </p>
516
+
517
+ Provides [Cross-Site Request Forgery (CSRF)](https://developer.mozilla.org/en-US/docs/Web/Security/Attacks/CSRF) protection by checking the header sent by browsers against the `Request` URL. This uses the `Sec-Fetch-Site` header for modern browsers and falls back to the `Origin` header when unavailable.
518
+
519
+ The check is executed only for pages rendered on demand, and only for unsafe requests such as `POST`, `PATCH`, `DELETE`, and `PUT` with no `content-type` header or one of the following values: `'application/x-www-form-urlencoded'`, `'multipart/form-data'`, `'text/plain'`.
520
+
521
+
522
+ If the request is identified as cross-origin, Astro will return a 403 status code and will not render the page.
523
+
524
+ #### security.allowedDomains
525
+
526
+ <p>
527
+
528
+ **Type:** `Array<RemotePattern>`<br />
529
+ **Default:** `[]`<br />
530
+ <Since v="5.14.2" />
531
+ </p>
532
+
533
+ Defines a list of permitted host patterns for incoming requests when using SSR. When configured, Astro will validate the `X-Forwarded-Host` header
534
+ against these patterns for security. If the header doesn't match any allowed pattern, the header is ignored and the request's original host is used instead.
535
+
536
+ This prevents host header injection attacks where malicious actors can manipulate the `Astro.url` value by sending crafted `X-Forwarded-Host` headers.
537
+
538
+ Each pattern can specify `protocol`, `hostname`, and `port`. All three are validated together if provided. A pattern without a `protocol` allows `http` and `https`.
539
+ A pattern without a `port` allows any port in the host, but `X-Forwarded-Port` is only trusted when it matches a pattern's `port`.
540
+ The patterns support wildcards for flexible hostname matching:
541
+
542
+ - `*.example.com` - matches exactly one subdomain level (e.g., `sub.example.com` but not `deep.sub.example.com`)
543
+ - `**.example.com` - matches any subdomain depth (e.g., both `sub.example.com` and `deep.sub.example.com`)
544
+
545
+ ```js
546
+ // astro.config.mjs
547
+ import { defineConfig } from 'astro/config';
548
+
549
+ export default defineConfig({
550
+ security: {
551
+ // Example: Allow any subdomain of example.com on https
552
+ allowedDomains: [
553
+ {
554
+ hostname: '**.example.com',
555
+ protocol: 'https'
556
+ },
557
+ {
558
+ hostname: 'staging.myapp.com',
559
+ protocol: 'https',
560
+ port: '443'
561
+ }
562
+ ]
563
+ }
564
+ });
565
+ ```
566
+
567
+ In some specific contexts (e.g., applications behind trusted reverse proxies with dynamic domains), you may need to allow all domains. To do this, use an empty object:
568
+
569
+ ```js
570
+ // astro.config.mjs
571
+ import { defineConfig } from 'astro/config';
572
+
573
+ export default defineConfig({
574
+ security: {
575
+ // Allow any domain - use this only when necessary
576
+ allowedDomains: [{}]
577
+ }
578
+ });
579
+ ```
580
+
581
+ When not configured, `X-Forwarded-Host` headers are not trusted and will be ignored.
582
+
583
+ #### security.actionBodySizeLimit
584
+
585
+ <p>
586
+
587
+ **Type:** `number`<br />
588
+ **Default:** `1048576` (1 MB)<br />
589
+ <Since v="5.18.0" />
590
+ </p>
591
+
592
+ Sets the maximum size in bytes allowed for action request bodies.
593
+
594
+ By default, action request bodies are limited to 1 MB (1048576 bytes) to prevent abuse.
595
+ You can increase this limit if your actions need to accept larger payloads, for example when handling file uploads.
596
+
597
+ ```js
598
+ // astro.config.mjs
599
+ import { defineConfig } from 'astro/config';
600
+
601
+ export default defineConfig({
602
+ security: {
603
+ actionBodySizeLimit: 10 * 1024 * 1024 // 10 MB
604
+ }
605
+ });
606
+ ```
607
+
608
+ #### security.serverIslandBodySizeLimit
609
+
610
+ <p>
611
+
612
+ **Type:** `number`<br />
613
+ **Default:** `1048576` (1 MB)<br />
614
+ <Since v="6.0.0" />
615
+ </p>
616
+
617
+ Sets the maximum size in bytes allowed for server island request bodies, which contain the encrypted props and slot HTML passed to the island component.
618
+
619
+ By default, server island request bodies are limited to 1 MB (1048576 bytes) to prevent abuse.
620
+ You can increase this limit if your server islands need to accept larger payloads.
621
+
622
+ ```js
623
+ // astro.config.mjs
624
+ import { defineConfig } from 'astro/config';
625
+
626
+ export default defineConfig({
627
+ security: {
628
+ serverIslandBodySizeLimit: 10 * 1024 * 1024 // 10 MB
629
+ }
630
+ });
631
+ ```
632
+
633
+ #### security.csp
634
+
635
+ <p>
636
+
637
+ **Type:** `boolean | object`<br />
638
+ **Default:** `false`<br />
639
+ <Since v="6.0.0" />
640
+ </p>
641
+
642
+ Enables support for [Content Security Policy (CSP)](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CSP) to help minimize certain types of security threats by controlling which resources a document is allowed to load. This provides additional protection against [cross-site scripting (XSS)](https://developer.mozilla.org/en-US/docs/Glossary/Cross-site_scripting) attacks.
643
+
644
+ Enabling this feature adds additional security to Astro's handling of processed and bundled scripts and styles by default, and allows you to further configure these, and additional, content types.
645
+
646
+ This feature comes with some limitations:
647
+ - External scripts and external styles are not supported out of the box, but you can [provide your own hashes](#securitycspscriptdirectivehashes).
648
+ - [Astro's view transitions](/en/guides/view-transitions/) using the `<ClientRouter />` are not supported, but you can [consider migrating to the browser native View Transition API](https://events-3bg.pages.dev/jotter/astro-view-transitions/) instead if you are not using Astro's enhancements to the native View Transitions and Navigation APIs.
649
+ - Shiki isn't currently supported. By design, Shiki functions use inline styles that cannot work with Astro CSP implementation. Consider [using `<Prism />`](/en/guides/syntax-highlighting/#prism-) when your project requires both CSP and syntax highlighting.
650
+ - When `'unsafe-inline'` is included as a resource in a directive, Astro will not emit hashes on that directive. Per the CSP spec, browsers ignore `'unsafe-inline'` when a hash or nonce is present in the same directive, so Astro suppresses hashes to preserve `'unsafe-inline'` behavior. Note that this reduces the security of that directive to the level of `'unsafe-inline'`.
651
+
652
+ :::note
653
+ Due to the nature of the Vite dev server, this feature isn't supported while working in `dev` mode. Instead, you can test this in your Astro project using `build` and `preview`.
654
+ :::
655
+
656
+ When enabled, Astro will add a `<meta>` element inside the `<head>` element of each page.
657
+ This element will have the `http-equiv="content-security-policy"` attribute, and the `content` attribute will provide values for the `script-src` and `style-src` [directives](#securitycspdirectives) based on the script and styles used in the page.
658
+
659
+ ```html
660
+
661
+ <head>
662
+ <meta
663
+ http-equiv="content-security-policy"
664
+ content="
665
+ script-src 'self' 'sha256-somehash';
666
+ style-src 'self' 'sha256-somehash';
667
+ "
668
+ >
669
+ </head>
670
+ ```
671
+
672
+ You can further customize the `<meta>` element by enabling this feature with a configuration object that includes additional options.
673
+
674
+ ##### security.csp.algorithm
675
+
676
+ <p>
677
+
678
+ **Type:** `"SHA-256" | "SHA-384" | "SHA-512"`<br />
679
+ **Default:** `'SHA-256'`<br />
680
+ <Since v="6.0.0" />
681
+ </p>
682
+
683
+ The [hash function](https://developer.mozilla.org/en-US/docs/Glossary/Hash_function) to use when generating the hashes of the styles and scripts emitted by Astro.
684
+
685
+ ```js title="astro.config.mjs"
686
+ import { defineConfig } from 'astro/config';
687
+
688
+ export default defineConfig({
689
+ security: {
690
+ csp: {
691
+ algorithm: 'SHA-512'
692
+ }
693
+ }
694
+ });
695
+ ```
696
+
697
+ ##### security.csp.directives
698
+
699
+ <p>
700
+
701
+ **Type:** `Array<string>`<br />
702
+ **Default:** `[]`<br />
703
+ <Since v="6.0.0" />
704
+ </p>
705
+
706
+ A list of [CSP directives](https://content-security-policy.com/#directive) (beyond `script-src` and `style-src` which are included by default) that defines valid sources for specific content types. These directives are added to all pages.
707
+
708
+ ```js title="astro.config.mjs"
709
+ import { defineConfig } from 'astro/config';
710
+
711
+ export default defineConfig({
712
+ security: {
713
+ csp: {
714
+ directives: [
715
+ "default-src 'self'",
716
+ "img-src 'self' https://images.cdn.example.com"
717
+ ]
718
+ }
719
+ }
720
+ });
721
+ ```
722
+ After the build, the `<meta>` element will add your directives into the `content` value alongside Astro's default directives:
723
+
724
+ ```html
725
+ <meta
726
+ http-equiv="content-security-policy"
727
+ content="
728
+ default-src 'self';
729
+ img-src 'self' 'https://images.cdn.example.com';
730
+ script-src 'self' 'sha256-somehash';
731
+ style-src 'self' 'sha256-somehash';
732
+ "
733
+ >
734
+ ```
735
+
736
+ ##### security.csp.styleDirective
737
+
738
+ <p>
739
+
740
+ **Type:** `CspStyleDirective`<br />
741
+ **Default:** `undefined`<br />
742
+ <Since v="6.0.0" />
743
+ </p>
744
+
745
+ A configuration object that allows you to override the default sources for the `style-src` directive with the [`resources`](#securitycspstyledirectiveresources) property, or to provide additional [hashes](#securitycspstyledirectivehashes) to be rendered.
746
+
747
+ ###### security.csp.styleDirective.hashes
748
+
749
+ <p>
750
+
751
+ **Type:** `Array<CspHashEntry>`<br />
752
+ **Default:** `[]`<br />
753
+ <Since v="6.0.0" />
754
+ </p>
755
+
756
+ A list of additional hashes to be rendered.
757
+
758
+ You must provide hashes that start with `sha384-`, `sha512-` or `sha256-`. Other values will cause a validation error. These hashes are added to all pages.
759
+
760
+ Since Astro v7.1, each entry can be a string or an object. The object allows changing the scope of the hash via the `kind` field. The `kind` field accepts:
761
+ - `"element"`: it will store the hash in the `style-src-elem` directive
762
+ - `"attribute"`: it will store the hash in the `style-src-attr` directive
763
+ - `"default"`: it will store the hash in the `style-src` directive
764
+
765
+ A `"default"` hash goes on `style-src`, or on `style-src-elem` instead once you use `kind: "element"`. It is never added to `style-src-attr`. Astro's generated hashes follow the same rule.
766
+
767
+ ```js title="astro.config.mjs"
768
+ import { defineConfig } from 'astro/config';
769
+
770
+ export default defineConfig({
771
+ security: {
772
+ csp: {
773
+ styleDirective: {
774
+ hashes: [
775
+ "sha384-styleHash",
776
+ "sha512-styleHash",
777
+ "sha256-styleHash"
778
+ ]
779
+ }
780
+ }
781
+ }
782
+ });
783
+ ```
784
+
785
+ After the build, the `<meta>` element will include your additional hashes in the `style-src` directives:
786
+
787
+ ```html
788
+ <meta
789
+ http-equiv="content-security-policy"
790
+ content="
791
+ style-src 'self' 'sha384-styleHash' 'sha512-styleHash' 'sha256-styleHash' 'sha256-generatedByAstro';
792
+ "
793
+ >
794
+ ```
795
+
796
+ Scoping a hash to `"element"` stores it in `style-src-elem` instead. Astro's generated hashes move there too:
797
+
798
+ ```js title="astro.config.mjs"
799
+ import { defineConfig } from 'astro/config';
800
+
801
+ export default defineConfig({
802
+ security: {
803
+ csp: {
804
+ styleDirective: {
805
+ hashes: [{ hash: "sha256-styleHash", kind: "element" }]
806
+ }
807
+ }
808
+ }
809
+ });
810
+ ```
811
+
812
+ After the build, the `<meta>` element will include the hash in the `style-src-elem` directive instead of `style-src`:
813
+
814
+ ```html
815
+ <meta
816
+ http-equiv="content-security-policy"
817
+ content="
818
+ style-src 'self';
819
+ style-src-elem 'self' 'sha256-styleHash' 'sha256-generatedByAstro';
820
+ "
821
+ >
822
+ ```
823
+
824
+ ###### security.csp.styleDirective.resources
825
+
826
+ <p>
827
+
828
+ **Type:** `Array<CspResourceEntry>`<br />
829
+ **Default:** `[]`<br />
830
+ <Since v="6.0.0" />
831
+ </p>
832
+
833
+ A list of valid sources for `style-src` directives to override Astro's default sources. This will not include `'self'` by default, and must be included in this list if you wish to keep it. These resources are added to all pages.
834
+
835
+ Since Astro v7.1, each entry can be a string or an object. The object allows changing the scope of the source via the `kind` field. The `kind` field accepts:
836
+ - `"element"`: it will store the source in the `style-src-elem` directive
837
+ - `"attribute"`: it will store the source in the `style-src-attr` directive
838
+ - `"default"`: it will store the source in the `style-src` directive
839
+
840
+ `"attribute"` sources must be one of `'none'`, `'unsafe-hashes'`, `'unsafe-inline'`, or `'report-sample'`, and `'unsafe-hashes'` cannot be used with `"element"`. A common use is allowing inline `style` attributes (for example, from `define:vars` or Shiki) with `{ resource: "'unsafe-inline'", kind: "attribute" }`.
841
+
842
+ Unlike a hash, a `"default"` source is never moved: it stays on `style-src` only. Where there is a mix of "default" and specific resources (e.g. `"element"` or `"attribute"`), Astro emits a warning.
843
+
844
+ ```js title="astro.config.mjs"
845
+ import { defineConfig } from 'astro/config';
846
+
847
+ export default defineConfig({
848
+ security: {
849
+ csp: {
850
+ styleDirective: {
851
+ resources: [
852
+ "'self'",
853
+ "https://styles.cdn.example.com"
854
+ ]
855
+ }
856
+ }
857
+ }
858
+ });
859
+ ```
860
+
861
+ After the build, the `<meta>` element will instead apply your sources to the `style-src` directives:
862
+
863
+ ```html
864
+ <head>
865
+ <meta
866
+ http-equiv="content-security-policy"
867
+ content="
868
+ style-src 'self' https://styles.cdn.example.com 'sha256-somehash';
869
+ "
870
+ >
871
+ </head>
872
+ ```
873
+
874
+ A `"default"` source is not copied into the more specific directives. Here, a `"default"` source and an `"element"` source render in different directives:
875
+
876
+ ```js title="astro.config.mjs"
877
+ import { defineConfig } from 'astro/config';
878
+
879
+ export default defineConfig({
880
+ security: {
881
+ csp: {
882
+ styleDirective: {
883
+ resources: [
884
+ "https://styles.cdn.example.com",
885
+ { resource: "https://elements.cdn.example.com", kind: "element" }
886
+ ]
887
+ }
888
+ }
889
+ }
890
+ });
891
+ ```
892
+
893
+ After the build, the `<meta>` element keeps `https://styles.cdn.example.com` on `style-src` only. This means that this value is not added to `style-src-elem` and does not apply to `<style>` and `<link>` elements (the generated hash, by contrast, does move there):
894
+
895
+ ```html
896
+ <meta
897
+ http-equiv="content-security-policy"
898
+ content="
899
+ style-src https://styles.cdn.example.com;
900
+ style-src-elem https://elements.cdn.example.com 'sha256-generatedByAstro';
901
+ "
902
+ >
903
+ ```
904
+
905
+ When resources are inserted multiple times or from multiple sources (e.g. defined in your `csp` config and added using [the CSP runtime API](/en/reference/api-reference/#csp)), Astro will merge and deduplicate all resources to create your `<meta>` element.
906
+
907
+ ##### security.csp.scriptDirective
908
+
909
+ <p>
910
+
911
+ **Type:** `CspScriptDirective`<br />
912
+ **Default:** `undefined`<br />
913
+ <Since v="6.0.0" />
914
+ </p>
915
+
916
+ A configuration object that allows you to override the default sources for the `script-src` directive with the [`resources`](#securitycspscriptdirectiveresources) property, or to provide additional [hashes](#securitycspscriptdirectivehashes) to be rendered.
917
+
918
+ ###### security.csp.scriptDirective.hashes
919
+
920
+ <p>
921
+
922
+ **Type:** `Array<CspHashEntry>`<br />
923
+ **Default:** `[]`<br />
924
+ <Since v="6.0.0" />
925
+ </p>
926
+
927
+ A list of additional hashes to be rendered.
928
+
929
+ You must provide hashes that start with `sha384-`, `sha512-` or `sha256-`. Other values will cause a validation error. These hashes are added to all pages.
930
+
931
+ Since Astro v7.1, each entry can be a string or an object. The object allows changing the scope of the hash via the `kind` field. The `kind` field accepts:
932
+ - `"element"`: it will store the hash in the `script-src-elem` directive
933
+ - `"attribute"`: it will store the hash in the `script-src-attr` directive
934
+ - `"default"`: it will store the hash in the `script-src` directive
935
+
936
+ A `"default"` hash goes on `script-src`, or on `script-src-elem` instead once you use `kind: "element"`. It is never added to `script-src-attr`. Astro's generated hashes follow the same rule.
937
+
938
+ ```js title="astro.config.mjs"
939
+ import { defineConfig } from 'astro/config';
940
+
941
+ export default defineConfig({
942
+ security: {
943
+ csp: {
944
+ scriptDirective: {
945
+ hashes: [
946
+ "sha384-scriptHash",
947
+ "sha512-scriptHash",
948
+ "sha256-scriptHash"
949
+ ]
950
+ }
951
+ }
952
+ }
953
+ });
954
+ ```
955
+
956
+ After the build, the `<meta>` element will include your additional hashes in the `script-src` directives:
957
+
958
+ ```html
959
+ <meta
960
+ http-equiv="content-security-policy"
961
+ content="
962
+ script-src 'self' 'sha384-scriptHash' 'sha512-scriptHash' 'sha256-scriptHash' 'sha256-generatedByAstro';
963
+ "
964
+ >
965
+ ```
966
+
967
+ Scoping a hash to `"element"` stores it in `script-src-elem` instead. Astro's generated hashes move there too:
968
+
969
+ ```js title="astro.config.mjs"
970
+ import { defineConfig } from 'astro/config';
971
+
972
+ export default defineConfig({
973
+ security: {
974
+ csp: {
975
+ scriptDirective: {
976
+ hashes: [{ hash: "sha256-scriptHash", kind: "element" }]
977
+ }
978
+ }
979
+ }
980
+ });
981
+ ```
982
+
983
+ After the build, the `<meta>` element will include the hash in the `script-src-elem` directive instead of `script-src`:
984
+
985
+ ```html
986
+ <meta
987
+ http-equiv="content-security-policy"
988
+ content="
989
+ script-src 'self';
990
+ script-src-elem 'self' 'sha256-scriptHash' 'sha256-generatedByAstro';
991
+ "
992
+ >
993
+ ```
994
+
995
+ ###### security.csp.scriptDirective.resources
996
+
997
+ <p>
998
+
999
+ **Type:** `Array<CspResourceEntry>`<br />
1000
+ **Default:** `[]`<br />
1001
+ <Since v="6.0.0" />
1002
+ </p>
1003
+
1004
+ A list of valid sources for the `script-src` directives to override Astro's default sources. This will not include `'self'` by default, and must be included in this list if you wish to keep it. These resources are added to all pages.
1005
+
1006
+ Since Astro v7.1, each entry can be a string or an object. The object allows changing the scope of the source via the `kind` field. The `kind` field accepts:
1007
+ - `"element"`: it will store the source in the `script-src-elem` directive
1008
+ - `"attribute"`: it will store the source in the `script-src-attr` directive
1009
+ - `"default"`: it will store the source in the `script-src` directive
1010
+
1011
+ `"attribute"` sources must be one of `'none'`, `'unsafe-hashes'`, `'unsafe-inline'`, or `'report-sample'`, and `'unsafe-hashes'` cannot be used with `"element"`.
1012
+
1013
+ Unlike a hash, a `"default"` source is never moved and stays on `script-src` only. This does not apply where you also scope `"element"` or `"attribute"` sources, since browsers do not fall back. Astro warns when this happens. Add it to the more specific directive as well, if necessary.
1014
+
1015
+ ```js title="astro.config.mjs"
1016
+ import { defineConfig } from 'astro/config';
1017
+
1018
+ export default defineConfig({
1019
+ security: {
1020
+ csp: {
1021
+ scriptDirective: {
1022
+ resources: [
1023
+ "'self'", "https://cdn.example.com"
1024
+ ]
1025
+ }
1026
+ }
1027
+ }
1028
+ });
1029
+ ```
1030
+
1031
+ After the build, the `<meta>` element will instead apply your sources to the `script-src` directives:
1032
+
1033
+ ```html
1034
+ <head>
1035
+ <meta
1036
+ http-equiv="content-security-policy"
1037
+ content="
1038
+ script-src 'self' https://cdn.example.com 'sha256-somehash';
1039
+ "
1040
+ >
1041
+ </head>
1042
+ ```
1043
+
1044
+ A `"default"` source is not copied into the more specific directives. Here, a `"default"` source and an `"element"` source render in different directives:
1045
+
1046
+ ```js title="astro.config.mjs"
1047
+ import { defineConfig } from 'astro/config';
1048
+
1049
+ export default defineConfig({
1050
+ security: {
1051
+ csp: {
1052
+ scriptDirective: {
1053
+ resources: [
1054
+ "https://cdn.example.com",
1055
+ { resource: "https://elements.cdn.example.com", kind: "element" }
1056
+ ]
1057
+ }
1058
+ }
1059
+ }
1060
+ });
1061
+ ```
1062
+
1063
+ After the build, the `<meta>` element keeps `https://cdn.example.com` on `script-src` only. This means that this value is not added to `script-src-elem` and does not apply to `<script>` elements (the generated hash, by contrast, does move there):
1064
+
1065
+ ```html
1066
+ <meta
1067
+ http-equiv="content-security-policy"
1068
+ content="
1069
+ script-src https://cdn.example.com;
1070
+ script-src-elem https://elements.cdn.example.com 'sha256-generatedByAstro';
1071
+ "
1072
+ >
1073
+ ```
1074
+
1075
+ When resources are inserted multiple times or from multiple sources (e.g. defined in your `csp` config and added using [the CSP runtime API](/en/reference/api-reference/#csp)), Astro will merge and deduplicate all resources to create your `<meta>` element.
1076
+
1077
+ ###### security.csp.scriptDirective.strictDynamic
1078
+
1079
+ <p>
1080
+
1081
+ **Type:** `boolean`<br />
1082
+ **Default:** `false`<br />
1083
+ <Since v="6.0.0" />
1084
+ </p>
1085
+
1086
+ Enables [the `strict-dynamic` keyword](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CSP#the_strict-dynamic_keyword) to support the dynamic injection of scripts.
1087
+
1088
+ ```js title="astro.config.mjs"
1089
+ import { defineConfig } from 'astro/config';
1090
+
1091
+ export default defineConfig({
1092
+ security: {
1093
+ csp: {
1094
+ scriptDirective: {
1095
+ strictDynamic: true
1096
+ }
1097
+ }
1098
+ }
1099
+ });
1100
+ ```
1101
+
1102
+ This applies to `script-src`. When you also scope `script` resources or hashes to `script-src-elem` (using `kind: "element"`), `strict-dynamic` is inherited by `script-src-elem` so that dynamically injected `<script>` elements continue to work.
1103
+
1104
+ Because browsers ignore `'self'` under `'strict-dynamic'`, Astro adds the hash of every script it bundles to `script-src` and renders a `<script type="importmap">` in the `<head>` that lists each script's [`integrity`](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/script/type/importmap#integrity_metadata_map). This lets bundled scripts, the modules they import, and hydrated islands load. It requires browsers that support import map integrity metadata (Chrome 127, Firefox 138, Safari 18).
1105
+
1106
+ ## Build Options
1107
+
1108
+
1109
+ ### build.format
1110
+
1111
+ <p>
1112
+
1113
+ **Type:** `('file' | 'directory' | 'preserve')`<br />
1114
+ **Default:** `'directory'`
1115
+ </p>
1116
+
1117
+ Control the output file format of each page. This value may be set by an adapter for you.
1118
+ - `'file'`: Astro will generate an HTML file named for each page route. (e.g. `src/pages/about.astro` and `src/pages/about/index.astro` both build the file `/about.html`)
1119
+ - `'directory'`: Astro will generate a directory with a nested `index.html` file for each page. (e.g. `src/pages/about.astro` and `src/pages/about/index.astro` both build the file `/about/index.html`)
1120
+ - `'preserve'`: Astro will generate HTML files exactly as they appear in your source folder. (e.g. `src/pages/about.astro` builds `/about.html` and `src/pages/about/index.astro` builds the file `/about/index.html`)
1121
+
1122
+ ```js
1123
+ // astro.config.mjs
1124
+ import { defineConfig } from 'astro/config';
1125
+
1126
+ export default defineConfig({
1127
+ build: {
1128
+ // Example: Generate `page.html` instead of `page/index.html` during build.
1129
+ format: 'file'
1130
+ }
1131
+ });
1132
+ ```
1133
+
1134
+
1135
+
1136
+ #### Effect on Astro.url
1137
+ Setting `build.format` controls what `Astro.url` is set to during the build. When it is:
1138
+ - `directory` - The `Astro.url.pathname` will include a trailing slash to mimic folder behavior. (e.g. `/foo/`)
1139
+ - `file` - The `Astro.url.pathname` will include `.html`. (e.g. `/foo.html`)
1140
+ - `preserve` - The `Astro.url.pathname` matches the generated file for each page: index pages include a trailing slash (e.g. `/foo/`), while non-index pages include `.html` (e.g. `/foo.html`).
1141
+
1142
+ This means that when you create relative URLs using `new URL('./relative', Astro.url)`, you will get consistent behavior between dev and build.
1143
+
1144
+ To prevent inconsistencies with trailing slash behaviour in dev, you can restrict the [`trailingSlash` option](#trailingslash) to `'always'` or `'never'` depending on your build format:
1145
+ - `directory` - Set `trailingSlash: 'always'`
1146
+ - `file` - Set `trailingSlash: 'never'`
1147
+
1148
+ ### build.client
1149
+
1150
+ <p>
1151
+
1152
+ **Type:** `string`<br />
1153
+ **Default:** `'./client/'`
1154
+ </p>
1155
+
1156
+ Controls the output directory of your client-side CSS and JavaScript when building a website with server-rendered pages.
1157
+ `outDir` controls where the code is built to.
1158
+
1159
+ This value is relative to the `outDir`.
1160
+
1161
+ ```js
1162
+ // astro.config.mjs
1163
+ import { defineConfig } from 'astro/config';
1164
+
1165
+ export default defineConfig({
1166
+ output: 'server',
1167
+ build: {
1168
+ client: './client'
1169
+ }
1170
+ });
1171
+ ```
1172
+
1173
+ ### build.server
1174
+
1175
+ <p>
1176
+
1177
+ **Type:** `string`<br />
1178
+ **Default:** `'./server/'`
1179
+ </p>
1180
+
1181
+ Controls the output directory of server JavaScript when building to SSR.
1182
+
1183
+ This value is relative to the `outDir`.
1184
+
1185
+ ```js
1186
+ // astro.config.mjs
1187
+ import { defineConfig } from 'astro/config';
1188
+
1189
+ export default defineConfig({
1190
+ build: {
1191
+ server: './server'
1192
+ }
1193
+ });
1194
+ ```
1195
+
1196
+ ### build.assets
1197
+
1198
+ <p>
1199
+
1200
+ **Type:** `string`<br />
1201
+ **Default:** `'_astro'`<br />
1202
+ <Since v="2.0.0" />
1203
+ </p>
1204
+
1205
+ Specifies the directory in the build output where Astro-generated assets (bundled JS and CSS for example) should live.
1206
+
1207
+ ```js
1208
+ // astro.config.mjs
1209
+ import { defineConfig } from 'astro/config';
1210
+
1211
+ export default defineConfig({
1212
+ build: {
1213
+ assets: '_custom'
1214
+ }
1215
+ });
1216
+ ```
1217
+ **See Also:**
1218
+ - outDir
1219
+
1220
+ ### build.assetsPrefix
1221
+
1222
+ <p>
1223
+
1224
+ **Type:** `string | Record<string, string>`<br />
1225
+ **Default:** `undefined`<br />
1226
+ <Since v="2.2.0" />
1227
+ </p>
1228
+
1229
+ Specifies the prefix for Astro-generated asset links. This can be used if assets are served from a different domain than the current site.
1230
+
1231
+ This requires uploading the assets in your local `./dist/_astro` folder to a corresponding `/_astro/` folder on the remote domain.
1232
+ To rename the `_astro` path, specify a new directory in `build.assets`.
1233
+
1234
+ To fetch all assets uploaded to the same domain (e.g. `https://cdn.example.com/_astro/...`), set `assetsPrefix` to the root domain as a string (regardless of your `base` configuration):
1235
+
1236
+ ```js
1237
+ // astro.config.mjs
1238
+ import { defineConfig } from 'astro/config';
1239
+
1240
+ export default defineConfig({
1241
+ build: {
1242
+ assetsPrefix: 'https://cdn.example.com'
1243
+ }
1244
+ });
1245
+ ```
1246
+
1247
+ **Added in:** `astro@4.5.0`
1248
+
1249
+ You can also pass an object to `assetsPrefix` to specify a different domain for each file type.
1250
+ In this case, a `fallback` property is required and will be used by default for any other files.
1251
+
1252
+ ```js
1253
+ // astro.config.mjs
1254
+ import { defineConfig } from 'astro/config';
1255
+
1256
+ export default defineConfig({
1257
+ build: {
1258
+ assetsPrefix: {
1259
+ 'js': 'https://js.cdn.example.com',
1260
+ 'mjs': 'https://js.cdn.example.com',
1261
+ 'css': 'https://css.cdn.example.com',
1262
+ 'fallback': 'https://cdn.example.com'
1263
+ }
1264
+ }
1265
+ });
1266
+ ```
1267
+
1268
+ ### build.serverEntry
1269
+
1270
+ <p>
1271
+
1272
+ **Type:** `string`<br />
1273
+ **Default:** `'entry.mjs'`
1274
+ </p>
1275
+
1276
+ Specifies the file name of the server entrypoint when building to SSR.
1277
+ This entrypoint is usually dependent on which host you are deploying to and
1278
+ will be set by your adapter for you.
1279
+
1280
+ Note that it is recommended that this file ends with `.mjs` so that the runtime
1281
+ detects that the file is a JavaScript module.
1282
+
1283
+ ```js
1284
+ // astro.config.mjs
1285
+ import { defineConfig } from 'astro/config';
1286
+
1287
+ export default defineConfig({
1288
+ build: {
1289
+ serverEntry: 'main.mjs'
1290
+ }
1291
+ });
1292
+ ```
1293
+
1294
+ ### build.redirects
1295
+
1296
+ <p>
1297
+
1298
+ **Type:** `boolean`<br />
1299
+ **Default:** `true`<br />
1300
+ <Since v="2.6.0" />
1301
+ </p>
1302
+
1303
+ Specifies whether redirects will be output to HTML during the build.
1304
+ This option only applies to `output: 'static'` mode; in SSR redirects
1305
+ are treated the same as all responses.
1306
+
1307
+ This option is mostly meant to be used by adapters that have special
1308
+ configuration files for redirects and do not need/want HTML based redirects.
1309
+
1310
+ ```js
1311
+ // astro.config.mjs
1312
+ import { defineConfig } from 'astro/config';
1313
+
1314
+ export default defineConfig({
1315
+ build: {
1316
+ redirects: false
1317
+ }
1318
+ });
1319
+ ```
1320
+
1321
+ ### build.inlineStylesheets
1322
+
1323
+ <p>
1324
+
1325
+ **Type:** `'always' | 'auto' | 'never'`<br />
1326
+ **Default:** `auto`<br />
1327
+ <Since v="2.6.0" />
1328
+ </p>
1329
+
1330
+ Control whether project styles are sent to the browser in a separate css file or inlined into `<style>` tags. Choose from the following options:
1331
+ - `'always'` - project styles are inlined into `<style>` tags
1332
+ - `'auto'` - only stylesheets smaller than `ViteConfig.build.assetsInlineLimit` (default: 4kb) are inlined. Otherwise, project styles are sent in external stylesheets.
1333
+ - `'never'` - project styles are sent in external stylesheets
1334
+
1335
+ ```js
1336
+ // astro.config.mjs
1337
+ import { defineConfig } from 'astro/config';
1338
+
1339
+ export default defineConfig({
1340
+ build: {
1341
+ inlineStylesheets: `never`,
1342
+ },
1343
+ });
1344
+ ```
1345
+
1346
+ ### build.concurrency
1347
+
1348
+ <p>
1349
+
1350
+ **Type:** `number`<br />
1351
+ **Default:** `1`<br />
1352
+ <Since v="4.16.0" />
1353
+ </p>
1354
+
1355
+ The number of pages to build in parallel.
1356
+
1357
+ **In most cases, you should not change the default value of `1`.**
1358
+
1359
+ Use this option only when other attempts to reduce the overall rendering time (e.g. batch or cache long running tasks like fetch calls or data access) are not possible or are insufficient.
1360
+ If the number is set too high, page rendering may slow down due to insufficient memory resources and because JS is single-threaded.
1361
+
1362
+ ```js
1363
+ // astro.config.mjs
1364
+ import { defineConfig } from 'astro/config';
1365
+
1366
+ export default defineConfig({
1367
+ build: {
1368
+ concurrency: 2
1369
+ }
1370
+ });
1371
+ ```
1372
+
1373
+ :::caution[Breaking changes possible]
1374
+ This feature is stable and is not considered experimental. However, this feature is only intended to address difficult performance issues, and breaking changes may occur in a [minor release](/en/upgrade-astro/#semantic-versioning) to keep this option as performant as possible. Please check the [Astro CHANGELOG](https://github.com/withastro/astro/blob/refs/heads/next/packages/astro/CHANGELOG.md) for every minor release if you are using this feature.
1375
+ :::
1376
+
1377
+ ## Server Options
1378
+
1379
+ Customize the Astro dev server, used by both `astro dev` and `astro preview`.
1380
+
1381
+ ```js
1382
+ // astro.config.mjs
1383
+ import { defineConfig } from 'astro/config';
1384
+
1385
+ export default defineConfig({
1386
+ server: { port: 1234, host: true}
1387
+ });
1388
+ ```
1389
+
1390
+ To set different configuration based on the command run ("dev", "preview") a function can also be passed to this configuration option.
1391
+
1392
+ ```js
1393
+ // astro.config.mjs
1394
+ import { defineConfig } from 'astro/config';
1395
+
1396
+ export default defineConfig({
1397
+ // Example: Use the function syntax to customize based on command
1398
+ server: ({ command }) => ({ port: command === 'dev' ? 4321 : 4000 })
1399
+ });
1400
+ ```
1401
+
1402
+ ### server.host
1403
+
1404
+ <p>
1405
+
1406
+ **Type:** `string | boolean`<br />
1407
+ **Default:** `false`<br />
1408
+ <Since v="0.24.0" />
1409
+ </p>
1410
+
1411
+ Set which network IP addresses the server should listen on (i.e. non-localhost IPs).
1412
+ - `false` - do not expose on a network IP address
1413
+ - `true` - listen on all addresses, including LAN and public addresses
1414
+ - `[custom-address]` - expose on a network IP address at `[custom-address]` (ex: `192.168.0.1`)
1415
+
1416
+ ### server.port
1417
+
1418
+ <p>
1419
+
1420
+ **Type:** `number`<br />
1421
+ **Default:** `4321`
1422
+ </p>
1423
+
1424
+ Set which port the server should listen on.
1425
+
1426
+ If the given port is already in use, Astro will automatically try the next available port.
1427
+
1428
+ ```js
1429
+ // astro.config.mjs
1430
+ import { defineConfig } from 'astro/config';
1431
+
1432
+ export default defineConfig({
1433
+ server: { port: 8080 }
1434
+ });
1435
+ ```
1436
+
1437
+ ### server.allowedHosts
1438
+
1439
+ <p>
1440
+
1441
+ **Type:** `Array<string> | true`<br />
1442
+ **Default:** `[]`<br />
1443
+ <Since v="5.4.0" />
1444
+ </p>
1445
+
1446
+ A list of hostnames that Astro is allowed to respond to. When the value is set to `true`, any
1447
+ hostname is allowed.
1448
+
1449
+ ```js
1450
+ // astro.config.mjs
1451
+ import { defineConfig } from 'astro/config';
1452
+
1453
+ export default defineConfig({
1454
+ server: {
1455
+ allowedHosts: ['staging.example.com', 'qa.example.com']
1456
+ }
1457
+ });
1458
+ ```
1459
+
1460
+ ### server.open
1461
+
1462
+ <p>
1463
+
1464
+ **Type:** `string | boolean`<br />
1465
+ **Default:** `false`<br />
1466
+ <Since v="4.1.0" />
1467
+ </p>
1468
+
1469
+ Controls whether the dev server should open in your browser window on startup.
1470
+
1471
+ Pass a full URL string (e.g. "http://example.com") or a pathname (e.g. "/about") to specify the URL to open.
1472
+
1473
+ ```js
1474
+ // astro.config.mjs
1475
+ import { defineConfig } from 'astro/config';
1476
+
1477
+ export default defineConfig({
1478
+ server: { open: "/about" }
1479
+ });
1480
+ ```
1481
+
1482
+ ### server.headers
1483
+
1484
+ <p>
1485
+
1486
+ **Type:** `OutgoingHttpHeaders`<br />
1487
+ **Default:** `{}`<br />
1488
+ <Since v="1.7.0" />
1489
+ </p>
1490
+
1491
+ Set custom HTTP response headers to be sent in `astro dev` and `astro preview`.
1492
+
1493
+ ## fetchFile
1494
+
1495
+ <p>
1496
+
1497
+ **Type:** `string | null`<br />
1498
+ **Default:** `'fetch'`<br />
1499
+ <Since v="7.0.0" />
1500
+ </p>
1501
+
1502
+ Customizes the file used as the fetch entrypoint inside `srcDir`.
1503
+ Defaults to `'fetch'`, meaning Astro looks for `src/fetch.ts` (or `.js` / `.mjs` / `.mts`).
1504
+
1505
+ The fetch file allows you to compose Astro's request pipeline with the
1506
+ Web Fetch standard or your own Hono middleware.
1507
+
1508
+ If you already have a `src/fetch.ts` file in use for other purposes, define a
1509
+ different filename or set the value to `null` to disable the entrypoint:
1510
+
1511
+ ```js
1512
+ // astro.config.mjs
1513
+ import { defineConfig } from 'astro/config';
1514
+
1515
+ export default defineConfig({
1516
+ fetchFile: 'handler',
1517
+ });
1518
+ ```
1519
+
1520
+ Learn more about customizing the request pipeline in the [advanced routing guide](/en/guides/routing/#advanced-routing).
1521
+
1522
+ ## Logger Options
1523
+
1524
+ <p>
1525
+
1526
+ **Type:** `LoggerHandlerConfig`<br />
1527
+ **Default:** `undefined`<br />
1528
+ <Since v="7.0.0" />
1529
+ </p>
1530
+
1531
+ Configures how Astro logs messages during development and production.
1532
+
1533
+ By default, Astro uses a built-in logger that outputs human-friendly logs to the console. You can customize this behavior by providing [your own logger handler](/en/reference/logger-reference/#custom-loggers) or by using one of the [built-in log handlers](/en/reference/logger-reference/#built-in-loggers):
1534
+
1535
+ ```js title="astro.config.mjs"
1536
+ import { defineConfig, logHandlers } from 'astro/config';
1537
+
1538
+ export default defineConfig({
1539
+ logger: logHandlers.json({ level: 'info' })
1540
+ });
1541
+ ```
1542
+
1543
+ See [the logger API reference](/en/reference/logger-reference/) for more information.
1544
+
1545
+ ### logger.entrypoint
1546
+
1547
+ <p>
1548
+
1549
+ **Type:** `string | URL`<br />
1550
+ <Since v="7.0.0" />
1551
+ </p>
1552
+
1553
+ The entrypoint for the [logger implementation](/en/reference/logger-reference/#the-logger-implementation).
1554
+ This can be an npm package, a path relative to your project root, or a `URL` pointing to a
1555
+ file in your project:
1556
+
1557
+ ```js title="astro.config.mjs"
1558
+ import { defineConfig } from 'astro/config';
1559
+
1560
+ export default defineConfig({
1561
+ logger: {
1562
+ entrypoint: "@org/astro-logger",
1563
+ }
1564
+ });
1565
+ ```
1566
+
1567
+ The logger entrypoint must be a JavaScript file. TypeScript is not supported. If Astro fails to load
1568
+ the implementation, it falls back to its default logger.
1569
+
1570
+ ### logger.config
1571
+
1572
+ <p>
1573
+
1574
+ **Type:** `Record<string, unknown> | undefined`<br />
1575
+ **Default:** `{}`<br />
1576
+ <Since v="7.0.0" />
1577
+ </p>
1578
+
1579
+ The configuration object for the log handler. The options depend on the configured logger.
1580
+
1581
+ ```js title="astro.config.mjs"
1582
+ import { defineConfig } from 'astro/config';
1583
+
1584
+ export default defineConfig({
1585
+ logger: {
1586
+ entrypoint: "@org/astro-logger",
1587
+ config: {
1588
+ level: "error"
1589
+ }
1590
+ }
1591
+ });
1592
+ ```
1593
+
1594
+ ## Session Options
1595
+
1596
+ <p>
1597
+
1598
+ **Type:** `object | false`<br />
1599
+ <Since v="5.7.0" />
1600
+ </p>
1601
+
1602
+ Configures session storage for your Astro project. This is used to store session data in a persistent way, so that it can be accessed across different requests.
1603
+
1604
+ Some adapters may provide a default session driver, but you can override it with your own configuration:
1605
+
1606
+ ```js title="astro.config.mjs"
1607
+ import { defineConfig, sessionDrivers } from 'astro/config';
1608
+
1609
+ export default defineConfig({
1610
+ session: {
1611
+ driver: sessionDrivers.redis({
1612
+ // The options are driver-dependent and some may be required.
1613
+ url: process.env.REDIS_URL
1614
+ }),
1615
+ }
1616
+ });
1617
+ ```
1618
+
1619
+ Session drivers are configured at build time. This means environment variables used in the driver configuration are inlined. You must create your own driver entrypoint to [override the configuration at runtime](/en/guides/sessions/#overriding-the-configuration-at-runtime).
1620
+
1621
+ Since Astro v7.2.0, you can opt out of session support by setting the option to `false`. When sessions are disabled, the session runtime is excluded from the SSR bundle, and adapters skip wiring their default session driver. This is useful for serverless and edge runtimes where bundle parse time is sensitive.
1622
+
1623
+ ```js title="astro.config.mjs"
1624
+ import { defineConfig } from 'astro/config';
1625
+
1626
+ export default defineConfig({
1627
+ session: false,
1628
+ });
1629
+ ```
1630
+
1631
+ See [the sessions guide](/en/guides/sessions/) for more information.
1632
+
1633
+ ### session.driver
1634
+
1635
+ <p>
1636
+
1637
+ **Type:** `SessionDriverConfig | undefined`<br />
1638
+ <Since v="5.7.0" />
1639
+ </p>
1640
+
1641
+ The driver to use for session storage. The [Node](/en/guides/integrations-guide/node/#sessions),
1642
+ [Cloudflare](/en/guides/integrations-guide/cloudflare/#sessions), and
1643
+ [Netlify](/en/guides/integrations-guide/netlify/#sessions) adapters automatically configure a default driver for you,
1644
+ but you can specify your own if you would prefer or if you are using an adapter that does not provide one.
1645
+
1646
+ ```js title="astro.config.mjs" ins={7-9} ins=" sessionDrivers "
1647
+ import { defineConfig, sessionDrivers } from 'astro/config'
1648
+ import vercel from '@astrojs/vercel'
1649
+
1650
+ export default defineConfig({
1651
+ adapter: vercel(),
1652
+ session: {
1653
+ driver: sessionDrivers.redis({
1654
+ url: process.env.REDIS_URL
1655
+ }),
1656
+ }
1657
+ });
1658
+ ```
1659
+
1660
+ :::note
1661
+ Some drivers may need extra packages to be installed. Some drivers may also require environment variables or credentials to be set. See the [Unstorage documentation](https://unstorage.unjs.io/drivers) for more information.
1662
+ :::
1663
+
1664
+ ### session.options
1665
+
1666
+ <p>
1667
+
1668
+ **Type:** `Record<string, unknown> | undefined`<br />
1669
+ **Default:** `{}`<br />
1670
+ <Since v="5.7.0" />
1671
+ </p>
1672
+
1673
+ :::caution[Deprecated]
1674
+ This is deprecated and will be removed in a future major version. Instead, pass options to the driver function.
1675
+ :::
1676
+
1677
+ The driver-specific options to use for session storage. The options depend on the driver you are using. See the [Unstorage documentation](https://unstorage.unjs.io/drivers)
1678
+ for more information on the options available for each driver.
1679
+
1680
+ ```js title="astro.config.mjs" ins={6-8}
1681
+ import { defineConfig } from 'astro/config';
1682
+
1683
+ export default defineConfig({
1684
+ session: {
1685
+ driver: "redis",
1686
+ options: {
1687
+ url: process.env.REDIS_URL
1688
+ },
1689
+ }
1690
+ });
1691
+ ```
1692
+
1693
+ ### session.cookie
1694
+
1695
+ <p>
1696
+
1697
+ **Type:** `string | AstroCookieSetOptions | undefined`<br />
1698
+ **Default:** `{ name: "astro-session", sameSite: "lax", httpOnly: true, secure: true }`<br />
1699
+ <Since v="5.7.0" />
1700
+ </p>
1701
+
1702
+ The session cookie configuration. If set to a string, it will be used as the cookie name.
1703
+ Alternatively, you can pass an object with additional options. These will be merged with the defaults.
1704
+
1705
+ ```js title="astro.config.mjs" ins={5-6}
1706
+ import { defineConfig } from 'astro/config';
1707
+
1708
+ export default defineConfig({
1709
+ session: {
1710
+ // If set to a string, it will be used as the cookie name.
1711
+ cookie: "my-session-cookie",
1712
+ }
1713
+ });
1714
+ ```
1715
+
1716
+ ```js title="astro.config.mjs" ins={5-10}
1717
+ import { defineConfig } from 'astro/config';
1718
+
1719
+ export default defineConfig({
1720
+ session: {
1721
+ // If set to an object, it will be used as the cookie options.
1722
+ cookie: {
1723
+ name: "my-session-cookie",
1724
+ sameSite: "lax",
1725
+ secure: true,
1726
+ }
1727
+ }
1728
+ });
1729
+ ```
1730
+
1731
+ ### session.ttl
1732
+
1733
+ <p>
1734
+
1735
+ **Type:** `number | undefined`<br />
1736
+ **Default:** {Infinity}<br />
1737
+ <Since v="5.7.0" />
1738
+ </p>
1739
+
1740
+ An optional default time-to-live expiration period for session values, in seconds.
1741
+
1742
+ By default, session values persist until they are deleted or the session is destroyed, and do not automatically expire because a particular amount of time has passed.
1743
+ Set `session.ttl` to add a default expiration period for your session values. Passing a `ttl` option to [`session.set()`](/en/reference/api-reference/#sessionset) will override the global default
1744
+ for that individual entry.
1745
+
1746
+ ```js title="astro.config.mjs" ins={5-6}
1747
+ import { defineConfig } from 'astro/config';
1748
+
1749
+ export default defineConfig({
1750
+ session: {
1751
+ // Set a default expiration period of 1 hour (3600 seconds)
1752
+ ttl: 3600,
1753
+ }
1754
+ });
1755
+ ```
1756
+ :::note
1757
+ Setting a value for `ttl` does not automatically delete the value from storage after the time limit has passed.
1758
+
1759
+ Values from storage will only be deleted when there is an attempt to access them after the `ttl` period has expired. At this time, the session value will be undefined and only then will the value be deleted.
1760
+
1761
+ Individual drivers may also support a `ttl` option that will automatically delete sessions after the specified time. See your chosen driver's documentation for more information.
1762
+ :::
1763
+
1764
+ ## Dev Toolbar Options
1765
+
1766
+
1767
+ ### devToolbar.enabled
1768
+
1769
+ <p>
1770
+
1771
+ **Type:** `boolean`<br />
1772
+ **Default:** `true`
1773
+ </p>
1774
+
1775
+ Whether to enable the Astro Dev Toolbar. This toolbar allows you to inspect your page islands, see helpful audits on performance and accessibility, and more.
1776
+
1777
+ This option is scoped to the entire project, to only disable the toolbar for yourself, run `npm run astro preferences disable devToolbar`. To disable the toolbar for all your Astro projects, run `npm run astro preferences disable devToolbar --global`.
1778
+
1779
+ ### devToolbar.placement
1780
+
1781
+ <p>
1782
+
1783
+ **Type:** `'bottom-left' | 'bottom-center' | 'bottom-right'`<br />
1784
+ **Default:** `'bottom-center'`<br />
1785
+ <Since v="5.17.0" />
1786
+ </p>
1787
+
1788
+ The default placement of the Astro Dev Toolbar on the screen.
1789
+
1790
+ The placement of the toolbar can still be changed via the toolbar settings UI. Once changed, the user's preference is saved in `localStorage` and overrides this configuration value.
1791
+
1792
+ ## Prefetch Options
1793
+
1794
+ <p>
1795
+
1796
+ **Type:** `boolean | object`
1797
+ </p>
1798
+
1799
+ Enable prefetching for links on your site to provide faster page transitions.
1800
+ (Enabled by default on pages using the `<ClientRouter />` router. Set `prefetch: false` to opt out of this behaviour.)
1801
+
1802
+ This configuration automatically adds a prefetch script to every page in the project
1803
+ giving you access to the `data-astro-prefetch` attribute.
1804
+ Add this attribute to any `<a />` link on your page to enable prefetching for that page.
1805
+
1806
+ ```html
1807
+ <a href="/about" data-astro-prefetch>About</a>
1808
+ ```
1809
+ Further customize the default prefetching behavior using the [`prefetch.defaultStrategy`](#prefetchdefaultstrategy) and [`prefetch.prefetchAll`](#prefetchprefetchall) options.
1810
+
1811
+ See the [Prefetch guide](/en/guides/prefetch/) for more information.
1812
+
1813
+ ### prefetch.prefetchAll
1814
+
1815
+ <p>
1816
+
1817
+ **Type:** `boolean`
1818
+ </p>
1819
+
1820
+ Enable prefetching for all links, including those without the `data-astro-prefetch` attribute.
1821
+ This value defaults to `true` when using the `<ClientRouter />` router. Otherwise, the default value is `false`.
1822
+
1823
+ ```js
1824
+ // astro.config.mjs
1825
+ import { defineConfig } from 'astro/config';
1826
+
1827
+ export default defineConfig({
1828
+ prefetch: {
1829
+ prefetchAll: true,
1830
+ },
1831
+ });
1832
+ ```
1833
+
1834
+ When set to `true`, you can disable prefetching individually by setting `data-astro-prefetch="false"` on any individual links.
1835
+
1836
+ ```html
1837
+ <a href="/about" data-astro-prefetch="false">About</a>
1838
+ ```
1839
+
1840
+ ### prefetch.defaultStrategy
1841
+
1842
+ <p>
1843
+
1844
+ **Type:** `'tap' | 'hover' | 'viewport' | 'load'`<br />
1845
+ **Default:** `'hover'`
1846
+ </p>
1847
+
1848
+ The default prefetch strategy to use when the `data-astro-prefetch` attribute is set on a link with no value.
1849
+
1850
+ - `'tap'`: Prefetch just before you click on the link.
1851
+ - `'hover'`: Prefetch when you hover over or focus on the link. (default)
1852
+ - `'viewport'`: Prefetch as the links enter the viewport.
1853
+ - `'load'`: Prefetch all links on the page after the page is loaded.
1854
+
1855
+ You can override this default value and select a different strategy for any individual link by setting a value on the attribute.
1856
+
1857
+ ```html
1858
+ <a href="/about" data-astro-prefetch="viewport">About</a>
1859
+ ```
1860
+
1861
+ ## Image Options
1862
+
1863
+
1864
+ ### image.endpoint
1865
+
1866
+ <p>
1867
+
1868
+ **Type:** `Object`<br />
1869
+ **Default:** `{route: '/_image', entrypoint: undefined}`<br />
1870
+ <Since v="3.1.0" />
1871
+ </p>
1872
+
1873
+ Set the endpoint to use for image optimization in dev and SSR. The `entrypoint` property can be set to `undefined` to use the default image endpoint.
1874
+
1875
+ ```js
1876
+ // astro.config.mjs
1877
+ import { defineConfig } from 'astro/config';
1878
+
1879
+ export default defineConfig({
1880
+ image: {
1881
+ // Example: Use a custom image endpoint at `/custom_endpoint`
1882
+ endpoint: {
1883
+ route: '/custom_endpoint',
1884
+ entrypoint: 'src/my_endpoint.ts',
1885
+ },
1886
+ },
1887
+ });
1888
+ ```
1889
+
1890
+ ### image.service
1891
+
1892
+ <p>
1893
+
1894
+ **Type:** `{entrypoint: 'astro/assets/services/sharp' | string, config: Record<string, any>} | {build: ImageServiceConfig, runtime: ImageServiceConfig}`<br />
1895
+ **Default:** `{entrypoint: 'astro/assets/services/sharp', config?: {}}`<br />
1896
+ <Since v="2.1.0" />
1897
+ </p>
1898
+
1899
+ Set which image service is used for Astro’s assets support.
1900
+
1901
+ The value should be an object with an entrypoint for the image service to use and optionally, a config object to pass to the service.
1902
+
1903
+ The service entrypoint can be either one of the included services, or a third-party package.
1904
+
1905
+ ```js
1906
+ // astro.config.mjs
1907
+ import { defineConfig } from 'astro/config';
1908
+
1909
+ export default defineConfig({
1910
+ image: {
1911
+ // Example: Enable the Sharp-based image service with a custom config
1912
+ service: {
1913
+ entrypoint: 'astro/assets/services/sharp',
1914
+ config: {
1915
+ limitInputPixels: false,
1916
+ webp: {
1917
+ effort: 6,
1918
+ alphaQuality: 80,
1919
+ },
1920
+ jpeg: {
1921
+ mozjpeg: true,
1922
+ },
1923
+ },
1924
+ },
1925
+ },
1926
+ });
1927
+ ```
1928
+
1929
+ Since Astro v7.4, you can also configure different `build` and `runtime` services. The `build` service optimizes images on prerendered pages when you build your site, and is also used during development. The `runtime` service handles images on on-demand rendered pages and the [image endpoint](#imageendpoint) of your deployed site.
1930
+
1931
+ The following example uses Sharp to optimize images on prerendered pages, and an image CDN for on-demand rendered pages:
1932
+
1933
+ ```js
1934
+ // astro.config.mjs
1935
+ import { defineConfig } from 'astro/config';
1936
+
1937
+ export default defineConfig({
1938
+ image: {
1939
+ service: {
1940
+ build: { entrypoint: 'astro/assets/services/sharp' },
1941
+ runtime: { entrypoint: 'my-image-cdn-service' },
1942
+ },
1943
+ },
1944
+ });
1945
+ ```
1946
+
1947
+ Images on prerendered pages are always generated in Node during the build, so you can use Sharp as the `build` service even if your adapter prerenders pages in another runtime (e.g. Cloudflare's `workerd`).
1948
+
1949
+ #### image.service.config.limitInputPixels
1950
+
1951
+ <p>
1952
+
1953
+ **Type:** `number | boolean`<br />
1954
+ **Default:** `true`<br />
1955
+ <Since v="4.1.0" />
1956
+ </p>
1957
+
1958
+ Whether or not to limit the size of images that the Sharp image service will process.
1959
+
1960
+ Set `false` to bypass the default image size limit for the Sharp image service and process large images.
1961
+
1962
+ #### image.service.config.kernel
1963
+
1964
+ <p>
1965
+
1966
+ **Type:** `string | undefined`<br />
1967
+ **Default:** `undefined`<br />
1968
+ <Since v="5.17.0" />
1969
+ </p>
1970
+
1971
+ The default [kernel used for resizing images](https://sharp.pixelplumbing.com/api-resize/#resize) in the Sharp image service.
1972
+
1973
+ By default this is `undefined`, which maps to Sharp's default kernel of `lanczos3`.
1974
+
1975
+ #### image.service.config.jpeg
1976
+
1977
+ <p>
1978
+
1979
+ **Type:** `Record<string, any> | undefined`<br />
1980
+ **Default:** `undefined`<br />
1981
+ <Since v="6.1.0" />
1982
+ </p>
1983
+
1984
+ The default encoder options passed to `sharp().jpeg()` when using Astro's built-in Sharp image service.
1985
+
1986
+ This can be used for options such as `mozjpeg`, `progressive`, `chromaSubsampling`, or a default `quality`.
1987
+ Per-image `quality` values from `<Image />`, `<Picture />`, and `getImage()` still take precedence.
1988
+
1989
+ #### image.service.config.webp
1990
+
1991
+ <p>
1992
+
1993
+ **Type:** `Record<string, any> | undefined`<br />
1994
+ **Default:** `undefined`<br />
1995
+ <Since v="6.1.0" />
1996
+ </p>
1997
+
1998
+ The default encoder options passed to `sharp().webp()` when using Astro's built-in Sharp image service.
1999
+
2000
+ This can be used for options such as `effort`, `alphaQuality`, `lossless`, `nearLossless`, or a default `quality`.
2001
+ Per-image `quality` values from `<Image />`, `<Picture />`, and `getImage()` still take precedence.
2002
+
2003
+ #### image.service.config.avif
2004
+
2005
+ <p>
2006
+
2007
+ **Type:** `Record<string, any> | undefined`<br />
2008
+ **Default:** `undefined`<br />
2009
+ <Since v="6.1.0" />
2010
+ </p>
2011
+
2012
+ The default encoder options passed to `sharp().avif()` when using Astro's built-in Sharp image service.
2013
+
2014
+ This can be used for options such as `effort`, `chromaSubsampling`, `bitdepth`, `lossless`, or a default `quality`.
2015
+ Per-image `quality` values from `<Image />`, `<Picture />`, and `getImage()` still take precedence.
2016
+
2017
+ #### image.service.config.png
2018
+
2019
+ <p>
2020
+
2021
+ **Type:** `Record<string, any> | undefined`<br />
2022
+ **Default:** `undefined`<br />
2023
+ <Since v="6.1.0" />
2024
+ </p>
2025
+
2026
+ The default encoder options passed to `sharp().png()` when using Astro's built-in Sharp image service.
2027
+
2028
+ This can be used for options such as `compressionLevel`, `effort`, `palette`, or a default `quality`.
2029
+ Per-image `quality` values from `<Image />`, `<Picture />`, and `getImage()` still take precedence.
2030
+
2031
+ ### image.dangerouslyProcessSVG
2032
+
2033
+ <p>
2034
+
2035
+ **Type:** `boolean`<br />
2036
+ **Default:** `false`<br />
2037
+ <Since v="6.3.0" />
2038
+ </p>
2039
+
2040
+ Allows SVG source images to be processed by the image optimization pipeline.
2041
+
2042
+ This is disabled by default as specifically formed SVGs can be prohibitively expensive to process and used by malicious actors to execute denial of service attacks. Only enable this option if you trust the source of your SVG images and understand the risks of processing them.
2043
+
2044
+ ### image.domains
2045
+
2046
+ <p>
2047
+
2048
+ **Type:** `Array<string>`<br />
2049
+ **Default:** `[]`<br />
2050
+ <Since v="2.10.10" />
2051
+ </p>
2052
+
2053
+ Defines a list of permitted image source domains for remote image optimization. No other remote images will be optimized by Astro.
2054
+
2055
+ This option requires an array of individual domain names as strings. Wildcards are not permitted. Instead, use [`image.remotePatterns`](#imageremotepatterns) to define a list of allowed source URL patterns.
2056
+
2057
+ ```js
2058
+ // astro.config.mjs
2059
+ import { defineConfig } from 'astro/config';
2060
+
2061
+ export default defineConfig({
2062
+ image: {
2063
+ // Example: Allow remote image optimization from a single domain
2064
+ domains: ['astro.build'],
2065
+ },
2066
+ });
2067
+ ```
2068
+
2069
+ ### image.remotePatterns
2070
+
2071
+ <p>
2072
+
2073
+ **Type:** `Array<RemotePattern>`<br />
2074
+ **Default:** `[]`<br />
2075
+ <Since v="2.10.10" />
2076
+ </p>
2077
+
2078
+ Defines a list of permitted image source URL patterns for remote image optimization.
2079
+
2080
+ `remotePatterns` can be configured with four properties:
2081
+ 1. protocol
2082
+ 2. hostname
2083
+ 3. port
2084
+ 4. pathname
2085
+
2086
+ ```js
2087
+ // astro.config.mjs
2088
+ import { defineConfig } from 'astro/config';
2089
+
2090
+ export default defineConfig({
2091
+ image: {
2092
+ // Example: allow processing all images from your aws s3 bucket
2093
+ remotePatterns: [{
2094
+ protocol: 'https',
2095
+ hostname: '**.amazonaws.com',
2096
+ }],
2097
+ },
2098
+ });
2099
+ ```
2100
+
2101
+ You can use wildcards to define the permitted `hostname` and `pathname` values as described below. Otherwise, only the exact values provided will be configured.
2102
+
2103
+ `hostname` patterns:
2104
+ - Start with `**.` to allow all subdomains (like `endsWith`).
2105
+ - Start with `*.` to allow only one level of subdomain.
2106
+
2107
+ `pathname` patterns:
2108
+ - End with `/**` to allow all sub-routes (like `startsWith`).
2109
+ - End with `/*` to allow only one level of sub-route.
2110
+
2111
+ HTTP redirects are also followed when an image URL matches a remote pattern. The final destination URL must be among the allowed remote patterns to be loaded.
2112
+
2113
+ ### image.responsiveStyles
2114
+
2115
+ <p>
2116
+
2117
+ **Type:** `boolean`<br />
2118
+ **Default:** `false`<br />
2119
+ <Since v="5.10.0" />
2120
+ </p>
2121
+
2122
+ Whether to automatically add global styles for responsive images. You should enable this option unless you are styling the images yourself.
2123
+
2124
+ This option is only used when `layout` is set to `constrained`, `full-width`, or `fixed` using the configuration or the `layout` prop on the image component.
2125
+
2126
+ See [the images docs](/en/guides/images/#responsive-image-styles) for more information.
2127
+
2128
+ ### image.layout
2129
+
2130
+ <p>
2131
+
2132
+ **Type:** `ImageLayout`<br />
2133
+ **Default:** `undefined`<br />
2134
+ <Since v="5.10.0" />
2135
+ </p>
2136
+
2137
+ The default layout type for responsive images. Can be overridden by the `layout` prop on the image component.
2138
+ - `constrained` - The image will scale to fit the container, maintaining its aspect ratio, but will not exceed the specified dimensions.
2139
+ - `fixed` - The image will maintain its original dimensions.
2140
+ - `full-width` - The image will scale to fit the container, maintaining its aspect ratio.
2141
+
2142
+ See [the `layout` component property](/en/reference/modules/astro-assets/#layout) for more details.
2143
+
2144
+ ### image.objectFit
2145
+
2146
+ <p>
2147
+
2148
+ **Type:** `ImageFit`<br />
2149
+ **Default:** `"cover"`<br />
2150
+ <Since v="5.10.0" />
2151
+ </p>
2152
+
2153
+ The [`object-fit` CSS property value](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit) for responsive images. Can be overridden by the `fit` prop on the image component.
2154
+ Requires a value for `layout` to be set.
2155
+
2156
+ See [the `fit` component property](/en/reference/modules/astro-assets/#fit) for more details.
2157
+
2158
+ ### image.objectPosition
2159
+
2160
+ <p>
2161
+
2162
+ **Type:** `string`<br />
2163
+ **Default:** `"center"`<br />
2164
+ <Since v="5.10.0" />
2165
+ </p>
2166
+
2167
+ The default [`object-position` CSS property value](https://developer.mozilla.org/en-US/docs/Web/CSS/object-position) for responsive images. Can be overridden by the `position` prop on the image component.
2168
+ Requires a value for `layout` to be set.
2169
+
2170
+ See [the `position` component property](/en/reference/modules/astro-assets/#position) for more details.
2171
+
2172
+ ### image.breakpoints
2173
+
2174
+ <p>
2175
+
2176
+ **Type:** `Array<number>`<br />
2177
+ **Default:** `[640, 750, 828, 1080, 1280, 1668, 2048, 2560] | [640, 750, 828, 960, 1080, 1280, 1668, 1920, 2048, 2560, 3200, 3840, 4480, 5120, 6016]`<br />
2178
+ <Since v="5.10.0" />
2179
+ </p>
2180
+
2181
+ The breakpoints used to generate responsive images. Requires a value for `layout` to be set. The full list is not normally used,
2182
+ but is filtered according to the source and output size. The defaults used depend on whether a local or remote image service is used. For remote services
2183
+ the more comprehensive list is used, because only the required sizes are generated. For local services, the list is shorter to reduce the number of images generated.
2184
+
2185
+ ## Markdown Options
2186
+
2187
+
2188
+ ### markdown.shikiConfig
2189
+
2190
+ <p>
2191
+
2192
+ **Type:** `Partial<ShikiConfig>`
2193
+ </p>
2194
+
2195
+ Shiki is our default syntax highlighter. You can configure all options via the `markdown.shikiConfig` object:
2196
+
2197
+ ```js title="astro.config.mjs"
2198
+ import { defineConfig } from 'astro/config';
2199
+
2200
+ export default defineConfig({
2201
+ markdown: {
2202
+ shikiConfig: {
2203
+ // Choose from Shiki's built-in themes (or add your own)
2204
+ // https://shiki.style/themes
2205
+ theme: 'dracula',
2206
+ // Alternatively, provide multiple themes
2207
+ // See note below for using dual light/dark themes
2208
+ themes: {
2209
+ light: 'github-light',
2210
+ dark: 'github-dark',
2211
+ },
2212
+ // Disable the default colors
2213
+ // https://shiki.style/guide/dual-themes#without-default-color
2214
+ // (Added in v4.12.0)
2215
+ defaultColor: false,
2216
+ // Add custom languages
2217
+ // Note: Shiki has countless langs built-in, including .astro!
2218
+ // https://shiki.style/languages
2219
+ langs: [],
2220
+ // Add custom aliases for languages
2221
+ // Map an alias to a Shiki language ID: https://shiki.style/languages#bundled-languages
2222
+ // https://shiki.style/guide/load-lang#custom-language-aliases
2223
+ langAlias: {
2224
+ cjs: "javascript"
2225
+ },
2226
+ // Enable word wrap to prevent horizontal scrolling
2227
+ wrap: true,
2228
+ // Add custom transformers: https://shiki.style/guide/transformers
2229
+ // Find common transformers: https://shiki.style/packages/transformers
2230
+ transformers: [],
2231
+ },
2232
+ },
2233
+ });
2234
+ ```
2235
+
2236
+ See the [code syntax highlighting guide](/en/guides/syntax-highlighting/) for usage and examples.
2237
+
2238
+ ### markdown.syntaxHighlight
2239
+
2240
+ <p>
2241
+
2242
+ **Type:** `SyntaxHighlightConfig | SyntaxHighlightConfigType | false`<br />
2243
+ **Default:** `{ type: 'shiki', excludeLangs: ['math'] }`
2244
+ </p>
2245
+
2246
+ Which syntax highlighter to use for Markdown code blocks (\`\`\`), if any. This determines the CSS classes that Astro will apply to your Markdown code blocks.
2247
+
2248
+ - `shiki` - use the [Shiki](https://shiki.style) highlighter (`github-dark` theme configured by default)
2249
+ - `prism` - use the [Prism](https://prismjs.com/) highlighter and [provide your own Prism stylesheet](/en/guides/syntax-highlighting/#add-a-prism-stylesheet)
2250
+ - `false` - do not apply syntax highlighting.
2251
+ ```js
2252
+ // astro.config.mjs
2253
+ import { defineConfig } from 'astro/config';
2254
+
2255
+ export default defineConfig({
2256
+ markdown: {
2257
+ // Example: Switch to use prism for syntax highlighting in Markdown
2258
+ syntaxHighlight: 'prism',
2259
+ }
2260
+ });
2261
+ ```
2262
+
2263
+ For more control over syntax highlighting, you can instead specify a configuration object with the properties listed below.
2264
+
2265
+ #### markdown.syntaxHighlight.type
2266
+
2267
+ <p>
2268
+
2269
+ **Type:** `'shiki' | 'prism'`<br />
2270
+ **Default:** `'shiki'`<br />
2271
+ <Since v="5.5.0" />
2272
+ </p>
2273
+
2274
+ The default CSS classes to apply to Markdown code blocks.
2275
+ (If no other syntax highlighting configuration is needed, you can instead set `markdown.syntaxHighlight` directly to `shiki`, `prism`, or `false`.)
2276
+
2277
+ #### markdown.syntaxHighlight.excludeLangs
2278
+
2279
+ <p>
2280
+
2281
+ **Type:** `Array<string>`<br />
2282
+ **Default:** `['math']`<br />
2283
+ <Since v="5.5.0" />
2284
+ </p>
2285
+
2286
+ An array of languages to exclude from the default syntax highlighting specified in `markdown.syntaxHighlight.type`.
2287
+ This can be useful when using tools that create diagrams from Markdown code blocks, such as Mermaid.js and D2.
2288
+
2289
+ ```js title="astro.config.mjs"
2290
+ import { defineConfig } from 'astro/config';
2291
+
2292
+ export default defineConfig({
2293
+ markdown: {
2294
+ syntaxHighlight: {
2295
+ type: 'shiki',
2296
+ excludeLangs: ['mermaid', 'math'],
2297
+ },
2298
+ },
2299
+ });
2300
+ ```
2301
+
2302
+ ### markdown.remarkPlugins
2303
+
2304
+
2305
+ :::caution[Deprecated]
2306
+ This property is deprecated and will be removed in a future major version. Pass plugins to the configured [`markdown.processor`](#markdownprocessor) instead.
2307
+
2308
+ Learn more about [setting up a Markdown processor](/en/guides/markdown-content/#setting-up-a-markdown-processor) and [using plugins](/en/guides/markdown-content/#markdown-processor-plugins) in the Markdown guide.
2309
+ :::
2310
+
2311
+ <p>
2312
+
2313
+ **Type:** `RemarkPlugins`
2314
+ </p>
2315
+
2316
+ Pass [remark plugins](https://github.com/remarkjs/remark) to customize how your Markdown is built. You can import and apply the plugin function (recommended), or pass the plugin name as a string.
2317
+
2318
+ ```js
2319
+ // astro.config.mjs
2320
+ import { defineConfig } from 'astro/config';
2321
+ import remarkToc from 'remark-toc';
2322
+
2323
+ export default defineConfig({
2324
+ markdown: {
2325
+ remarkPlugins: [ [remarkToc, { heading: "contents"} ] ]
2326
+ }
2327
+ });
2328
+ ```
2329
+
2330
+ ### markdown.rehypePlugins
2331
+
2332
+
2333
+ :::caution[Deprecated]
2334
+ This property is deprecated and will be removed in a future major version. Pass plugins to the configured [`markdown.processor`](#markdownprocessor) instead.
2335
+
2336
+ Learn more about [setting up a Markdown processor](/en/guides/markdown-content/#setting-up-a-markdown-processor) and [using plugins](/en/guides/markdown-content/#markdown-processor-plugins) in the Markdown guide.
2337
+ :::
2338
+
2339
+ <p>
2340
+
2341
+ **Type:** `RehypePlugins`
2342
+ </p>
2343
+
2344
+ Pass [rehype plugins](https://github.com/remarkjs/remark-rehype) to customize how your Markdown's output HTML is processed. You can import and apply the plugin function (recommended), or pass the plugin name as a string.
2345
+
2346
+ ```js
2347
+ // astro.config.mjs
2348
+ import { defineConfig } from 'astro/config';
2349
+ import { rehypeAccessibleEmojis } from 'rehype-accessible-emojis';
2350
+
2351
+ export default defineConfig({
2352
+ markdown: {
2353
+ rehypePlugins: [rehypeAccessibleEmojis]
2354
+ }
2355
+ });
2356
+ ```
2357
+
2358
+ ### markdown.gfm
2359
+
2360
+
2361
+ :::caution[Deprecated]
2362
+ This property is deprecated and will be removed in a future major version. Pass `gfm` to the configured [`markdown.processor`](#markdownprocessor) instead.
2363
+
2364
+ Learn more about [setting up a Markdown processor](/en/guides/markdown-content/#setting-up-a-markdown-processor) and [using GitHub-flavored Markdown](/en/guides/markdown-content/#github-flavored-markdown) in the Markdown guide.
2365
+ :::
2366
+
2367
+ <p>
2368
+
2369
+ **Type:** `boolean`<br />
2370
+ **Default:** `true`<br />
2371
+ <Since v="2.0.0" />
2372
+ </p>
2373
+
2374
+ Astro uses [GitHub-flavored Markdown](https://github.com/remarkjs/remark-gfm) by default. To disable this, set the `gfm` flag to `false`:
2375
+
2376
+ ```js
2377
+ // astro.config.mjs
2378
+ import { defineConfig } from 'astro/config';
2379
+
2380
+ export default defineConfig({
2381
+ markdown: {
2382
+ gfm: false,
2383
+ }
2384
+ });
2385
+ ```
2386
+
2387
+ ### markdown.smartypants
2388
+
2389
+
2390
+ :::caution[Deprecated]
2391
+ This property is deprecated and will be removed in a future major version. Pass it to the configured [`markdown.processor`](#markdownprocessor) instead. Use `smartypants` for `unified()` or `smartPunctuation` for `satteri()`.
2392
+
2393
+ Learn more about [setting up a Markdown processor](/en/guides/markdown-content/#setting-up-a-markdown-processor) and [using smart punctuation](/en/guides/markdown-content/#smart-punctuation) in the Markdown guide.
2394
+ :::
2395
+
2396
+ <p>
2397
+
2398
+ **Type:** `boolean | Smartypants`<br />
2399
+ **Default:** `true`<br />
2400
+ <Since v="2.0.0" />
2401
+ </p>
2402
+
2403
+ Whether to use the [SmartyPants formatter](https://daringfireball.net/projects/smartypants/) to transform straight quotes into smart quotes, dashes into en/em dashes, and triple dots into ellipses.
2404
+
2405
+ To disable this, set the `smartypants` flag to `false`.
2406
+
2407
+ For more control over typography, you can instead specify a configuration object with the [properties supported by `retext-smartypants`](https://github.com/retextjs/retext-smartypants?tab=readme-ov-file#fields).
2408
+
2409
+ ### markdown.remarkRehype
2410
+
2411
+
2412
+ :::caution[Deprecated]
2413
+ This property is deprecated and will be removed in a future major version.
2414
+
2415
+ To configure footnotes, pass `remarkRehype` to the `unified()` processor or `gfm.footnotes` to the `satteri()` processor instead. Other `remark-rehype` options are only supported when using `unified()`.
2416
+
2417
+ Learn more about [setting up a Markdown processor](/en/guides/markdown-content/#setting-up-a-markdown-processor) and [using built-in features](/en/guides/markdown-content/#built-in-features) in the Markdown guide.
2418
+ :::
2419
+
2420
+ <p>
2421
+
2422
+ **Type:** `RemarkRehype`
2423
+ </p>
2424
+
2425
+ Pass options to [remark-rehype](https://github.com/remarkjs/remark-rehype#api).
2426
+
2427
+ ```js
2428
+ // astro.config.mjs
2429
+ import { defineConfig } from 'astro/config';
2430
+
2431
+ export default defineConfig({
2432
+ markdown: {
2433
+ // Example: Translate the footnotes text to another language, here are the default English values
2434
+ remarkRehype: { footnoteLabel: "Footnotes", footnoteBackLabel: "Back to reference 1"},
2435
+ },
2436
+ });
2437
+ ```
2438
+
2439
+ ### markdown.processor
2440
+
2441
+ <p>
2442
+
2443
+ **Type:** `MarkdownProcessor`<br />
2444
+ <Since v="6.4.0" />
2445
+ </p>
2446
+
2447
+ Configures the [Markdown processor](/en/guides/markdown-content/#markdown-processors) used to render `.md` files.
2448
+
2449
+ Sätteri, Astro’s native Markdown pipeline, is the default processor. To configure it, install `@astrojs/markdown-satteri` and pass options to `satteri()`:
2450
+
2451
+ ```js
2452
+ // astro.config.mjs
2453
+ import { defineConfig } from 'astro/config';
2454
+ import { satteri } from '@astrojs/markdown-satteri';
2455
+
2456
+ export default defineConfig({
2457
+ markdown: {
2458
+ processor: satteri({
2459
+ features: { gfm: false },
2460
+ }),
2461
+ },
2462
+ });
2463
+ ```
2464
+
2465
+ To keep the remark/rehype pipeline, install `@astrojs/markdown-remark` and pass `unified()`:
2466
+
2467
+ ```js
2468
+ // astro.config.mjs
2469
+ import { defineConfig } from 'astro/config';
2470
+ import { unified } from '@astrojs/markdown-remark';
2471
+ import remarkToc from 'remark-toc';
2472
+
2473
+ export default defineConfig({
2474
+ markdown: {
2475
+ processor: unified({
2476
+ remarkPlugins: [remarkToc],
2477
+ }),
2478
+ },
2479
+ });
2480
+ ```
2481
+
2482
+ Learn more about the [official Markdown processors and how to choose one](/en/guides/markdown-content/#choosing-a-markdown-processor) in the Markdown guide.
2483
+
2484
+ ## i18n
2485
+
2486
+ <p>
2487
+
2488
+ **Type:** `object`<br />
2489
+ <Since v="3.5.0" />
2490
+ </p>
2491
+
2492
+ Configures i18n routing and allows you to specify some customization options.
2493
+
2494
+ See our guide for more information on [internationalization in Astro](/en/guides/internationalization/)
2495
+
2496
+ ### i18n.locales
2497
+
2498
+ <p>
2499
+
2500
+ **Type:** `Locales`<br />
2501
+ <Since v="3.5.0" />
2502
+ </p>
2503
+
2504
+ A list of all locales supported by the website. This is a required field.
2505
+
2506
+ Languages can be listed either as individual codes (e.g. `['en', 'es', 'pt-br']`) or mapped to a shared `path` of codes (e.g. `{ path: "english", codes: ["en", "en-US"]}`). These codes will be used to determine the URL structure of your deployed site.
2507
+
2508
+ No particular language code format or syntax is enforced, but your project folders containing your content files must match exactly the `locales` items in the list. In the case of multiple `codes` pointing to a custom URL path prefix, store your content files in a folder with the same name as the `path` configured.
2509
+
2510
+ ### i18n.defaultLocale
2511
+
2512
+ <p>
2513
+
2514
+ **Type:** `string`<br />
2515
+ <Since v="3.5.0" />
2516
+ </p>
2517
+
2518
+ The default locale of your website/application, that is one of the specified `locales`. This is a required field.
2519
+
2520
+ No particular language format or syntax is enforced, but we suggest using lower-case and hyphens as needed (e.g. "es", "pt-br") for greatest compatibility.
2521
+
2522
+ ### i18n.fallback
2523
+
2524
+ <p>
2525
+
2526
+ **Type:** `Record<string, string>`<br />
2527
+ <Since v="3.5.0" />
2528
+ </p>
2529
+
2530
+ The fallback strategy when navigating to pages that do not exist (e.g. a translated page has not been created).
2531
+
2532
+ Use this object to declare a fallback `locale` route for each language you support. If no fallback is specified, then unavailable pages will return a 404.
2533
+
2534
+ ##### Example
2535
+
2536
+ The following example configures your content fallback strategy to redirect unavailable pages in `/pt-br/` to their `es` version, and unavailable pages in `/fr/` to their `en` version. Unavailable `/es/` pages will return a 404.
2537
+
2538
+ ```js
2539
+ // astro.config.mjs
2540
+ import { defineConfig } from 'astro/config';
2541
+
2542
+ export default defineConfig({
2543
+ i18n: {
2544
+ defaultLocale: "en",
2545
+ locales: ["en", "fr", "pt-br", "es"],
2546
+ fallback: {
2547
+ "pt-br": "es",
2548
+ fr: "en"
2549
+ }
2550
+ }
2551
+ });
2552
+ ```
2553
+
2554
+ ### i18n.routing
2555
+
2556
+ <p>
2557
+
2558
+ **Type:** `object | "manual"`<br />
2559
+ **Default:** `object`<br />
2560
+ <Since v="3.7.0" />
2561
+ </p>
2562
+
2563
+ Controls the routing strategy to determine your site URLs. Set this based on your folder/URL path configuration for your default language.
2564
+
2565
+ ```js
2566
+ // astro.config.mjs
2567
+ import { defineConfig } from 'astro/config';
2568
+
2569
+ export default defineConfig({
2570
+ i18n: {
2571
+ defaultLocale: "en",
2572
+ locales: ["en", "fr"],
2573
+ routing: {
2574
+ prefixDefaultLocale: false,
2575
+ redirectToDefaultLocale: true,
2576
+ fallbackType: "redirect",
2577
+ }
2578
+ }
2579
+ });
2580
+ ```
2581
+
2582
+ Since 4.6.0, this option can also be set to `manual`. When this routing strategy is enabled, Astro will **disable** its i18n middleware and no other `routing` options (e.g. `prefixDefaultLocale`) may be configured. You will be responsible for writing your own routing logic, or executing Astro's i18n middleware manually alongside your own.
2583
+
2584
+ ```js
2585
+ // astro.config.mjs
2586
+ import { defineConfig } from 'astro/config';
2587
+
2588
+ export default defineConfig({
2589
+ i18n: {
2590
+ defaultLocale: "en",
2591
+ locales: ["en", "fr"],
2592
+ routing: "manual"
2593
+ }
2594
+ });
2595
+ ```
2596
+
2597
+ #### i18n.routing.prefixDefaultLocale
2598
+
2599
+ <p>
2600
+
2601
+ **Type:** `boolean`<br />
2602
+ **Default:** `false`<br />
2603
+ <Since v="3.7.0" />
2604
+ </p>
2605
+
2606
+ When `false`, only non-default languages will display a language prefix.
2607
+ The `defaultLocale` will not show a language prefix and content files do not exist in a localized folder.
2608
+ URLs will be of the form `example.com/[locale]/content/` for all non-default languages, but `example.com/content/` for the default locale.
2609
+
2610
+ When `true`, all URLs will display a language prefix.
2611
+ URLs will be of the form `example.com/[locale]/content/` for every route, including the default language.
2612
+ Localized folders are used for every language, including the default.
2613
+
2614
+ ```js
2615
+ // astro.config.mjs
2616
+ import { defineConfig } from 'astro/config';
2617
+
2618
+ export default defineConfig({
2619
+ i18n: {
2620
+ defaultLocale: "en",
2621
+ locales: ["en", "fr", "pt-br", "es"],
2622
+ routing: {
2623
+ prefixDefaultLocale: true,
2624
+ }
2625
+ }
2626
+ });
2627
+ ```
2628
+
2629
+ #### i18n.routing.redirectToDefaultLocale
2630
+
2631
+ <p>
2632
+
2633
+ **Type:** `boolean`<br />
2634
+ **Default:** `false`<br />
2635
+ <Since v="4.2.0" />
2636
+ </p>
2637
+
2638
+ Configures whether or not the home URL (`/`) generated by `src/pages/index.astro`
2639
+ will redirect to `/[defaultLocale]` when `prefixDefaultLocale: true` is set.
2640
+
2641
+ Set `redirectToDefaultLocale: true` to enable this automatic redirection at the root of your site:
2642
+ ```js
2643
+ // astro.config.mjs
2644
+ import { defineConfig } from 'astro/config';
2645
+
2646
+ export default defineConfig({
2647
+ i18n:{
2648
+ defaultLocale: "en",
2649
+ locales: ["en", "fr"],
2650
+ routing: {
2651
+ prefixDefaultLocale: true,
2652
+ redirectToDefaultLocale: true
2653
+ }
2654
+ }
2655
+ });
2656
+ ```
2657
+
2658
+ #### i18n.routing.fallbackType
2659
+
2660
+ <p>
2661
+
2662
+ **Type:** `"redirect" | "rewrite"`<br />
2663
+ **Default:** `"redirect"`<br />
2664
+ <Since v="4.15.0" />
2665
+ </p>
2666
+
2667
+ When [`i18n.fallback`](#i18nfallback) is configured to avoid showing a 404 page for missing page routes, this option controls whether to [redirect](/en/guides/routing/#redirects) to the fallback page, or to [rewrite](/en/guides/routing/#rewrites) the fallback page's content in place.
2668
+
2669
+ By default, Astro's i18n routing creates pages that redirect your visitors to a new destination based on your fallback configuration. The browser will refresh and show the destination address in the URL bar.
2670
+
2671
+ When `i18n.routing.fallback: "rewrite"` is configured, Astro will create pages that render the contents of the fallback page on the original, requested URL.
2672
+
2673
+ With the following configuration, if you have the file `src/pages/en/about.astro` but not `src/pages/fr/about.astro`, the `astro build` command will generate `dist/fr/about.html` with the same content as the `dist/en/about.html` page.
2674
+ Your site visitor will see the English version of the page at `https://example.com/fr/about/` and will not be redirected.
2675
+
2676
+ ```js
2677
+ //astro.config.mjs
2678
+ import { defineConfig } from 'astro/config';
2679
+
2680
+ export default defineConfig({
2681
+ i18n: {
2682
+ defaultLocale: "en",
2683
+ locales: ["en", "fr"],
2684
+ routing: {
2685
+ prefixDefaultLocale: false,
2686
+ fallbackType: "rewrite",
2687
+ },
2688
+ fallback: {
2689
+ fr: "en",
2690
+ }
2691
+ },
2692
+ });
2693
+ ```
2694
+
2695
+ ### i18n.domains
2696
+
2697
+ <p>
2698
+
2699
+ **Type:** `Record<string, string>`<br />
2700
+ **Default:** `{}`<br />
2701
+ <Since v="4.3.0" />
2702
+ </p>
2703
+
2704
+ Configures the URL pattern of one or more supported languages to use a custom domain (or sub-domain).
2705
+
2706
+ When a locale is mapped to a domain, a `/[locale]/` path prefix will not be used.
2707
+ However, localized folders within `src/pages/` are still required, including for your configured `defaultLocale`.
2708
+
2709
+ Any other locale not configured will default to a localized path-based URL according to your `prefixDefaultLocale` strategy (e.g. `https://example.com/[locale]/blog`).
2710
+
2711
+ ```js
2712
+ //astro.config.mjs
2713
+ export default defineConfig({
2714
+ site: "https://example.com",
2715
+ output: "server", // required, with no prerendered pages
2716
+ adapter: node({
2717
+ mode: 'standalone',
2718
+ }),
2719
+ i18n: {
2720
+ defaultLocale: "en",
2721
+ locales: ["en", "fr", "pt-br", "es"],
2722
+ routing: {
2723
+ prefixDefaultLocale: false,
2724
+ },
2725
+ domains: {
2726
+ fr: "https://fr.example.com",
2727
+ es: "https://example.es"
2728
+ }
2729
+ },
2730
+ });
2731
+ ```
2732
+
2733
+ Both page routes built and URLs returned by the `astro:i18n` helper functions [`getAbsoluteLocaleUrl()`](/en/reference/modules/astro-i18n/#getabsolutelocaleurl) and [`getAbsoluteLocaleUrlList()`](/en/reference/modules/astro-i18n/#getabsolutelocaleurllist) will use the options set in `i18n.domains`.
2734
+
2735
+ See the [Internationalization Guide](/en/guides/internationalization/#domains) for more details, including the limitations of this feature.
2736
+
2737
+ ## env
2738
+
2739
+ <p>
2740
+
2741
+ **Type:** `object`<br />
2742
+ **Default:** `{}`<br />
2743
+ <Since v="5.0.0" />
2744
+ </p>
2745
+
2746
+ Configuration options for type-safe environment variables.
2747
+
2748
+ See our guide for more information on [environment variables in Astro](/en/guides/environment-variables/).
2749
+
2750
+ ### env.schema
2751
+
2752
+ <p>
2753
+
2754
+ **Type:** `EnvSchema`<br />
2755
+ **Default:** `{}`<br />
2756
+ <Since v="5.0.0" />
2757
+ </p>
2758
+
2759
+ Defines environment variables to be enforced by Zod validation and for which TypeScript support (e.g. autocompletion, type-safety) is available. Each key corresponds to the variable name and the value to the data type and validations [defined with `envField`](/en/reference/modules/astro-config/#envfield).
2760
+
2761
+ Four data types are supported: string, number, enumeration, and boolean. Each type requires a `context` (client or server), an `access` level (public or secret), and additional validations, such as a `default` value and an indication of whether the variable is `optional` (defaults to `false`).
2762
+
2763
+ ```js
2764
+ // astro.config.mjs
2765
+ import { defineConfig, envField } from "astro/config"
2766
+
2767
+ export default defineConfig({
2768
+ env: {
2769
+ schema: {
2770
+ API_URL: envField.string({ context: "client", access: "public", optional: true }),
2771
+ PORT: envField.number({ context: "server", access: "public", default: 4321 }),
2772
+ API_SECRET: envField.string({ context: "server", access: "secret" }),
2773
+ }
2774
+ }
2775
+ });
2776
+ ```
2777
+
2778
+ ### env.validateSecrets
2779
+
2780
+ <p>
2781
+
2782
+ **Type:** `boolean`<br />
2783
+ **Default:** `false`<br />
2784
+ <Since v="5.0.0" />
2785
+ </p>
2786
+
2787
+ Whether or not to validate secrets on the server when starting the dev server or running a build.
2788
+
2789
+ By default, only public variables are validated on the server when starting the dev server or a build, and private variables are validated at runtime only. If enabled, private variables will also be checked on start. This is useful in some continuous integration (CI) pipelines to make sure all your secrets are correctly set before deploying.
2790
+
2791
+ ```js
2792
+ // astro.config.mjs
2793
+ import { defineConfig, envField } from "astro/config"
2794
+
2795
+ export default defineConfig({
2796
+ env: {
2797
+ schema: {
2798
+ // ...
2799
+ },
2800
+ validateSecrets: true
2801
+ }
2802
+ });
2803
+ ```
2804
+
2805
+ ## fonts
2806
+
2807
+ <p>
2808
+
2809
+ **Type:** `Array<FontFamily>`<br />
2810
+ **Default:** `[]`<br />
2811
+ <Since v="6.0.0" />
2812
+ </p>
2813
+
2814
+ Configures fonts and allows you to specify some customization options on a per-font basis.
2815
+
2816
+ See our guide for more information on [using custom fonts in Astro](/en/guides/fonts/).
2817
+
2818
+ ### font.provider
2819
+
2820
+ <p>
2821
+
2822
+ **Type:** `FontProvider`<br />
2823
+ <Since v="6.0.0" />
2824
+ </p>
2825
+
2826
+ The source of your font files. You can use a [built-in provider](/en/reference/font-provider-reference/#built-in-providers) or write your own [custom provider](/en/reference/font-provider-reference/#building-a-font-provider):
2827
+
2828
+ ```js
2829
+ // astro.config.mjs
2830
+ import { defineConfig, fontProviders } from "astro/config";
2831
+
2832
+ export default defineConfig({
2833
+ fonts: [{
2834
+ provider: fontProviders.google(),
2835
+ name: "Roboto",
2836
+ cssVariable: "--font-roboto"
2837
+ }]
2838
+ });
2839
+ ```
2840
+
2841
+ ### font.name
2842
+
2843
+ <p>
2844
+
2845
+ **Type:** `string`<br />
2846
+ <Since v="6.0.0" />
2847
+ </p>
2848
+
2849
+ The font family name, as identified by your font provider:
2850
+
2851
+ ```js
2852
+ name: "Roboto"
2853
+ ```
2854
+
2855
+ ### font.cssVariable
2856
+
2857
+ <p>
2858
+
2859
+ **Type:** `string`<br />
2860
+ <Since v="6.0.0" />
2861
+ </p>
2862
+
2863
+ A valid [ident](https://developer.mozilla.org/en-US/docs/Web/CSS/ident) of your choosing in the form of a CSS variable (i.e. starting with `--`):
2864
+
2865
+ ```js
2866
+ cssVariable: "--font-roboto"
2867
+ ```
2868
+
2869
+ ### font.fallbacks
2870
+
2871
+ <p>
2872
+
2873
+ **Type:** `Array<string>`<br />
2874
+ **Default:** `["sans-serif"]`<br />
2875
+ <Since v="6.0.0" />
2876
+ </p>
2877
+
2878
+ An array of fonts to use when your chosen font is unavailable, or loading. Fallback fonts will be chosen in the order listed. The first available font will be used:
2879
+
2880
+ ```js
2881
+ fallbacks: ["CustomFont", "serif"]
2882
+ ```
2883
+
2884
+ To disable fallback fonts completely, configure an empty array:
2885
+
2886
+ ```js
2887
+ fallbacks: []
2888
+ ```
2889
+
2890
+ Specify at least a [generic family name](https://developer.mozilla.org/en-US/docs/Web/CSS/font-family#generic-name) matching the intended appearance of your font. Astro will then attempt to generate [optimized fallbacks](https://developer.chrome.com/blog/font-fallbacks) using font metrics. To disable this optimization, set `optimizedFallbacks` to false.
2891
+
2892
+ ### font.optimizedFallbacks
2893
+
2894
+ <p>
2895
+
2896
+ **Type:** `boolean`<br />
2897
+ **Default:** `true`<br />
2898
+ <Since v="6.0.0" />
2899
+ </p>
2900
+
2901
+ Whether or not to enable Astro's default optimization when generating fallback fonts. You may disable this default optimization to have full control over how [`fallbacks`](#fontfallbacks) are generated:
2902
+
2903
+ ```js
2904
+ optimizedFallbacks: false
2905
+ ```
2906
+
2907
+ ### font.weights
2908
+
2909
+ <p>
2910
+
2911
+ **Type:** `Array<(number|string)>`<br />
2912
+ **Default:** `[400]`<br />
2913
+ <Since v="6.0.0" />
2914
+ </p>
2915
+
2916
+ An array of [font weights](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight). If no value is specified in your configuration, only weight `400` is included by default to prevent unnecessary downloads. You will need to include this property to access any other font weights:
2917
+
2918
+ ```js
2919
+ weights: [200, "400", "bold"]
2920
+ ```
2921
+
2922
+ If the associated font is a [variable font](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_fonts/Variable_fonts_guide), you can specify a range of weights:
2923
+
2924
+ ```js
2925
+ weights: ["100 900"]
2926
+ ```
2927
+
2928
+ ### font.styles
2929
+
2930
+ <p>
2931
+
2932
+ **Type:** `Array<("normal"|"italic"|"oblique")>`<br />
2933
+ **Default:** `["normal", "italic"]`<br />
2934
+ <Since v="6.0.0" />
2935
+ </p>
2936
+
2937
+ An array of [font styles](https://developer.mozilla.org/en-US/docs/Web/CSS/font-style):
2938
+
2939
+ ```js
2940
+ styles: ["normal", "oblique"]
2941
+ ```
2942
+
2943
+ ### font.subsets
2944
+
2945
+ <p>
2946
+
2947
+ **Type:** `Array<string>`<br />
2948
+ **Default:** `["latin"]`<br />
2949
+ <Since v="6.0.0" />
2950
+ </p>
2951
+
2952
+ Defines a list of [font subsets](https://knaap.dev/posts/font-subsetting/) to preload.
2953
+
2954
+ ```js
2955
+ subsets: ["latin"]
2956
+ ```
2957
+
2958
+ ### font.formats
2959
+
2960
+ <p>
2961
+
2962
+ **Type:** `Array<("woff2"|"woff"|"otf"|"ttf"|"eot")>`<br />
2963
+ **Default:** `["woff2"]`<br />
2964
+ <Since v="6.0.0" />
2965
+ </p>
2966
+
2967
+ An array of [font formats](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@font-face/src#font_formats):
2968
+
2969
+ ```js
2970
+ formats: ["woff2", "woff"]
2971
+ ```
2972
+
2973
+ ### font.options
2974
+
2975
+ <p>
2976
+
2977
+ **Type:** `Record<string, any>`<br />
2978
+ <Since v="6.0.0" />
2979
+ </p>
2980
+
2981
+ An object to pass provider specific options. It is typed automatically based on the font family [provider](#fontprovider):
2982
+
2983
+ ```js
2984
+ options: {
2985
+ experimental: {
2986
+ glyphs: ["a"]
2987
+ }
2988
+ }
2989
+ ```
2990
+
2991
+ ### font.display
2992
+
2993
+ <p>
2994
+
2995
+ **Type:** `"auto" | "block" | "swap" | "fallback" | "optional"`<br />
2996
+ **Default:** `"swap"`<br />
2997
+ <Since v="6.0.0" />
2998
+ </p>
2999
+
3000
+ Defines [how a font displays](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display) based on when it is downloaded and ready for use:
3001
+
3002
+ ```js
3003
+ display: "block"
3004
+ ```
3005
+
3006
+ ### font.unicodeRange
3007
+
3008
+ <p>
3009
+
3010
+ **Type:** `Array<string>`<br />
3011
+ **Default:** `undefined`<br />
3012
+ <Since v="6.0.0" />
3013
+ </p>
3014
+
3015
+ Determines when a font must be downloaded and used based on a specific [range of unicode characters](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/unicode-range). If a character on the page matches the configured range, the browser will download the font and all characters will be available for use on the page. To configure a subset of characters preloaded for a single font, see the [subsets](#fontsubsets) property instead.
3016
+
3017
+ This can be useful for localization to avoid unnecessary font downloads when a specific part of your website uses a different alphabet and will be displayed with a separate font. For example, a website that offers both English and Japanese versions can prevent the browser from downloading the Japanese font on English versions of the page that do not contain any of the Japanese characters provided in `unicodeRange`.
3018
+
3019
+ ```js
3020
+ unicodeRange: ["U+26"]
3021
+ ```
3022
+
3023
+ ### font.stretch
3024
+
3025
+ <p>
3026
+
3027
+ **Type:** `string`<br />
3028
+ **Default:** `undefined`<br />
3029
+ <Since v="6.0.0" />
3030
+ </p>
3031
+
3032
+ A [font stretch](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-stretch):
3033
+
3034
+ ```js
3035
+ stretch: "condensed"
3036
+ ```
3037
+
3038
+ ### font.featureSettings
3039
+
3040
+ <p>
3041
+
3042
+ **Type:** `string`<br />
3043
+ **Default:** `undefined`<br />
3044
+ <Since v="6.0.0" />
3045
+ </p>
3046
+
3047
+ Controls the [typographic font features](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-feature-settings) (e.g. ligatures, small caps, or swashes):
3048
+
3049
+ ```js
3050
+ featureSettings: "'smcp' 2"
3051
+ ```
3052
+
3053
+ ### font.variationSettings
3054
+
3055
+ <p>
3056
+
3057
+ **Type:** `string`<br />
3058
+ **Default:** `undefined`<br />
3059
+ <Since v="6.0.0" />
3060
+ </p>
3061
+
3062
+ Font [variation settings](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-variation-settings):
3063
+
3064
+ ```js
3065
+ variationSettings: "'xhgt' 0.7"
3066
+ ```
3067
+
3068
+ ## cache
3069
+
3070
+ <p>
3071
+
3072
+ **Type:** `object`<br />
3073
+ **Default:** `undefined`<br />
3074
+ <Since v="7.0.0" />
3075
+ </p>
3076
+
3077
+ Enables route caching for SSR responses. Provides a platform-agnostic API
3078
+ for caching rendered pages and API responses, with pluggable providers
3079
+ that adapters can configure automatically.
3080
+
3081
+ ```js
3082
+ // astro.config.mjs
3083
+ import { defineConfig, memoryCache } from 'astro/config';
3084
+
3085
+ export default defineConfig({
3086
+ cache: {
3087
+ provider: memoryCache(),
3088
+ },
3089
+ routeRules: {
3090
+ '/blog/[...path]': { maxAge: 300, swr: 60 },
3091
+ },
3092
+ });
3093
+ ```
3094
+
3095
+ Use `Astro.cache.set()` in routes and `context.cache.set()` in middleware
3096
+ or API routes to control caching per-request.
3097
+
3098
+ ### cache.provider
3099
+
3100
+ <p>
3101
+
3102
+ **Type:** `CacheProviderConfig`<br />
3103
+ <Since v="7.0.0" />
3104
+ </p>
3105
+
3106
+ A provider that controls how responses are cached.
3107
+
3108
+ Use the provider's config function to get type-safe configuration:
3109
+
3110
+ ```js
3111
+ // astro.config.mjs
3112
+ import { defineConfig, memoryCache } from 'astro/config';
3113
+
3114
+ export default defineConfig({
3115
+ cache: { provider: memoryCache() },
3116
+ });
3117
+ ```
3118
+
3119
+ ## routeRules
3120
+
3121
+ <p>
3122
+
3123
+ **Type:** `Record<string, RouteRule>`<br />
3124
+ **Default:** `undefined`<br />
3125
+ <Since v="7.0.0" />
3126
+ </p>
3127
+
3128
+ Route patterns mapped to cache rules.
3129
+ Uses the same `[param]` and `[...rest]` syntax as [file-based routing](/en/guides/routing/#route-priority-order).
3130
+ Use a `[...rest]` parameter to match a group of routes:
3131
+
3132
+ ```js
3133
+ // astro.config.mjs
3134
+ import { defineConfig, memoryCache } from 'astro/config';
3135
+
3136
+ export default defineConfig({
3137
+ cache: { provider: memoryCache() },
3138
+ routeRules: {
3139
+ '/api/[...path]': { swr: 600 },
3140
+ '/products/[...slug]': { maxAge: 3600, tags: ['products'] },
3141
+ },
3142
+ });
3143
+ ```
3144
+