···11-# `starlight-download-link`
11+# `starlight-save-file-component`
2233Quickly display a link to some download asset on your Starlight site.
4455## Package
6677-If you are looking for the Starlight component package, you can find it in the [`packages/starlight-download-link/`](/packages/starlight-download-link/) directory.
77+If you are looking for the Starlight component package, you can find it in the [`packages/starlight-save-file-component/`](/packages/starlight-save-file-component/) directory.
8899## Project structure
10101111-This project uses pnpm workspaces to develop a single Starlight component from the `packages/starlight-download-link/` directory. A Starlight documentation site is also available in the `docs/` directory that is also used for testing and demonstrating the Starlight component.
1111+This project uses pnpm workspaces to develop a single Starlight component from the `packages/starlight-save-file-component/` directory. A Starlight documentation site is also available in the `docs/` directory that is also used for testing and demonstrating the Starlight component.
12121313## License
1414
···181819191. Install the Starlight Package Managers component using your favorite package manager:
20202121- <PackageManagers pkg="starlight-download-link" />
2121+ <PackageManagers pkg="starlight-save-file-component" />
222223232. Use the component in any MDX files of your Starlight documentation site.
24242525 ```mdx title="src/content/docs/example.mdx"
2626- import { DownloadLink } from "starlight-download-link";
2626+ import { SaveFile } from "starlight-save-file-component";
27272828- <DownloadLink title="Example PDF" href="../../../public/example.pdf" />
2828+ <SaveFile title="Example PDF" href="../../../public/example.pdf" />
2929 ```
303031313. [Start the development server](https://starlight.astro.build/getting-started/#start-the-development-server) to preview the component.
+9-8
docs/src/content/docs/index.mdx
···11---
22-title: Welcome to Starlight
33-description: Get started building your docs site with Starlight.
22+title: Starlight Save File Component
33+description: Quickly display a link to some download asset on your Starlight site.
44template: splash
55hero:
66- tagline: Congrats on setting up a new Starlight project!
66+ tagline: Quickly display a link to some download asset on your Starlight site.
77 image:
88- file: ../../assets/houston.webp
88+ dark: ../../assets/big-logo-dark.png
99+ light: ../../assets/big-logo-light.png
910 actions:
1010- - text: Example Guide
1111+ - text: Get started
1112 link: /getting-started/
1213 icon: right-arrow
1313- - text: Read the Starlight docs
1414- link: https://starlight.astro.build
1515- icon: external
1414+ - text: Usage guide
1515+ link: /usage/
1616+ icon: right-arrow
1617 variant: minimal
1718---
1819
+29-29
docs/src/content/docs/usage.mdx
···44---
5566import { Preview } from '@hideoo/starlight-plugins-docs-components'
77-import { DownloadLink } from "starlight-download-link";
77+import { SaveFile } from "starlight-save-file-component";
88import { CardGrid } from '@astrojs/starlight/components';
991010-To display a link to a downloadable asset, use the `<DownloadLink>` component.
1010+To display a link to a downloadable asset, use the `<SaveFile>` component.
11111212<Preview>
13131414-<DownloadLink slot="preview" title="Example PDF" href="../../../public/example.pdf" />
1414+<SaveFile slot="preview" title="Example PDF" href="../../../public/example.pdf" />
15151616</Preview>
17171818## Import
19192020```tsx
2121-import { DownloadLink } from "starlight-download-link";
2121+import { SaveFile } from "starlight-save-file-component";
2222```
23232424## Usage
25252626-Display a downloadable asset using the `<DownloadLink>` component.
2727-Each `<DownloadLink>` requires a [`title`](#title) and an [`href`](#href) attribute.
2626+Display a downloadable asset using the `<SaveFile>` component.
2727+Each `<SaveFile>` requires a [`title`](#title) and an [`href`](#href) attribute.
28282929<Preview>
30303131```mdx
3232-import { DownloadLink } from "starlight-download-link";
3232+import { SaveFile } from "starlight-save-file-component";
33333434-<DownloadLink title="Example PDF" href="../../../public/example.pdf" />
3434+<SaveFile title="Example PDF" href="../../../public/example.pdf" />
3535```
36363737<Fragment slot="markdoc">
38383939```markdoc
4040-{% downloadlink title="Example PDF" href="../../../public/example.pdf" /%}
4040+{% SaveFile title="Example PDF" href="../../../public/example.pdf" /%}
4141```
42424343</Fragment>
44444545-<DownloadLink slot="preview" title="Example PDF" href="../../../public/example.pdf" />
4545+<SaveFile slot="preview" title="Example PDF" href="../../../public/example.pdf" />
46464747</Preview>
48484949-### Add a download description
4949+### Add a description to the save file component
50505151-Add a short description to a download link using the [`description`](#description) attribute.
5151+Add a short description to the component using the [`description`](#description) attribute.
52525353<Preview>
54545555```mdx {6}
5656-import { DownloadLink } from "starlight-download-link";
5656+import { SaveFile } from "starlight-save-file-component";
57575858-<DownloadLink
5858+<SaveFile
5959 title="Example PDF"
6060 href="../../../public/example.pdf"
6161 description="A sample PDF file."
···6565<Fragment slot="markdoc">
66666767```markdoc {4}
6868-{% downloadlink
6868+{% SaveFile
6969 title="Example PDF"
7070 href="../../../public/example.pdf"
7171 description="A sample PDF file." /%}
···73737474</Fragment>
75757676-<DownloadLink
7676+<SaveFile
7777 slot="preview"
7878 title="Example PDF"
7979 href="../../../public/example.pdf"
···82828383</Preview>
84848585-### Group download links
8585+### Group save file components
86868787-Display multiple download links side-by-side when there’s enough space by grouping them using the [`<CardGrid>`](https://starlight.astro.build/components/card-grids/) component.
8787+Display multiple save file components side-by-side when there’s enough space by grouping them using the [`<CardGrid>`](https://starlight.astro.build/components/card-grids/) component.
8888See the [Starlight documentation guide on “Group link cards”](https://starlight.astro.build/components/card-grids/#group-link-cards) for an example.
89899090<Preview>
91919292```mdx {4,7}
9393import { CardGrid } from '@astrojs/starlight/components';
9494-import { DownloadLink } from "starlight-download-link";
9494+import { SaveFile } from "starlight-save-file-component";
95959696<CardGrid>
9797- <DownloadLink title="Example PDF" href="../../../public/example.pdf" />
9898- <DownloadLink title="Example PDF 2" href="../../../public/example.pdf" />
9797+ <SaveFile title="Example PDF" href="../../../public/example.pdf" />
9898+ <SaveFile title="Example PDF 2" href="../../../public/example.pdf" />
9999</CardGrid>
100100```
101101···103103104104```markdoc {1,5}
105105{% cardgrid %}
106106-{% downloadlink title="Example PDF" href="../../../public/example.pdf" /%}
106106+{% SaveFile title="Example PDF" href="../../../public/example.pdf" /%}
107107108108-{% downloadlink title="Example PDF 2" href="../../../public/example.pdf" /%}
108108+{% SaveFile title="Example PDF 2" href="../../../public/example.pdf" /%}
109109{% /cardgrid %}
110110```
111111112112</Fragment>
113113114114<CardGrid slot="preview">
115115- <DownloadLink title="Example PDF" href="../../../public/example.pdf" />
116116- <DownloadLink title="Example PDF 2" href="../../../public/example.pdf" />
115115+ <SaveFile title="Example PDF" href="../../../public/example.pdf" />
116116+ <SaveFile title="Example PDF 2" href="../../../public/example.pdf" />
117117</CardGrid>
118118119119</Preview>
120120121121-## `<DownloadLink>` Props
121121+## `<SaveFile>` Props
122122123123-**Implementation:** [`DownloadLink.astro`](https://github.com/trueberryless-org/starlight-download-link/blob/main/packages/starlight-download-link/components/DownloadLink.astro)
123123+**Implementation:** [`SaveFile.astro`](https://github.com/trueberryless-org/starlight-save-file-component/blob/main/packages/starlight-save-file-component/components/SaveFile.astro)
124124125125-The `<DownloadLink>` component accepts the following props, as well as all other [`<a>` element attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a):
125125+The `<SaveFile>` component accepts the following props, as well as all other [`<a>` element attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a):
126126127127### `title`
128128129129**required**
130130**type:** `string`
131131132132-The title of the download link to display.
132132+The title of the save file component to display.
133133134134### `href`
135135