diff --git a/astro.config.ts b/astro.config.ts index ad4a04eecf5e1..f125b73520bf4 100644 --- a/astro.config.ts +++ b/astro.config.ts @@ -12,14 +12,9 @@ import { starlightPluginSmokeTest } from './config/plugins/smoke-test'; import { rehypeTasklistEnhancer } from './config/plugins/rehype-tasklist-enhancer'; import { remarkFallbackLang } from './config/plugins/remark-fallback-lang'; -/* https://docs.netlify.com/configure-builds/environment-variables/#read-only-variables */ -const NETLIFY_PREVIEW_SITE = process.env.CONTEXT !== 'production' && process.env.DEPLOY_PRIME_URL; - -const site = NETLIFY_PREVIEW_SITE || 'https://docs.astro.build/'; - // https://astro.build/config export default defineConfig({ - site, + site: 'https://docs.astro.build/', integrations: [ devServerFileWatcher([ './config/**', // Custom plugins and integrations @@ -31,6 +26,7 @@ export default defineConfig({ expressiveCode: { plugins: [pluginCollapsibleSections()], }, + customCss: ['./src/styles/custom.css'], components: { EditLink: './src/components/starlight/EditLink.astro', Hero: './src/components/starlight/Hero.astro', diff --git a/scripts/lint-linkcheck.ts b/scripts/lint-linkcheck.ts index e5753e2c188a7..586dedbdc493d 100644 --- a/scripts/lint-linkcheck.ts +++ b/scripts/lint-linkcheck.ts @@ -65,7 +65,7 @@ class LinkChecker { // Use our class to check for link issues const linkChecker = new LinkChecker({ - baseUrl: 'https://docs.astro.build', + baseUrl: 'https://v5.docs.astro.build', buildOutputDir: './dist', pageSourceDir: './src/content/docs', checks: [ diff --git a/src/content.config.ts b/src/content.config.ts index 0ca424130a6e6..0cc6e0a23e993 100644 --- a/src/content.config.ts +++ b/src/content.config.ts @@ -6,6 +6,11 @@ import { AstroDocsI18nSchema } from './content/i18n-schema'; import { logoKeys } from './data/logos'; export const baseSchema = z.object({ + // ADD A SITE-WIDE BANNER TO SHOW THESE ARE OLD DOCS. + banner: z.object({ content: z.string() }).default({ + content: + 'This is an unmaintained snapshot of the Astro v5 docs. View the latest docs.', + }), type: z.literal('base').optional().default('base'), i18nReady: z.boolean().default(false), githubURL: z.string().url().optional(), diff --git a/src/content/docs/es/upgrade-astro.mdx b/src/content/docs/es/upgrade-astro.mdx index ad6fac9033263..8f2a8e7461498 100644 --- a/src/content/docs/es/upgrade-astro.mdx +++ b/src/content/docs/es/upgrade-astro.mdx @@ -2,9 +2,6 @@ title: Actualizando Astro description: Conoce cómo actualizar Astro i18nReady: true -banner: - content: | - ¡Ya está aquí Astro v5! Aprenda a actualizar su sitio web --- import PackageManagerTabs from '~/components/tabs/PackageManagerTabs.astro'; import Version from '~/components/Version.astro'; diff --git a/src/content/docs/ja/install-and-setup.mdx b/src/content/docs/ja/install-and-setup.mdx index f22b09ceff397..08927f34ae0f8 100644 --- a/src/content/docs/ja/install-and-setup.mdx +++ b/src/content/docs/ja/install-and-setup.mdx @@ -2,9 +2,6 @@ title: Astroのインストールとセットアップ description: 'Astroをインストールして新しいプロジェクトを開始しましょう。' i18nReady: true -banner: - content: | - Astro v5 が登場! サイトのアップグレード方法を学ぶ --- import { CardGrid, FileTree, LinkCard, Steps } from '@astrojs/starlight/components'; import PackageManagerTabs from '~/components/tabs/PackageManagerTabs.astro'; diff --git a/src/styles/custom.css b/src/styles/custom.css new file mode 100644 index 0000000000000..1968f79dbd069 --- /dev/null +++ b/src/styles/custom.css @@ -0,0 +1,4 @@ +:root { + --sl-color-banner-bg: var(--sl-color-orange); + --sl-color-banner-text: #000; +}