mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-22 02:23:30 +00:00
Make @/ match v1
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { SiteContentLayout } from '@/components/routes/SiteContentLayout';
|
||||
import { createDynamicSiteContext } from '@/lib/context';
|
||||
import { SiteContentLayout } from '@v2/components/routes/SiteContentLayout';
|
||||
import { createDynamicSiteContext } from '@v2/lib/context';
|
||||
|
||||
export default async function RootLayout({
|
||||
params,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { SiteContentPage } from '@/components/routes/SiteContentPage';
|
||||
import { createDynamicSiteContext } from '@/lib/context';
|
||||
import { SiteContentPage } from '@v2/components/routes/SiteContentPage';
|
||||
import { createDynamicSiteContext } from '@v2/lib/context';
|
||||
|
||||
export default async function Page({ params }: { params: Promise<{ url: string[] }> }) {
|
||||
const { url } = await params;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { unstable_cacheTag as cacheTag } from 'next/cache';
|
||||
import { SiteContentLayout } from '@/components/routes/SiteContentLayout';
|
||||
import { getSiteCacheTag } from '@/lib/cache';
|
||||
import { createStaticSiteContext } from '@/lib/context';
|
||||
import { SiteContentLayout } from '@v2/components/routes/SiteContentLayout';
|
||||
import { getSiteCacheTag } from '@v2/lib/cache';
|
||||
import { createStaticSiteContext } from '@v2/lib/context';
|
||||
|
||||
export default async function RootLayout({
|
||||
params,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { unstable_cacheTag as cacheTag } from 'next/cache';
|
||||
import { createStaticSiteContext } from '@/lib/context';
|
||||
import { getSiteCacheTag } from '@/lib/cache';
|
||||
import { SiteContentPage } from '@/components/routes/SiteContentPage';
|
||||
import { createStaticSiteContext } from '@v2/lib/context';
|
||||
import { getSiteCacheTag } from '@v2/lib/cache';
|
||||
import { SiteContentPage } from '@v2/components/routes/SiteContentPage';
|
||||
|
||||
export default async function Page({ params }: { params: Promise<{ url: string[] }> }) {
|
||||
'use cache';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { GitBookSiteContext } from '@/lib/context';
|
||||
import { GitBookSiteContext } from '@v2/lib/context';
|
||||
|
||||
/**
|
||||
* Layout component to render the site content.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { GitBookSiteContext } from '@/lib/context';
|
||||
import { GitBookSiteContext } from '@v2/lib/context';
|
||||
|
||||
export async function SiteContentPage({ context }: { context: GitBookSiteContext }) {
|
||||
const { api } = context;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { headers } from 'next/headers';
|
||||
import { redirect } from 'next/navigation';
|
||||
import { GitBookAPI } from '@gitbook/api';
|
||||
import { GITBOOK_API_TOKEN, GITBOOK_API_URL, GITBOOK_USER_AGENT } from '@/lib/env';
|
||||
import { GITBOOK_API_TOKEN, GITBOOK_API_URL, GITBOOK_USER_AGENT } from '@v2/lib/env';
|
||||
|
||||
/**
|
||||
* Generic context about rendering content.
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"@/*": ["./src/*"],
|
||||
"@v2/*": ["./src/*"],
|
||||
"@v1/*": ["../gitbook/src/*"]
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user