Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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/',
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just checking that this doesn't need a v5.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does not. It intentionally points to the production docs site as the canonical source for search engines. This is the same as what we do for our v4 archive.

integrations: [
devServerFileWatcher([
'./config/**', // Custom plugins and integrations
Expand All @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion scripts/lint-linkcheck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down
5 changes: 5 additions & 0 deletions src/content.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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. <a href="https://docs.astro.build/">View the latest docs.</a>',
}),
type: z.literal('base').optional().default('base'),
i18nReady: z.boolean().default(false),
githubURL: z.string().url().optional(),
Expand Down
3 changes: 0 additions & 3 deletions src/content/docs/es/upgrade-astro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
title: Actualizando Astro
description: Conoce cómo actualizar Astro
i18nReady: true
banner:
content: |
¡Ya está aquí Astro v5! <a href="/es/guides/upgrade-to/v5/">Aprenda a actualizar su sitio web</a>
---
import PackageManagerTabs from '~/components/tabs/PackageManagerTabs.astro';
import Version from '~/components/Version.astro';
Expand Down
3 changes: 0 additions & 3 deletions src/content/docs/ja/install-and-setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
title: Astroのインストールとセットアップ
description: 'Astroをインストールして新しいプロジェクトを開始しましょう。'
i18nReady: true
banner:
content: |
Astro v5 が登場! <a href="/ja/guides/upgrade-to/v5/">サイトのアップグレード方法を学ぶ</a>
---
import { CardGrid, FileTree, LinkCard, Steps } from '@astrojs/starlight/components';
import PackageManagerTabs from '~/components/tabs/PackageManagerTabs.astro';
Expand Down
4 changes: 4 additions & 0 deletions src/styles/custom.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
:root {
--sl-color-banner-bg: var(--sl-color-orange);
--sl-color-banner-text: #000;
}
Loading