This commit is contained in:
gzuuus
2025-07-17 23:54:28 +02:00
parent c081efa3a0
commit c8913d025d
27 changed files with 87 additions and 121 deletions

View File

@@ -118,7 +118,7 @@ This works particularly well for landing pages and you can see it in action on t
```md {5}
---
# src/content/docs/index.md
# src/content/docs/index
title: My Landing Page
template: splash
@@ -137,7 +137,7 @@ By default, `<h2>` and `<h3>` headings are included in the table of contents. Ch
```md {4-6}
---
# src/content/docs/example.md
# src/content/docs/example
title: Page with only H2s in the table of contents
tableOfContents:
minHeadingLevel: 2
@@ -171,7 +171,7 @@ Disable the table of contents entirely by setting the `tableOfContents` option t
```md {4}
---
# src/content/docs/example.md
# src/content/docs/example
title: Page without a table of contents
tableOfContents: false
---
@@ -268,15 +268,15 @@ export default defineConfig({
## Custom 404 page
Starlight sites display a simple 404 page by default.
You can customize this by adding a `404.md` (or `404.mdx`) file to your `src/content/docs/` directory:
You can customize this by adding a `404` (or `404.mdx`) file to your `src/content/docs/` directory:
<FileTree>
- src/
- content/
- docs/
- **404.md**
- index.md
- **404**
- index
- astro.config.mjs
</FileTree>
@@ -285,7 +285,7 @@ You can use all of Starlights page layout and customization techniques in you
```md {4,6-8}
---
# src/content/docs/404.md
# src/content/docs/404
title: '404'
template: splash
editUrl: false

View File

@@ -127,7 +127,7 @@ yarn dlx @astrojs/upgrade
</TabItem>
</Tabs>
See the [Starlight changelog](https://github.com/withastro/starlight/blob/main/packages/starlight/CHANGELOG.md) for a full list of the changes made in each release.
See the [Starlight changelog](https://github.com/withastro/starlight/blob/main/packages/starlight/CHANGELOG) for a full list of the changes made in each release.
## Troubleshooting Starlight

View File

@@ -84,12 +84,12 @@ This is useful if you have an existing Astro project and are unable to make any
Starlight is now configured and its time to add some content!
Create a `src/content/docs/` directory and start by adding an `index.md` file.
Create a `src/content/docs/` directory and start by adding an `index` file.
This will be the homepage of your new site:
```md
---
# src/content/docs/index.md
# src/content/docs/index
title: My docs
description: Learn more about my project in this docs site built with Starlight.
---
@@ -118,8 +118,8 @@ import { FileTree } from '@astrojs/starlight/components';
- content/
- docs/
- **guides/**
- guide.md
- index.md
- guide
- index
- pages/
- astro.config.mjs

View File

@@ -11,7 +11,7 @@ Starlight projects generally follow the same file and directory structure as oth
- `astro.config.mjs` — The Astro configuration file; includes the Starlight integration and configuration.
- `src/content.config.ts` — Content collections configuration file; adds Starlights frontmatter schemas to your project.
- `src/content/docs/` — Content files. Starlight turns each `.md`, `.mdx` or `.mdoc` file in this directory into a page on your site.
- `src/content/docs/` — Content files. Starlight turns each ``, `.mdx` or `.mdoc` file in this directory into a page on your site.
- `src/content/i18n/` (optional) — Translation data to support [internationalization](/guides/i18n/).
- `src/` — Other source code and files (components, styles, images, etc.) for your project.
- `public/` — Static assets (fonts, favicon, PDFs, etc.) that will not be processed by Astro.
@@ -36,8 +36,8 @@ import { FileTree } from '@astrojs/starlight/components';
- content/
- docs/
- guides/
- 01-getting-started.md
- 02-advanced.md
- 01-getting-started
- 02-advanced
- index.mdx
- content.config.ts
- astro.config.mjs

View File

@@ -17,7 +17,7 @@ No configuration is required to enable search. Build and deploy your site, then
To exclude a page from your search index, add [`pagefind: false`](/reference/frontmatter/#pagefind) to the pages frontmatter:
```md title="src/content/docs/not-indexed.md" ins={3}
```md title="src/content/docs/not-indexed" ins={3}
---
title: Content to hide from search
pagefind: false
@@ -30,7 +30,7 @@ Pagefind will ignore content inside an element with the [`data-pagefind-ignore`]
In the following example, the first paragraph will display in search results, but the contents of the `<div>` will not:
```md title="src/content/docs/partially-indexed.md" ins="data-pagefind-ignore"
```md title="src/content/docs/partially-indexed" ins="data-pagefind-ignore"
---
title: Partially indexed page
---