mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
chore(site): upgrade to Astro 6 (#946)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
4a9f05569a
commit
266ab700b3
Generated
+754
-997
File diff suppressed because it is too large
Load Diff
+25
-27
@@ -32,7 +32,7 @@ export default defineConfig({
|
||||
site: SITE_URL,
|
||||
trailingSlash: 'never',
|
||||
adapter: netlify({
|
||||
devFeatures: { images: false },
|
||||
devFeatures: { images: false, environmentVariables: true },
|
||||
}),
|
||||
// Server-only secrets read at runtime (not inlined at build time).
|
||||
// All optional — the site degrades gracefully without auth/Mux configured.
|
||||
@@ -130,30 +130,28 @@ export default defineConfig({
|
||||
},
|
||||
},
|
||||
|
||||
experimental: {
|
||||
fonts: [
|
||||
{
|
||||
provider: fontProviders.google(),
|
||||
name: 'Instrument Sans',
|
||||
cssVariable: '--font-instrument-sans',
|
||||
weights: ['400 600'],
|
||||
styles: ['normal', 'italic'],
|
||||
subsets: ['latin'],
|
||||
fallbacks: ['sans-serif'],
|
||||
optimizedFallbacks: true,
|
||||
display: 'swap',
|
||||
},
|
||||
{
|
||||
provider: fontProviders.google(),
|
||||
name: 'IBM Plex Mono',
|
||||
cssVariable: '--font-ibm-plex-mono',
|
||||
weights: ['600', '400'],
|
||||
styles: ['normal'],
|
||||
subsets: ['latin'],
|
||||
fallbacks: ['monospace'],
|
||||
optimizedFallbacks: true,
|
||||
display: 'swap',
|
||||
},
|
||||
],
|
||||
},
|
||||
fonts: [
|
||||
{
|
||||
provider: fontProviders.google(),
|
||||
name: 'Instrument Sans',
|
||||
cssVariable: '--font-instrument-sans',
|
||||
weights: ['400 600'],
|
||||
styles: ['normal', 'italic'],
|
||||
subsets: ['latin'],
|
||||
fallbacks: ['sans-serif'],
|
||||
optimizedFallbacks: true,
|
||||
display: 'swap',
|
||||
},
|
||||
{
|
||||
provider: fontProviders.google(),
|
||||
name: 'IBM Plex Mono',
|
||||
cssVariable: '--font-ibm-plex-mono',
|
||||
weights: ['600', '400'],
|
||||
styles: ['normal'],
|
||||
subsets: ['latin'],
|
||||
fallbacks: ['monospace'],
|
||||
optimizedFallbacks: true,
|
||||
display: 'swap',
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
+11
-10
@@ -15,23 +15,23 @@
|
||||
"test:coverage": "vitest --coverage"
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/mdx": "^4.3.7",
|
||||
"@astrojs/netlify": "^6.6.4",
|
||||
"@astrojs/react": "^4.4.0",
|
||||
"@astrojs/rss": "^4.0.12",
|
||||
"@astrojs/sitemap": "^3.6.0",
|
||||
"@astrojs/mdx": "^5.0.3",
|
||||
"@astrojs/netlify": "^7.0.6",
|
||||
"@astrojs/react": "^5.0.2",
|
||||
"@astrojs/rss": "^4.0.18",
|
||||
"@astrojs/sitemap": "^3.7.2",
|
||||
"@base-ui/react": "^1.2.0",
|
||||
"@docsearch/css": "^4.6.0",
|
||||
"@docsearch/react": "^4.6.0",
|
||||
"@mux/mux-node": "^12.8.1",
|
||||
"@mux/mux-uploader-react": "^1.4.1",
|
||||
"@nanostores/react": "^1.0.0",
|
||||
"@sentry/astro": "^10.32.1",
|
||||
"@sentry/astro": "^10.43.0",
|
||||
"@shikijs/transformers": "^4.0.2",
|
||||
"@tailwindcss/vite": "^4.2.1",
|
||||
"@videojs/html": "workspace:*",
|
||||
"@videojs/react": "workspace:*",
|
||||
"astro": "^5.14.4",
|
||||
"astro": "^6.1.3",
|
||||
"clsx": "^2.1.1",
|
||||
"es-toolkit": "^1.32.0",
|
||||
"github-slugger": "^2.0.0",
|
||||
@@ -48,14 +48,15 @@
|
||||
"reading-time": "^1.5.0",
|
||||
"schema-dts": "^1.1.5",
|
||||
"sharp": "^0.34.3",
|
||||
"shiki": "^3.13.0",
|
||||
"shiki": "^4.0.2",
|
||||
"simple-git": "^3.28.0",
|
||||
"tailwind-merge": "^3.5.0",
|
||||
"tailwindcss": "^4.2.1",
|
||||
"unist-util-visit": "^5.0.0"
|
||||
"unist-util-visit": "^5.0.0",
|
||||
"vite": "^7.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@astrojs/check": "^0.9.6",
|
||||
"@astrojs/check": "^0.9.8",
|
||||
"@netlify/edge-functions": "^3.0.3",
|
||||
"@testing-library/jest-dom": "^6.9.1",
|
||||
"@testing-library/react": "^16.3.0",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ActionError, defineAction } from 'astro:actions';
|
||||
import { OAUTH_CLIENT_ID, OAUTH_REDIRECT_URI, OAUTH_URL } from 'astro:env/server';
|
||||
import { z } from 'astro:schema';
|
||||
import { z } from 'astro/zod';
|
||||
import { SESSION_COOKIE_NAME } from '@/utils/auth';
|
||||
|
||||
export const auth = {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { ActionError, defineAction } from 'astro:actions';
|
||||
import { MUX_API_URL, MUX_TOKEN_ID, MUX_TOKEN_SECRET } from 'astro:env/server';
|
||||
import { z } from 'astro:schema';
|
||||
import Mux from '@mux/mux-node';
|
||||
import { z } from 'astro/zod';
|
||||
|
||||
/**
|
||||
* Creates an authenticated Mux API client
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { defineCollection, reference, z } from 'astro:content';
|
||||
import { defineCollection, reference } from 'astro:content';
|
||||
import { file, glob } from 'astro/loaders';
|
||||
import { z } from 'astro/zod';
|
||||
import { ComponentReferenceSchema } from './types/component-reference';
|
||||
import { SUPPORTED_FRAMEWORKS } from './types/docs';
|
||||
import { UtilReferenceSchema } from './types/util-reference';
|
||||
@@ -56,10 +57,10 @@ const blog = defineCollection({
|
||||
pubDate: z.date(),
|
||||
updatedDate: z.coerce.date().optional(),
|
||||
authors: z.array(reference('authors')),
|
||||
canonical: z.string().url().optional(),
|
||||
canonical: z.url().optional(),
|
||||
devOnly: z.boolean().optional(), // only visible in development mode
|
||||
ogImage: image().or(z.string().url()).optional(),
|
||||
twitterImage: image().or(z.string().url()).optional(),
|
||||
ogImage: image().or(z.url()).optional(),
|
||||
twitterImage: image().or(z.url()).optional(),
|
||||
}),
|
||||
});
|
||||
|
||||
@@ -86,7 +87,7 @@ const docs = defineCollection({
|
||||
title: z.string(),
|
||||
description: z.string(),
|
||||
updatedDate: z.coerce.date().optional(),
|
||||
frameworkTitle: z.record(z.enum(SUPPORTED_FRAMEWORKS as [string, ...string[]]), z.string()).optional(),
|
||||
frameworkTitle: z.partialRecord(z.enum(SUPPORTED_FRAMEWORKS as [string, ...string[]]), z.string()).optional(),
|
||||
}),
|
||||
});
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ interface Props {
|
||||
withCompact?: boolean;
|
||||
}
|
||||
const { canonical, suffix } = Astro.props;
|
||||
const canonicalURL = canonical || new URL(Astro.url.pathname, PRODUCTION_URL);
|
||||
const canonicalURL = canonical || new URL(Astro.url.pathname, PRODUCTION_URL).href;
|
||||
|
||||
const { title, description, image, twitterImage, withCompact } = Astro.props;
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
import type { ShikiTransformer } from 'shiki';
|
||||
|
||||
export const shikiNotationTransformers: ShikiTransformer[] = [
|
||||
transformerNotationDiff({ matchAlgorithm: 'v3' }),
|
||||
transformerNotationFocus({ matchAlgorithm: 'v3' }),
|
||||
transformerNotationWordHighlight({ matchAlgorithm: 'v3' }),
|
||||
transformerNotationDiff(),
|
||||
transformerNotationFocus(),
|
||||
transformerNotationWordHighlight(),
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user