@vercel/geistdocs 1.21.1 → 1.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.js +1 -1
- package/dist/config.d.ts +2 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/footer.d.ts.map +1 -1
- package/dist/footer.js +5 -0
- package/dist/home-layout.d.ts +2 -2
- package/dist/home-layout.d.ts.map +1 -1
- package/dist/home-layout.js +52 -18
- package/dist/internal/chat/copy-chat.d.ts.map +1 -1
- package/dist/internal/chat/copy-chat.js +1 -1
- package/dist/internal/chat/shell.d.ts.map +1 -1
- package/dist/internal/chat/shell.js +8 -3
- package/dist/internal/docs-page-error-boundary.d.ts +10 -0
- package/dist/internal/docs-page-error-boundary.d.ts.map +1 -0
- package/dist/internal/docs-page-error-boundary.js +7 -0
- package/dist/internal/localized-link.js +2 -2
- package/dist/internal/navbar/navbar-logo.d.ts.map +1 -1
- package/dist/internal/navbar/navbar-logo.js +2 -2
- package/dist/internal/page-actions-client.d.ts.map +1 -1
- package/dist/internal/page-actions-client.js +18 -2
- package/dist/internal/page-breadcrumb.d.ts.map +1 -1
- package/dist/internal/page-breadcrumb.js +1 -1
- package/dist/internal/page-footer.d.ts.map +1 -1
- package/dist/internal/page-footer.js +2 -2
- package/dist/internal/search.d.ts.map +1 -1
- package/dist/internal/sidebar.d.ts.map +1 -1
- package/dist/internal/sidebar.js +14 -8
- package/dist/localize-href.d.ts +6 -0
- package/dist/localize-href.d.ts.map +1 -0
- package/dist/{internal/localize-href.js → localize-href.js} +2 -5
- package/dist/{internal/page-visibility.d.ts → page-visibility.d.ts} +1 -1
- package/dist/page-visibility.d.ts.map +1 -0
- package/dist/pages/docs.d.ts +3 -3
- package/dist/pages/docs.d.ts.map +1 -1
- package/dist/pages/docs.js +16 -7
- package/dist/proxy.d.ts +1 -1
- package/dist/proxy.d.ts.map +1 -1
- package/dist/proxy.js +15 -10
- package/dist/routes/agents.d.ts.map +1 -1
- package/dist/routes/agents.js +4 -4
- package/dist/routes/chat.js +1 -1
- package/dist/routes/llms.d.ts +5 -2
- package/dist/routes/llms.d.ts.map +1 -1
- package/dist/routes/llms.js +9 -11
- package/dist/routes/not-found.d.ts +14 -0
- package/dist/routes/not-found.d.ts.map +1 -0
- package/dist/routes/not-found.js +74 -0
- package/dist/routes/search.js +1 -1
- package/dist/routes/sitemap.d.ts +1 -1
- package/dist/routes/sitemap.d.ts.map +1 -1
- package/dist/routes/sitemap.js +1 -1
- package/docs/agents.md +1 -1
- package/docs/llms.txt +76 -19
- package/docs/manifest.json +1 -1
- package/docs/pages/agent-readiness.md +3 -3
- package/docs/pages/configuration.md +6 -0
- package/docs/pages/env.md +2 -2
- package/docs/pages/llms-txt.md +3 -3
- package/docs/pages/md.md +5 -3
- package/docs/pages/migration.md +49 -5
- package/docs/pages/provider.md +2 -0
- package/docs/pages/proxy.md +2 -0
- package/docs/pages/versioned-docs.md +3 -2
- package/package.json +14 -2
- package/template/AGENTS.md +3 -0
- package/template/app/[lang]/(home)/components/text-grid-section.tsx +25 -11
- package/template/app/[lang]/(home)/layout.tsx +3 -2
- package/template/app/[lang]/(home)/opengraph-image.tsx +40 -0
- package/template/app/[lang]/(home)/page.tsx +143 -89
- package/template/app/[lang]/.well-known/mcp.json/route.ts +3 -5
- package/template/app/[lang]/[...not-found]/route.ts +4 -0
- package/template/app/[lang]/agents.md/route.ts +1 -1
- package/template/app/[lang]/docs/layout.tsx +3 -2
- package/template/app/[lang]/layout.tsx +14 -2
- package/template/app/[lang]/llms.mdx/[[...slug]]/route.ts +4 -5
- package/template/app/[lang]/llms.txt/route.ts +1 -1
- package/template/app/[lang]/not-found.tsx +37 -0
- package/template/app/[lang]/rss.xml/route.ts +17 -11
- package/template/app/[lang]/sitemap.md/route.ts +4 -5
- package/template/app/robots.ts +4 -4
- package/template/app/sitemap.ts +16 -10
- package/template/content/docs/agent-readiness.mdx +3 -3
- package/template/content/docs/configuration.mdx +6 -0
- package/template/content/docs/env.mdx +2 -2
- package/template/content/docs/llms-txt.cn.mdx +2 -2
- package/template/content/docs/llms-txt.mdx +3 -3
- package/template/content/docs/md.mdx +5 -3
- package/template/content/docs/migration.mdx +49 -5
- package/template/content/docs/provider.cn.mdx +2 -0
- package/template/content/docs/provider.mdx +2 -0
- package/template/content/docs/proxy.mdx +2 -0
- package/template/content/docs/versioned-docs.mdx +3 -2
- package/template/lib/geistdocs/config.tsx +2 -0
- package/template/lib/geistdocs/public-path.ts +14 -0
- package/template/lib/geistdocs/root-params.ts +5 -0
- package/template/lib/geistdocs/site-url-warning.ts +10 -0
- package/template/lib/geistdocs/site-url.ts +33 -0
- package/template/next.config.ts +2 -10
- package/template/package.json +2 -2
- package/dist/internal/localize-href.d.ts +0 -9
- package/dist/internal/localize-href.d.ts.map +0 -1
- package/dist/internal/page-visibility.d.ts.map +0 -1
- package/template/app/[lang]/(home)/components/templates.tsx +0 -48
- /package/dist/{internal/page-visibility.js → page-visibility.js} +0 -0
|
@@ -57,7 +57,7 @@ Generated projects use one documentation source:
|
|
|
57
57
|
import { createLlmsRoute } from "@vercel/geistdocs/routes/llms";
|
|
58
58
|
import { geistdocsSource } from "@/lib/geistdocs/source";
|
|
59
59
|
|
|
60
|
-
export const { GET
|
|
60
|
+
export const { GET } = createLlmsRoute({
|
|
61
61
|
source: geistdocsSource,
|
|
62
62
|
});
|
|
63
63
|
```
|
|
@@ -65,7 +65,7 @@ export const { GET, revalidate } = createLlmsRoute({
|
|
|
65
65
|
Sites with multiple content sections or versions can pass `sources`:
|
|
66
66
|
|
|
67
67
|
```ts title="app/[lang]/llms.txt/route.ts"
|
|
68
|
-
export const { GET
|
|
68
|
+
export const { GET } = createLlmsRoute({
|
|
69
69
|
sources: [docsSource, cookbookSource],
|
|
70
70
|
});
|
|
71
71
|
```
|
|
@@ -73,7 +73,7 @@ export const { GET, revalidate } = createLlmsRoute({
|
|
|
73
73
|
Use `filterPage` to exclude pages from `/llms.txt`, such as internal or preview-only docs:
|
|
74
74
|
|
|
75
75
|
```ts title="app/[lang]/llms.txt/route.ts"
|
|
76
|
-
export const { GET
|
|
76
|
+
export const { GET } = createLlmsRoute({
|
|
77
77
|
source: geistdocsSource,
|
|
78
78
|
filterPage: (page) => !page.url.includes("/internal"),
|
|
79
79
|
});
|
|
@@ -67,7 +67,7 @@ The destination route uses `createDocsMarkdownRoute` to process the page and ret
|
|
|
67
67
|
import { createDocsMarkdownRoute } from "@vercel/geistdocs/routes/llms";
|
|
68
68
|
import { geistdocsSource } from "@/lib/geistdocs/source";
|
|
69
69
|
|
|
70
|
-
export const { GET, generateStaticParams
|
|
70
|
+
export const { GET, generateStaticParams } =
|
|
71
71
|
createDocsMarkdownRoute({
|
|
72
72
|
notFound: {},
|
|
73
73
|
sources: [geistdocsSource],
|
|
@@ -91,9 +91,11 @@ All MDX components are processed and converted to plain Markdown equivalents.
|
|
|
91
91
|
|
|
92
92
|
When a Markdown request does not match a page, Geistdocs returns an agent-readable `Page Not Found` response. It compares the requested path with visible page paths and titles, then links up to five likely matches with their descriptions. If no match is useful, the response links to `/llms.txt` instead.
|
|
93
93
|
|
|
94
|
-
For example, a request for `/docs/env-vars` can suggest `/docs/environment-variables.md`. The response uses a short cache lifetime and a
|
|
94
|
+
For example, a request for `/docs/env-vars` can suggest `/docs/environment-variables.md`. The response uses a short cache lifetime and returns a real `404` status. It also sends `X-Robots-Tag: noindex` and no canonical link because the requested page does not exist. Regular HTML requests keep the app's standard not-found behavior.
|
|
95
95
|
|
|
96
|
-
|
|
96
|
+
Generated projects also include a catch-all route for unknown application paths outside configured documentation sections. It returns a concise Markdown 404 with links to the docs, `sitemap.md`, and `llms.txt` for agent or `Accept: text/markdown` requests. Browser requests receive the same recovery links as HTML.
|
|
97
|
+
|
|
98
|
+
Enable this behavior with `notFound: {}`. Pass `notFound: { status: 410 }` for permanently removed pages. Legacy `status: 200` values are treated as `404` so missing pages always return a real error status. Without `notFound`, Markdown requests use the standard Next.js not-found response.
|
|
97
99
|
|
|
98
100
|
If a custom `markdownRoutes` mapping changes the public path shape, set `notFound.getRequestedPath` to reconstruct the app-local public pathname. This also keeps page lookup and suggestions within the right source when a flattened route serves multiple sources:
|
|
99
101
|
|
|
@@ -56,6 +56,50 @@ If you are starting from a generated Geistdocs project and moving content into i
|
|
|
56
56
|
pnpm dlx @vercel/geistdocs init --name my-docs
|
|
57
57
|
```
|
|
58
58
|
|
|
59
|
+
## Enable Cache Components
|
|
60
|
+
|
|
61
|
+
Geistdocs uses Next.js Cache Components to prerender static application shells while dynamic content streams from the server. Enable Cache Components in `next.config.ts`:
|
|
62
|
+
|
|
63
|
+
```ts title="next.config.ts"
|
|
64
|
+
import { createMDX } from "fumadocs-mdx/next";
|
|
65
|
+
import type { NextConfig } from "next";
|
|
66
|
+
|
|
67
|
+
const withMDX = createMDX();
|
|
68
|
+
|
|
69
|
+
const config: NextConfig = {
|
|
70
|
+
cacheComponents: true,
|
|
71
|
+
partialPrefetching: true,
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export default withMDX(config);
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Every root dynamic parameter needs at least one value from `generateStaticParams`. For a site with a `[lang]` root segment, return every configured language from the root layout:
|
|
78
|
+
|
|
79
|
+
```tsx title="app/[lang]/layout.tsx"
|
|
80
|
+
export const generateStaticParams = () => [{ lang: "en" }];
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Server Components can read the active language without passing `params` through each layout:
|
|
84
|
+
|
|
85
|
+
```tsx title="app/[lang]/docs/layout.tsx"
|
|
86
|
+
import * as root from "next/root-params";
|
|
87
|
+
|
|
88
|
+
export default async function DocsLayout({ children }) {
|
|
89
|
+
const language = await root.lang();
|
|
90
|
+
// Use language to select the page tree.
|
|
91
|
+
return children;
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Keep using route context `params` in Route Handlers and Server Actions. Next.js does not support `next/root-params` in those contexts.
|
|
96
|
+
|
|
97
|
+
Remove `dynamic`, `revalidate`, and `fetchCache` exports from App Router pages and route handlers. Cache Components replaces those route segment options with `use cache` and `cacheLife`.
|
|
98
|
+
|
|
99
|
+
Keep `partialPrefetching` enabled so links reuse each route's static and cached content instead of prefetching every destination page separately.
|
|
100
|
+
|
|
101
|
+
For unknown HTML pages, browsers can receive the docs loading shell with a `200` response before the page resolves to the not-found UI. Crawlers wait for the complete response and receive `404`. Machine-readable Markdown routes keep their configured status behavior.
|
|
102
|
+
|
|
59
103
|
## Align Ask AI dependencies
|
|
60
104
|
|
|
61
105
|
Geistdocs Ask AI uses AI SDK v6. Generated projects install `ai` v6 and `@ai-sdk/react` v3 so package-owned chat components and route helpers use the supported AI SDK APIs.
|
|
@@ -179,7 +223,7 @@ Add the package route helpers for machine-readable docs surfaces.
|
|
|
179
223
|
import { createLlmsRoute } from "@vercel/geistdocs/routes/llms";
|
|
180
224
|
import { geistdocsSource } from "@/lib/geistdocs/source";
|
|
181
225
|
|
|
182
|
-
export const { GET
|
|
226
|
+
export const { GET } = createLlmsRoute({
|
|
183
227
|
sources: [geistdocsSource],
|
|
184
228
|
});
|
|
185
229
|
```
|
|
@@ -188,7 +232,7 @@ export const { GET, revalidate } = createLlmsRoute({
|
|
|
188
232
|
import { createDocsMarkdownRoute } from "@vercel/geistdocs/routes/llms";
|
|
189
233
|
import { geistdocsSource } from "@/lib/geistdocs/source";
|
|
190
234
|
|
|
191
|
-
export const { GET, generateStaticParams
|
|
235
|
+
export const { GET, generateStaticParams } =
|
|
192
236
|
createDocsMarkdownRoute({
|
|
193
237
|
notFound: {},
|
|
194
238
|
source: geistdocsSource,
|
|
@@ -200,7 +244,7 @@ import { createSitemapMarkdownRoute } from "@vercel/geistdocs/routes/sitemap";
|
|
|
200
244
|
import { config } from "@/lib/geistdocs/config";
|
|
201
245
|
import { geistdocsSource } from "@/lib/geistdocs/source";
|
|
202
246
|
|
|
203
|
-
export const { GET, generateStaticParams
|
|
247
|
+
export const { GET, generateStaticParams } =
|
|
204
248
|
createSitemapMarkdownRoute({
|
|
205
249
|
config,
|
|
206
250
|
sources: [{ source: geistdocsSource.source }],
|
|
@@ -211,7 +255,7 @@ export const { GET, generateStaticParams, revalidate, dynamic } =
|
|
|
211
255
|
import { createAgentsRoute } from "@vercel/geistdocs/routes/agents";
|
|
212
256
|
import { config } from "@/lib/geistdocs/config";
|
|
213
257
|
|
|
214
|
-
export const { GET, generateStaticParams
|
|
258
|
+
export const { GET, generateStaticParams } = createAgentsRoute({
|
|
215
259
|
config,
|
|
216
260
|
});
|
|
217
261
|
```
|
|
@@ -220,7 +264,7 @@ export const { GET, generateStaticParams, revalidate } = createAgentsRoute({
|
|
|
220
264
|
import { createMcpManifestRoute } from "@vercel/geistdocs/routes/mcp";
|
|
221
265
|
import { config } from "@/lib/geistdocs/config";
|
|
222
266
|
|
|
223
|
-
export const { GET, generateStaticParams
|
|
267
|
+
export const { GET, generateStaticParams } = createMcpManifestRoute({
|
|
224
268
|
config,
|
|
225
269
|
});
|
|
226
270
|
```
|
|
@@ -51,6 +51,8 @@ When users open the AI chat on desktop, the provider automatically adds padding
|
|
|
51
51
|
|
|
52
52
|
The provider detects the screen size and chat state.
|
|
53
53
|
|
|
54
|
+
If Ask AI fails while rendering, its panel shows **Try again** and **Close** actions. The error remains scoped to the chat panel, so the documentation page and navigation stay available.
|
|
55
|
+
|
|
54
56
|
## Toast Notifications
|
|
55
57
|
|
|
56
58
|
The provider includes a global toast notification system. Use it anywhere in your app:
|
|
@@ -87,6 +87,8 @@ const proxy = createProxy({
|
|
|
87
87
|
|
|
88
88
|
Define `content` sections in `lib/geistdocs/config.tsx` to infer standard Markdown route mappings from each section route. The package still serves `/llms.txt` and individual page Markdown through route helpers; the proxy uses these mappings for `.md`, `.mdx`, `Accept: text/markdown`, and AI-agent requests.
|
|
89
89
|
|
|
90
|
+
When `agent` metadata is configured, a request to the homepage with `Accept: text/markdown` returns the generated `/agents.md` content. This gives agents a product overview and focused discovery links without treating every application route as documentation.
|
|
91
|
+
|
|
90
92
|
Geistdocs does not infer Markdown mappings for `content` sections with `route: "/"`. A root catch-all such as `/*path` can make a homepage or other application routes look like documentation. Use explicit `markdownRoutes` for root-mounted docs.
|
|
91
93
|
|
|
92
94
|
```tsx title="lib/geistdocs/config.tsx"
|
|
@@ -229,11 +229,12 @@ docs root) instead:
|
|
|
229
229
|
```tsx title="app/[lang]/docs/layout.tsx"
|
|
230
230
|
import { collectVersionSwitchPaths } from "@vercel/geistdocs/source";
|
|
231
231
|
import { GeistdocsVersionSelect } from "@vercel/geistdocs/versions";
|
|
232
|
+
import * as root from "next/root-params";
|
|
232
233
|
import { config } from "@/lib/geistdocs/config";
|
|
233
234
|
import { versions } from "@/lib/geistdocs/source";
|
|
234
235
|
|
|
235
|
-
const DocsLayout = async ({ children
|
|
236
|
-
const
|
|
236
|
+
const DocsLayout = async ({ children }) => {
|
|
237
|
+
const lang = await root.lang();
|
|
237
238
|
|
|
238
239
|
return (
|
|
239
240
|
<GeistdocsDocsLayout
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
title,
|
|
12
12
|
translations,
|
|
13
13
|
} from "@/geistdocs";
|
|
14
|
+
import { isSiteUrlConfigured, siteUrl } from "./site-url";
|
|
14
15
|
|
|
15
16
|
export const config = defineConfig({
|
|
16
17
|
title,
|
|
@@ -21,6 +22,7 @@ export const config = defineConfig({
|
|
|
21
22
|
nav,
|
|
22
23
|
basePath,
|
|
23
24
|
siteId,
|
|
25
|
+
siteUrl: isSiteUrlConfigured ? siteUrl.toString() : undefined,
|
|
24
26
|
translations,
|
|
25
27
|
content: [{ id: "docs", label: "Docs", dir: "content/docs", route: "/docs" }],
|
|
26
28
|
ai: {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { getPublicPath } from "@vercel/geistdocs/config";
|
|
2
|
+
import { localizeHref } from "@vercel/geistdocs/localize-href";
|
|
3
|
+
import { config } from "./config";
|
|
4
|
+
|
|
5
|
+
export const getLocalizedPath = (lang: string | undefined, path: string) => {
|
|
6
|
+
const defaultLanguage = config.defaultLanguage ?? "en";
|
|
7
|
+
const localizedPath = localizeHref(
|
|
8
|
+
path,
|
|
9
|
+
lang ?? defaultLanguage,
|
|
10
|
+
defaultLanguage
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
return getPublicPath(localizedPath, config.basePath);
|
|
14
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { notFound } from "next/navigation";
|
|
2
|
+
// biome-ignore lint/performance/noNamespaceImport: Next.js generates root parameter getters on this module.
|
|
3
|
+
import * as root from "next/root-params";
|
|
4
|
+
|
|
5
|
+
export const getRootLang = async () => (await root.lang()) ?? notFound();
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
const configuredUrl = process.env.NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL;
|
|
2
|
+
const fallbackSiteUrl = new URL("http://localhost:3000");
|
|
3
|
+
|
|
4
|
+
const resolveSiteUrl = () => {
|
|
5
|
+
if (!configuredUrl) {
|
|
6
|
+
return {
|
|
7
|
+
issue: "NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL is not set",
|
|
8
|
+
url: fallbackSiteUrl,
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const value =
|
|
13
|
+
configuredUrl.startsWith("http://") || configuredUrl.startsWith("https://")
|
|
14
|
+
? configuredUrl
|
|
15
|
+
: `https://${configuredUrl}`;
|
|
16
|
+
|
|
17
|
+
try {
|
|
18
|
+
return { issue: undefined, url: new URL(value) };
|
|
19
|
+
} catch {
|
|
20
|
+
return {
|
|
21
|
+
issue: "NEXT_PUBLIC_VERCEL_PROJECT_PRODUCTION_URL is invalid",
|
|
22
|
+
url: fallbackSiteUrl,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const resolvedSiteUrl = resolveSiteUrl();
|
|
28
|
+
|
|
29
|
+
export const isSiteUrlConfigured = !resolvedSiteUrl.issue;
|
|
30
|
+
export const siteUrlIssue = resolvedSiteUrl.issue;
|
|
31
|
+
export const siteUrl = resolvedSiteUrl.url;
|
|
32
|
+
|
|
33
|
+
export const absoluteUrl = (path: string) => new URL(path, siteUrl).toString();
|
package/template/next.config.ts
CHANGED
|
@@ -25,16 +25,8 @@ const envFavicon = ENV_FAVICONS[environment as keyof typeof ENV_FAVICONS];
|
|
|
25
25
|
|
|
26
26
|
const config: NextConfig = {
|
|
27
27
|
...(inMonorepo ? { transpilePackages: ["@vercel/geistdocs"] } : {}),
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
formats: ["image/avif", "image/webp"],
|
|
31
|
-
remotePatterns: [
|
|
32
|
-
{
|
|
33
|
-
protocol: "https",
|
|
34
|
-
hostname: "placehold.co",
|
|
35
|
-
},
|
|
36
|
-
],
|
|
37
|
-
},
|
|
28
|
+
cacheComponents: true,
|
|
29
|
+
partialPrefetching: true,
|
|
38
30
|
|
|
39
31
|
rewrites() {
|
|
40
32
|
if (!envFavicon) {
|
package/template/package.json
CHANGED
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
"@orama/tokenizers": "^3.1.16",
|
|
17
17
|
"@streamdown/cjk": "^1.0.1",
|
|
18
18
|
"@streamdown/code": "^1.0.1",
|
|
19
|
-
"@vercel/agent-readability": "^0.
|
|
19
|
+
"@vercel/agent-readability": "^0.6.0",
|
|
20
20
|
"@vercel/analytics": "^1.6.1",
|
|
21
|
-
"@vercel/geistdocs": "1.
|
|
21
|
+
"@vercel/geistdocs": "1.23.0",
|
|
22
22
|
"@vercel/speed-insights": "^1.3.1",
|
|
23
23
|
"ai": "^6.0.132",
|
|
24
24
|
"class-variance-authority": "^0.7.1",
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Prefix an app-local href with the active non-default language, so links
|
|
3
|
-
* keep visitors in their locale (`/docs` -> `/cn/docs` on `/cn/...` pages).
|
|
4
|
-
* External and protocol-relative hrefs pass through unchanged.
|
|
5
|
-
*
|
|
6
|
-
* Dependency-free so it can be unit-tested outside a React render.
|
|
7
|
-
*/
|
|
8
|
-
export declare const localizeHref: (href: string, language: string | undefined, defaultLanguage: string) => string;
|
|
9
|
-
//# sourceMappingURL=localize-href.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"localize-href.d.ts","sourceRoot":"","sources":["../../src/internal/localize-href.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,GACvB,MAAM,MAAM,EACZ,UAAU,MAAM,GAAG,SAAS,EAC5B,iBAAiB,MAAM,KACtB,MAWF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"page-visibility.d.ts","sourceRoot":"","sources":["../../src/internal/page-visibility.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAEtD,MAAM,WAAW,2BAA2B;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,oBAAoB,EAAE,CAAC;IACrC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAED,UAAU,6BAA6B;IACrC,IAAI,EAAE,OAAO,CAAC;CACf;AAKD,eAAO,MAAM,eAAe,GAAI,MAAM,6BAA6B,YAGlE,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAClC,MAAM,6BAA6B,EACnC,SAAS,oBAAoB,YAa9B,CAAC;AAEF,eAAO,MAAM,aAAa,GACxB,MAAM,6BAA6B,KAClC,QAAQ,CAAC,QAAQ,CAAC,GAAG,SASvB,CAAC"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import Image from "next/image";
|
|
2
|
-
import { cn } from "@/lib/utils";
|
|
3
|
-
|
|
4
|
-
interface TemplatesProps {
|
|
5
|
-
data: {
|
|
6
|
-
title: string;
|
|
7
|
-
description: string;
|
|
8
|
-
link: string;
|
|
9
|
-
image: string;
|
|
10
|
-
}[];
|
|
11
|
-
description: string;
|
|
12
|
-
title: string;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export const Templates = ({ title, description, data }: TemplatesProps) => (
|
|
16
|
-
<div className="grid gap-12 @min-[640px]:py-12 py-8">
|
|
17
|
-
<div className="grid max-w-3xl gap-2 text-balance">
|
|
18
|
-
<h2 className="font-[450]! @min-[1024px]:text-[40px] @min-[640px]:text-2xl @min-[768px]:text-3xl text-gray-1000 text-xl tracking-tighter">
|
|
19
|
-
{title}
|
|
20
|
-
</h2>
|
|
21
|
-
<p className="text-balance text-gray-900 text-lg">{description}</p>
|
|
22
|
-
</div>
|
|
23
|
-
<div className="grid @min-[768px]:grid-cols-3 gap-8">
|
|
24
|
-
{data.map((item) => (
|
|
25
|
-
<a
|
|
26
|
-
className="group flex-col overflow-hidden rounded-lg border bg-background-100 p-4"
|
|
27
|
-
href={item.link}
|
|
28
|
-
key={item.title}
|
|
29
|
-
>
|
|
30
|
-
<h3 className="font-[450] tracking-tight">{item.title}</h3>
|
|
31
|
-
<p className="line-clamp-2 text-gray-900 text-sm">
|
|
32
|
-
{item.description}
|
|
33
|
-
</p>
|
|
34
|
-
<Image
|
|
35
|
-
alt={item.title}
|
|
36
|
-
className={cn(
|
|
37
|
-
"mt-8 -mb-12 ml-7 aspect-video -rotate-3 overflow-hidden rounded-md border object-cover object-top",
|
|
38
|
-
"transition-transform duration-300 group-hover:-rotate-1 group-hover:scale-105"
|
|
39
|
-
)}
|
|
40
|
-
height={336}
|
|
41
|
-
src={item.image}
|
|
42
|
-
width={640}
|
|
43
|
-
/>
|
|
44
|
-
</a>
|
|
45
|
-
))}
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
48
|
-
);
|
|
File without changes
|