base
The path below the domain the whole site is served at. It is Astro’s own
option, and can be set here or in astro.config.
| Type | Default |
|---|---|
string |
none |
Use cases
A project page on GitHub Pages
site: 'https://me.github.io',
base: '/my-repo',
Every page, asset and link moves below /my-repo. Links written by file need
no change, and so do the paths of nav, logo and
homeLink: each gets the base.
Docs below a path of their own
base moves the whole site. To keep a landing page at / and the docs at
/docs, set routeBase instead.