-
-
Notifications
You must be signed in to change notification settings - Fork 614
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
Showing
67 changed files
with
855 additions
and
215 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@astrojs/starlight': patch | ||
--- | ||
|
||
Add Slack social link icon |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@astrojs/starlight": minor | ||
--- | ||
|
||
Add i18n support for default aside labels |
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 |
---|---|---|
|
@@ -16,3 +16,6 @@ pnpm-debug.log* | |
|
||
# Vitest | ||
__coverage__/ | ||
|
||
# Vercel output | ||
.vercel |
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 |
---|---|---|
|
@@ -10,4 +10,7 @@ | |
.changeset | ||
|
||
# Files | ||
pnpm-lock.yaml | ||
pnpm-lock.yaml | ||
|
||
# Test snapshots | ||
**/__tests__/**/snapshots |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"$schema": "https://openapi.vercel.sh/vercel.json", | ||
|
||
"routes": [ | ||
{ | ||
"src": "^/_astro/(.*)$", | ||
"headers": { "cache-control": "public, max-age=31536000, immutable" }, | ||
"continue": true | ||
}, | ||
|
||
{ "src": "/(ph$|ph/)(.*)", "dest": "https://astro-houston-ph.pages.dev/ph/$2" }, | ||
|
||
{ "src": "(.*)/([^./]+)$", "dest": "$1/$2/", "status": 301 }, | ||
{ "src": "(.*)/index.html$", "dest": "$1/", "status": 301 }, | ||
|
||
{ "handle": "filesystem" }, | ||
|
||
{ "src": "/zh/(.*)", "dest": "/zh-cn/$1", "status": 301 }, | ||
|
||
{ "src": "/(?<lang>[^/]*)/(.*)", "dest": "/$lang/404/", "status": 404 } | ||
] | ||
} |
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { describe, expect, test } from 'vitest'; | ||
import { getSitemapConfig, starlightSitemap } from '../../integrations/sitemap'; | ||
import type { StarlightConfig } from '../../types'; | ||
import { StarlightConfigSchema, type StarlightUserConfig } from '../../utils/user-config'; | ||
|
||
describe('starlightSitemap', () => { | ||
test('returns @astrojs/sitemap integration', () => { | ||
const integration = starlightSitemap({} as StarlightConfig); | ||
expect(integration.name).toBe('@astrojs/sitemap'); | ||
}); | ||
}); | ||
|
||
describe('getSitemapConfig', () => { | ||
test('configures i18n config', () => { | ||
const config = getSitemapConfig( | ||
StarlightConfigSchema.parse({ | ||
title: 'i18n test', | ||
locales: { root: { lang: 'en', label: 'English' }, fr: { label: 'French' } }, | ||
} satisfies StarlightUserConfig) | ||
); | ||
expect(config).toMatchInlineSnapshot(` | ||
{ | ||
"i18n": { | ||
"defaultLocale": "root", | ||
"locales": { | ||
"fr": "fr", | ||
"root": "en", | ||
}, | ||
}, | ||
} | ||
`); | ||
}); | ||
|
||
test('no config for monolingual sites', () => { | ||
const config = getSitemapConfig( | ||
StarlightConfigSchema.parse({ title: 'i18n test' } satisfies StarlightUserConfig) | ||
); | ||
expect(config).toMatchInlineSnapshot('{}'); | ||
}); | ||
}); |
Oops, something went wrong.