mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 03:23:29 +01:00
chore(website): sneaky sneaky
This commit is contained in:
@@ -39,6 +39,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@code-hike/mdx": "^0.8.0",
|
"@code-hike/mdx": "^0.8.0",
|
||||||
"@discordjs/ui": "workspace:^",
|
"@discordjs/ui": "workspace:^",
|
||||||
|
"@vercel/analytics": "^0.1.11",
|
||||||
"ariakit": "^2.0.0-next.43",
|
"ariakit": "^2.0.0-next.43",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-custom-scrollbars-2": "^4.5.0",
|
"react-custom-scrollbars-2": "^4.5.0",
|
||||||
|
|||||||
@@ -2,10 +2,13 @@
|
|||||||
import '../styles/main.css';
|
import '../styles/main.css';
|
||||||
import '@code-hike/mdx/styles.css';
|
import '@code-hike/mdx/styles.css';
|
||||||
import '../styles/ch.css';
|
import '../styles/ch.css';
|
||||||
|
import { inject } from '@vercel/analytics';
|
||||||
import type { MarkdownLayoutProps } from 'astro';
|
import type { MarkdownLayoutProps } from 'astro';
|
||||||
import SidebarLayout from '../components/SidebarLayout.astro';
|
import SidebarLayout from '../components/SidebarLayout.astro';
|
||||||
import { DESCRIPTION } from '../util/constants.js';
|
import { DESCRIPTION } from '../util/constants.js';
|
||||||
|
|
||||||
|
inject();
|
||||||
|
|
||||||
type Props = MarkdownLayoutProps<{}>;
|
type Props = MarkdownLayoutProps<{}>;
|
||||||
const props = Astro.props;
|
const props = Astro.props;
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -51,6 +51,7 @@
|
|||||||
"@microsoft/api-extractor-model": "7.26.4",
|
"@microsoft/api-extractor-model": "7.26.4",
|
||||||
"@microsoft/tsdoc": "0.14.2",
|
"@microsoft/tsdoc": "0.14.2",
|
||||||
"@react-icons/all-files": "^4.1.0",
|
"@react-icons/all-files": "^4.1.0",
|
||||||
|
"@vercel/analytics": "^0.1.11",
|
||||||
"@vercel/og": "^0.4.1",
|
"@vercel/og": "^0.4.1",
|
||||||
"@vscode/codicons": "^0.0.32",
|
"@vscode/codicons": "^0.0.32",
|
||||||
"ariakit": "^2.0.0-next.43",
|
"ariakit": "^2.0.0-next.43",
|
||||||
|
|||||||
@@ -3,8 +3,11 @@ import { VscArrowRight } from '@react-icons/all-files/vsc/VscArrowRight';
|
|||||||
import { VscVersions } from '@react-icons/all-files/vsc/VscVersions';
|
import { VscVersions } from '@react-icons/all-files/vsc/VscVersions';
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
import { notFound } from 'next/navigation';
|
import { notFound } from 'next/navigation';
|
||||||
|
import type { ServerRuntime } from 'next/types';
|
||||||
import { PACKAGES } from '~/util/constants';
|
import { PACKAGES } from '~/util/constants';
|
||||||
|
|
||||||
|
export const runtime: ServerRuntime = 'edge';
|
||||||
|
|
||||||
async function getData(pkg: string) {
|
async function getData(pkg: string) {
|
||||||
if (!PACKAGES.includes(pkg)) {
|
if (!PACKAGES.includes(pkg)) {
|
||||||
notFound();
|
notFound();
|
||||||
|
|||||||
@@ -3,8 +3,11 @@ import { VscArrowLeft } from '@react-icons/all-files/vsc/VscArrowLeft';
|
|||||||
import { VscArrowRight } from '@react-icons/all-files/vsc/VscArrowRight';
|
import { VscArrowRight } from '@react-icons/all-files/vsc/VscArrowRight';
|
||||||
import { VscPackage } from '@react-icons/all-files/vsc/VscPackage';
|
import { VscPackage } from '@react-icons/all-files/vsc/VscPackage';
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
|
import type { ServerRuntime } from 'next/types';
|
||||||
import { PACKAGES } from '~/util/constants';
|
import { PACKAGES } from '~/util/constants';
|
||||||
|
|
||||||
|
export const runtime: ServerRuntime = 'edge';
|
||||||
|
|
||||||
export default function Page() {
|
export default function Page() {
|
||||||
return (
|
return (
|
||||||
<div className="min-w-xs sm:w-md mx-auto flex min-h-screen flex-row place-content-center place-items-center gap-8 py-0 px-4 lg:py-0 lg:px-6">
|
<div className="min-w-xs sm:w-md mx-auto flex min-h-screen flex-row place-content-center place-items-center gap-8 py-0 px-4 lg:py-0 lg:px-6">
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { Analytics } from '@vercel/analytics/react';
|
||||||
import type { Metadata } from 'next/types';
|
import type { Metadata } from 'next/types';
|
||||||
import type { PropsWithChildren } from 'react';
|
import type { PropsWithChildren } from 'react';
|
||||||
import { Providers } from './providers';
|
import { Providers } from './providers';
|
||||||
@@ -73,6 +74,7 @@ export default function RootLayout({ children }: PropsWithChildren) {
|
|||||||
<html className={inter.variable} lang="en" suppressHydrationWarning>
|
<html className={inter.variable} lang="en" suppressHydrationWarning>
|
||||||
<body className="dark:bg-dark-800 bg-white">
|
<body className="dark:bg-dark-800 bg-white">
|
||||||
<Providers>{children}</Providers>
|
<Providers>{children}</Providers>
|
||||||
|
<Analytics />
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
);
|
);
|
||||||
|
|||||||
11
yarn.lock
11
yarn.lock
@@ -2148,6 +2148,7 @@ __metadata:
|
|||||||
"@types/react-syntax-highlighter": ^15.5.6
|
"@types/react-syntax-highlighter": ^15.5.6
|
||||||
"@unocss/cli": ^0.50.6
|
"@unocss/cli": ^0.50.6
|
||||||
"@unocss/reset": ^0.50.6
|
"@unocss/reset": ^0.50.6
|
||||||
|
"@vercel/analytics": ^0.1.11
|
||||||
"@vitejs/plugin-react": ^3.1.0
|
"@vitejs/plugin-react": ^3.1.0
|
||||||
"@vitest/coverage-c8": ^0.29.7
|
"@vitest/coverage-c8": ^0.29.7
|
||||||
ariakit: ^2.0.0-next.43
|
ariakit: ^2.0.0-next.43
|
||||||
@@ -2406,6 +2407,7 @@ __metadata:
|
|||||||
"@types/react-dom": ^18.0.11
|
"@types/react-dom": ^18.0.11
|
||||||
"@unocss/cli": ^0.50.6
|
"@unocss/cli": ^0.50.6
|
||||||
"@unocss/reset": ^0.50.6
|
"@unocss/reset": ^0.50.6
|
||||||
|
"@vercel/analytics": ^0.1.11
|
||||||
"@vercel/og": ^0.4.1
|
"@vercel/og": ^0.4.1
|
||||||
"@vitejs/plugin-react": ^3.1.0
|
"@vitejs/plugin-react": ^3.1.0
|
||||||
"@vitest/coverage-c8": ^0.29.7
|
"@vitest/coverage-c8": ^0.29.7
|
||||||
@@ -5843,6 +5845,15 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"@vercel/analytics@npm:^0.1.11":
|
||||||
|
version: 0.1.11
|
||||||
|
resolution: "@vercel/analytics@npm:0.1.11"
|
||||||
|
peerDependencies:
|
||||||
|
react: ^16.8||^17||^18
|
||||||
|
checksum: 05b8180ac6e23ebe7c09d74c43f8ee78c408cd0b6546e676389cbf4fba44dfeeae3648c9b52e2421be64fe3aeee8b026e6ea4bdfc0589fb5780670f2b090a167
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"@vercel/build-utils@npm:6.5.0":
|
"@vercel/build-utils@npm:6.5.0":
|
||||||
version: 6.5.0
|
version: 6.5.0
|
||||||
resolution: "@vercel/build-utils@npm:6.5.0"
|
resolution: "@vercel/build-utils@npm:6.5.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user