-
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
edc99cb
commit 176cf5f
Showing
5 changed files
with
31 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,22 @@ | ||
--- | ||
import { getCollection, getEntry, render } from "astro:content"; | ||
import StarlightPage from "@astrojs/starlight/components/StarlightPage.astro"; | ||
import { getCollection, getEntry } from 'astro:content'; | ||
import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro'; | ||
export async function getStaticPaths() { | ||
const operators = await getCollection("operators"); | ||
const operators = await getCollection('operators'); | ||
return operators.map((operator) => ({ | ||
params: { operator: operator.data.slug }, | ||
})); | ||
} | ||
const operator = await getEntry("operators", Astro.params.operator); | ||
const operator = await getEntry('operators', Astro.params.operator); | ||
--- | ||
|
||
<meta http-equiv="refresh" content={`0;url=/operators/${operator.data.slug}`} /> | ||
<meta name="robots" content="noindex" /> | ||
<StarlightPage frontmatter={{...operator.data, pagefind: false}}> | ||
<meta http-equiv='refresh' content={`0;url=/operators/${operator.data.slug}`} /> | ||
<meta name='robots' content='noindex' /> | ||
<StarlightPage frontmatter={{ ...operator.data, pagefind: false }}> | ||
<!-- exclude this page from pagefind indexing --> | ||
<p>Redirecting to <a href="/operators/{operator.data.slug}">/operators/{operator.data.slug}</a></p> | ||
<p> | ||
Redirecting to <a href={`/operators/${operator.data.slug}`}>/operators/{operator.data.slug}</a> | ||
</p> | ||
</StarlightPage> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters