The web framework that scales with you — Build fast content sites, powerful web applications, dynamic server APIs, and everything in-between ️ Star to support our work!
Find a file
Matthew Phillips 57f8d14c02
Redirects (#7067)
* Redirects spike

* Allow redirects in static mode

* Support in Netlify as well

* Adding a changeset

* Rename file

* Fix build problem

* Refactor to be more modular

* Fix location ref

* Late test should only run in SSR

* Support redirects in Netlify SSR configuration (#7167)

* Implement support for dynamic routes in redirects (#7173)

* Implement support for dynamic routes in redirects

* Remove the .only

* No need to special-case redirects in static build

* Implement support for redirects config in the Vercel adapter (#7182)

* Implement support for redirects config in the Vercel adapter

* Remove unused condition

* Move to a internal helper package

* Add support for the object notation in redirects

* Use status 308 for non-GET redirects (#7186)

* Implement redirects in Cloudflare (#7198)

* Implement redirects in Cloudflare

* Fix build

* Update tests b/c of new ordering

* Debug issue

* Use posix.join

* Update packages/underscore-redirects/package.json

Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>

* Update based on review comments

* Update broken test

---------

Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>

* Test that redirects can come from middleware (#7213)

* Test that redirects can come from middleware

* Allow non-promise returns for middleware

* Implement priority (#7210)

* Refactor

* Fix netlify test ordering

* Fix ordering again

* Redirects: Allow preventing the output of the static HTML file (#7245)

* Do a simple push for priority

* Adding changesets

* Put the implementation behind a flag.

* Self review

* Update .changeset/chatty-actors-stare.md

Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>

* Update packages/astro/src/@types/astro.ts

Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>

* Update packages/astro/src/@types/astro.ts

Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>

* Update packages/astro/src/@types/astro.ts

Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>

* Update packages/astro/src/@types/astro.ts

Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>

* Update docs on dynamic restrictions.

* Update packages/astro/src/@types/astro.ts

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* Update packages/astro/src/@types/astro.ts

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* Code review changes

* Document netlify static adapter

* Update packages/astro/src/@types/astro.ts

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* Slight reword

* Update .changeset/twenty-suns-vanish.md

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

* Add a note about public/_redirects file

* Update packages/astro/src/@types/astro.ts

Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>

---------

Co-authored-by: Emanuele Stoppa <my.burning@gmail.com>
Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca>
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
2023-06-05 09:03:20 -04:00
.changeset Redirects (#7067) 2023-06-05 09:03:20 -04:00
.devcontainer Fix marketing typo by just removing extra info (#6410) 2023-03-02 15:47:13 -06:00
.github Fix duplicate semver minor blocks (#7269) 2023-06-01 13:21:55 -05:00
.gitpod Gitpod - fix pnpm version error (#4120) 2022-08-02 11:09:16 -05:00
.vscode update prettier width (#2968) 2022-04-02 14:15:41 -06:00
benchmark [ci] release (#6914) 2023-04-27 22:12:14 +08:00
examples Markdoc asset bleed, second try (#7185) 2023-05-31 19:18:07 -04:00
packages Redirects (#7067) 2023-06-05 09:03:20 -04:00
patches Fix out-of-date example dependencies (#7248) 2023-05-30 19:51:09 -04:00
scripts Run example check in parallel with 5 at most (#7275) 2023-06-02 21:14:44 +08:00
.Dockerfile Add a Github Codespace Config based on gitpod dockerfile (#4185) 2022-08-08 12:22:32 -05:00
.editorconfig Use accessible indentation (#2253) 2021-12-22 16:11:05 -05:00
.eslintignore Enables eslint on the full repo and adds a rule for no only() tests (#3659) 2022-06-22 15:59:49 +00:00
.eslintrc.cjs Refactor benchmark script (#6376) 2023-03-01 08:46:06 +00:00
.git-blame-ignore-revs Ignore big formatting commit (#3870) 2022-07-08 15:31:10 -05:00
.gitignore Upgrade turbo (#6911) 2023-04-27 11:39:15 +08:00
.gitpod.yml fix: always get latest pnpm (#4571) 2022-08-31 11:13:06 -05:00
.npmrc Handle compiler breaking change (#5803) 2023-01-12 22:46:56 +08:00
.nvmrc Update .nvmrc to match new CI baseline (#5784) 2023-01-06 12:49:08 -05:00
.prettierignore .prettierignore: update comment; (#5177) 2022-10-24 10:32:31 -03:00
.prettierrc.js Fix out-of-date example dependencies (#7248) 2023-05-30 19:51:09 -04:00
CONTRIBUTING.md docs: improve CONTRIBUTING.md (#6867) 2023-04-18 16:44:38 +02:00
LICENSE add vite to license 2022-04-24 16:42:39 -07:00
package.json Fix out-of-date example dependencies (#7248) 2023-05-30 19:51:09 -04:00
pnpm-lock.yaml Redirects (#7067) 2023-06-05 09:03:20 -04:00
pnpm-workspace.yaml Upgrade turbo (#6911) 2023-04-27 11:39:15 +08:00
README.md Update README.md 2023-03-21 10:09:12 -05:00
SECURITY.md [ci] format 2022-08-08 17:12:48 +00:00
SECURITY_CONTACTS Changes required for a Passing grade from OpenSSF Best Practices (#3718) 2022-08-08 12:11:00 -05:00
STYLE_GUIDE.md Move from yarn to pnpm (#2455) 2022-03-08 15:46:11 -06:00
tsconfig.base.json feat(all): Migrate to TypeScript 5.0 (#6579) 2023-03-20 17:02:07 +01:00
tsconfig.json chore: add empty tsconfig to prevent TypeScript from crawling (#4937) 2022-09-30 16:02:39 -05:00
turbo.json Upgrade turbo (#6911) 2023-04-27 11:39:15 +08:00

Build the web you want


Astro is a website build tool for the modern web —
powerful developer experience meets lightweight output.

Install

The recommended way to install the latest version of Astro is by running the command below:

npm create astro@latest

You can also install Astro manually by running this command instead:

npm install --save-dev astro

Looking for help? Start with our Getting Started guide.

Looking for quick examples? Open a starter project right in your browser.

Documentation

Visit our official documentation.

Support

Having trouble? Get help in the official Astro Discord.

Contributing

New contributors welcome! Check out our Contributors Guide for help getting started.

Join us on Discord to meet other maintainers. We'll help you get your first contribution in no time!

Directory

Package Release Notes
astro astro version
create-astro create-astro version
@astrojs/react astro version
@astrojs/preact astro version
@astrojs/solid-js astro version
@astrojs/svelte astro version
@astrojs/vue astro version
@astrojs/lit astro version
@astrojs/deno astro version
@astrojs/netlify astro version
@astrojs/node astro version
@astrojs/vercel astro version
@astrojs/cloudflare astro version
@astrojs/partytown astro version
@astrojs/sitemap astro version
@astrojs/tailwind astro version
@astrojs/turbolinks astro version
@astrojs/alpinejs astro version
@astrojs/image astro version
@astrojs/mdx astro version
@astrojs/prefetch astro version

CII Best Practices

Several official projects are maintained outside of this repo:

Project Repository
@astrojs/compiler withastro/compiler
Astro Language Tools withastro/language-tools

Sponsors

Astro is generously supported by Netlify, Storyblok, and several other amazing organizations.

❤️ Sponsor Astro! ❤️

Astro's sponsors.