c5bb9e242e95c8f4904217d333a04376b0ee3808
This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@astrojs/mdx](https://docs.astro.build/en/guides/integrations-guide/mdx/) ([source](https://github.com/withastro/astro/tree/HEAD/packages/integrations/mdx)) | [`4.3.11` -> `4.3.12`](https://renovatebot.com/diffs/npm/@astrojs%2fmdx/4.3.11/4.3.12) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | | [astro](https://astro.build) ([source](https://github.com/withastro/astro/tree/HEAD/packages/astro)) | [`5.15.9` -> `5.16.0`](https://renovatebot.com/diffs/npm/astro/5.15.9/5.16.0) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>withastro/astro (@​astrojs/mdx)</summary> ### [`v4.3.12`](https://github.com/withastro/astro/blob/HEAD/packages/integrations/mdx/CHANGELOG.md#4312) [Compare Source](https://github.com/withastro/astro/compare/@astrojs/mdx@4.3.11...@astrojs/mdx@4.3.12) ##### Patch Changes - [#​14813](https://github.com/withastro/astro/pull/14813) [`e1dd377`](e1dd377398) Thanks [@​ematipico](https://github.com/ematipico)! - Removes `picocolors` as dependency in favor of the fork `piccolore`. </details> <details> <summary>withastro/astro (astro)</summary> ### [`v5.16.0`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#5160) [Compare Source](https://github.com/withastro/astro/compare/astro@5.15.9...astro@5.16.0) ##### Minor Changes - [#​13880](https://github.com/withastro/astro/pull/13880) [`1a2ed01`](1a2ed01c92) Thanks [@​azat-io](https://github.com/azat-io)! - Adds experimental SVGO optimization support for SVG assets Astro now supports automatic SVG optimization using SVGO during build time. This experimental feature helps reduce SVG file sizes while maintaining visual quality, improving your site's performance. To enable SVG optimization with default settings, add the following to your `astro.config.mjs`: ```js import { defineConfig } from 'astro/config'; export default defineConfig({ experimental: { svgo: true, }, }); ``` To customize optimization, pass a [SVGO configuration object](https://svgo.dev/docs/plugins/): ```js export default defineConfig({ experimental: { svgo: { plugins: [ 'preset-default', { name: 'removeViewBox', active: false, }, ], }, }, }); ``` For more information on enabling and using this feature in your project, see the [experimental SVG optimization docs](https://docs.astro.build/en/reference/experimental-flags/svg-optimization/). - [#​14810](https://github.com/withastro/astro/pull/14810) [`2e845fe`](2e845fe56d) Thanks [@​ascorbic](https://github.com/ascorbic)! - Adds a hint for code agents to use the `--yes` flag to skip prompts when running `astro add` - [#​14698](https://github.com/withastro/astro/pull/14698) [`f42ff9b`](f42ff9bd5b) Thanks [@​mauriciabad](https://github.com/mauriciabad)! - Adds the `ActionInputSchema` utility type to automatically infer the TypeScript type of an action's input based on its Zod schema For example, this type can be used to retrieve the input type of a form action: ```ts import { type ActionInputSchema, defineAction } from 'astro:actions'; import { z } from 'astro/zod'; const action = defineAction({ accept: 'form', input: z.object({ name: z.string() }), handler: ({ name }) => ({ message: `Welcome, ${name}!` }), }); type Schema = ActionInputSchema<typeof action>; // typeof z.object({ name: z.string() }) type Input = z.input<Schema>; // { name: string } ``` - [#​14574](https://github.com/withastro/astro/pull/14574) [`4356485`](4356485b0f) Thanks [@​jacobdalamb](https://github.com/jacobdalamb)! - Adds new CLI shortcuts available when running `astro preview`: - `o` + `enter`: open the site in your browser - `q` + `enter`: quit the preview - `h` + `enter`: print all available shortcuts ##### Patch Changes - [#​14813](https://github.com/withastro/astro/pull/14813) [`e1dd377`](e1dd377398) Thanks [@​ematipico](https://github.com/ematipico)! - Removes `picocolors` as dependency in favor of the fork `piccolore`. - [#​14609](https://github.com/withastro/astro/pull/14609) [`d774306`](d774306c51) Thanks [@​florian-lefebvre](https://github.com/florian-lefebvre)! - Improves `astro info` - [#​14796](https://github.com/withastro/astro/pull/14796) [`c29a785`](c29a785d57) Thanks [@​florian-lefebvre](https://github.com/florian-lefebvre)! - **BREAKING CHANGE to the experimental Fonts API only** Updates the default `subsets` to `["latin"]` Subsets have been a common source of confusion: they caused a lot of files to be downloaded by default. You now have to manually pick extra subsets. Review your Astro config and update subsets if you need, for example if you need greek characters: ```diff import { defineConfig, fontProviders } from "astro/config" export default defineConfig({ experimental: { fonts: [{ name: "Roboto", cssVariable: "--font-roboto", provider: fontProviders.google(), + subsets: ["latin", "greek"] }] } }) ``` </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi41LjAiLCJ1cGRhdGVkSW5WZXIiOiI0Mi41LjAiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbImF1dG9tZXJnZSIsImRlcGVuZGVuY3kiXX0=--> Reviewed-on: #91 Co-authored-by: Renovate Bot <renovate-bot@alexlebens.net> Co-committed-by: Renovate Bot <renovate-bot@alexlebens.net>
Starlight Starter Kit: Basics
pnpm create astro@latest -- --template starlight
🧑🚀 Seasoned astronaut? Delete this file. Have fun!
🚀 Project Structure
Inside of your Astro + Starlight project, you'll see the following folders and files:
.
├── public/
├── src/
│ ├── assets/
│ ├── content/
│ │ └── docs/
│ └── content.config.ts
├── astro.config.mjs
├── package.json
└── tsconfig.json
Starlight looks for .md or .mdx files in the src/content/docs/ directory. Each file is exposed as a route based on its file name.
Images can be added to src/assets/ and embedded in Markdown with a relative link.
Static assets, like favicons, can be placed in the public/ directory.
🧞 Commands
All commands are run from the root of the project, from a terminal:
| Command | Action |
|---|---|
pnpm install |
Installs dependencies |
pnpm dev |
Starts local dev server at localhost:4321 |
pnpm build |
Build your production site to ./dist/ |
pnpm preview |
Preview your build locally, before deploying |
pnpm astro ... |
Run CLI commands like astro add, astro check |
pnpm astro -- --help |
Get help using the Astro CLI |
👀 Want to learn more?
Check out Starlight’s docs, read the Astro documentation, or jump into the Astro Discord server.
Description
Languages
JavaScript
52.5%
MDX
23.5%
Dockerfile
18%
TypeScript
6%