From 2848aaa64b3f91822877534bde2fa7046a228842 Mon Sep 17 00:00:00 2001 From: Ryan Waits Date: Sat, 2 Aug 2025 13:55:47 -0500 Subject: [PATCH 1/5] update llms.txt link --- content/docs/reference/stacks.js/index.mdx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/content/docs/reference/stacks.js/index.mdx b/content/docs/reference/stacks.js/index.mdx index 7aac3ab7b..691b5e171 100644 --- a/content/docs/reference/stacks.js/index.mdx +++ b/content/docs/reference/stacks.js/index.mdx @@ -7,7 +7,9 @@ llm: false ## Overview -Stacks.js is a collection of JavaScript libraries that enable you to build web applications on the Stacks blockchain. From wallet authentication to smart contract interactions, Stacks.js provides the essential building blocks for creating decentralized applications. [View on llms.txt](https://github.com/hirosystems/stacks.js/blob/main/llms.txt) +Stacks.js is a collection of JavaScript libraries that enable you to build web applications on the Stacks blockchain. From wallet authentication to smart contract interactions. + +To explore Stacks.js with AI, copy and paste [llms.txt](/reference/stacks.js/llms.txt) into your LLM of choice. ## Key features From 3f38056c7f50605d9ef2aa1ce0a2512c5c9255f3 Mon Sep 17 00:00:00 2001 From: Ryan Date: Sun, 3 Aug 2025 14:12:43 -0500 Subject: [PATCH 2/5] feat: biome setup (#1053) * add response headers guide * add biome * update formatting * update to use biome * update ci * fix unresolved merge conflict * remove version --- .biomeignore | 17 + .eslintrc.json | 11 - .github/workflows/{linkcheck.yml => ci.yml} | 7 +- .vscode/settings.json | 26 + .zed/settings.json | 49 + app/(docs)/[...slug]/page.tsx | 133 +- app/(docs)/error.tsx | 22 +- app/(docs)/layout.tsx | 8 +- app/(docs)/not-found.tsx | 15 +- app/(docs)/raw/[...slug]/route.ts | 37 +- app/(home)/components/interactive-badge.tsx | 4 +- app/(home)/icons.tsx | 53 +- app/(home)/layout.tsx | 6 +- app/(home)/page.tsx | 46 +- app/api/feedback/route.ts | 31 +- app/api/openapi-markdown/[...slug]/route.ts | 76 +- app/api/search/route.ts | 4 +- app/apis/layout.tsx | 6 +- app/apis/page.tsx | 4 +- app/config/docs.ts | 2 +- app/layout.config.tsx | 150 +- app/layout.tsx | 14 +- app/not-found.tsx | 8 +- app/reference/layout.tsx | 6 +- app/reference/page.tsx | 4 +- app/resources/layout.tsx | 6 +- app/resources/page.tsx | 6 +- app/sitemap.ts | 8 +- app/theme.css | 14 +- app/tools/layout.tsx | 6 +- app/tools/page.tsx | 6 +- biome.json | 55 + bun.lock | 407 +-- components.json | 2 +- components/badge.tsx | 18 +- components/banner.tsx | 14 +- components/breadcrumb-nav.tsx | 10 +- components/callout.tsx | 62 +- components/card.tsx | 147 +- components/code/clarinet-sdk.tsx | 32 +- components/code/connect-wallet-button.tsx | 18 +- components/command-menu.tsx | 28 +- .../docskit/annotations/callout.client.tsx | 58 +- components/docskit/annotations/callout.tsx | 84 +- components/docskit/annotations/collapse.tsx | 128 +- components/docskit/annotations/diff.tsx | 34 +- .../docskit/annotations/fold.client.tsx | 42 +- components/docskit/annotations/fold.tsx | 14 +- .../docskit/annotations/hover-line.client.tsx | 80 +- .../docskit/annotations/hover.client.tsx | 6 +- components/docskit/annotations/hover.tsx | 8 +- .../docskit/annotations/line-numbers.tsx | 38 +- components/docskit/annotations/link.tsx | 30 +- components/docskit/annotations/mark.tsx | 82 +- .../docskit/annotations/terminal-command.css | 2 +- .../docskit/annotations/terminal-command.tsx | 15 +- .../docskit/annotations/terminal-output.tsx | 10 +- .../annotations/token-transitions.client.tsx | 94 +- .../docskit/annotations/token-transitions.tsx | 18 +- components/docskit/annotations/tooltip.tsx | 20 +- components/docskit/annotations/word-wrap.tsx | 43 +- components/docskit/code-group.tsx | 16 +- components/docskit/code-icon.tsx | 149 +- components/docskit/code-simple.tsx | 53 +- components/docskit/code.client.tsx | 124 +- components/docskit/code.tsx | 392 ++- components/docskit/components.tsx | 266 +- components/docskit/context/hover.tsx | 16 +- components/docskit/copy-button.tsx | 63 +- components/docskit/hooks/local-storage.tsx | 82 +- components/docskit/inline-code.tsx | 6 +- components/docskit/notes.client.tsx | 44 +- components/docskit/notes.tooltip.tsx | 76 +- components/docskit/notes.tsx | 74 +- components/docskit/scrollycoding.tsx | 24 +- components/docskit/slideshow.controls.tsx | 10 +- components/docskit/slideshow.tsx | 14 +- components/docskit/spotlight.tsx | 20 +- components/docskit/terminal.client.tsx | 22 +- components/docskit/terminal.tsx | 50 +- components/docskit/theme.mjs | 2727 ++++++++--------- components/feedback/feedback-wrapper.tsx | 123 +- components/filter-popover.tsx | 38 +- components/footer.tsx | 51 +- components/layout/index.ts | 4 +- components/layout/language-toggle.tsx | 34 +- components/layout/mobile-menu-button.tsx | 4 +- components/layout/mobile-navigation.tsx | 116 +- components/layout/nav.tsx | 46 +- components/layout/root-toggle.tsx | 40 +- components/layout/search-toggle.tsx | 16 +- components/layout/section-icons.tsx | 24 +- components/layout/section.tsx | 77 +- components/layout/theme-toggle.tsx | 28 +- components/layout/toc-clerk.tsx | 33 +- components/layout/toc-thumb.tsx | 4 +- components/layout/toc.tsx | 85 +- components/layouts/docs.tsx | 207 +- components/layouts/home.tsx | 57 +- components/layouts/interactive.tsx | 28 +- components/layouts/links.tsx | 130 +- components/layouts/page.tsx | 94 +- components/layouts/shared.tsx | 11 +- components/lists.tsx | 40 +- components/llm-share.tsx | 73 +- components/mdx/index.tsx | 35 +- components/mdx/mermaid.tsx | 7 +- components/openapi/api-page.tsx | 41 +- .../api-playground/clarity-converter.tsx | 133 +- components/openapi/api-playground/index.tsx | 250 +- .../api-playground/request-builder.tsx | 459 ++- .../api-playground/request-executor.tsx | 81 +- components/openapi/code-examples-section.tsx | 21 +- components/openapi/collapsible-schema.tsx | 26 +- components/openapi/operation-section.tsx | 44 +- components/openapi/parameters-section.tsx | 150 +- components/openapi/response-table.tsx | 10 +- components/openapi/response-tabs.tsx | 22 +- components/openapi/types.ts | 2 +- components/openapi/utils/code-generator.ts | 53 +- components/openapi/utils/method-badge.tsx | 25 +- components/openapi/utils/openapi-processor.ts | 248 +- components/openapi/utils/parameter-card.tsx | 24 +- components/openapi/utils/required-badge.tsx | 16 +- components/recipe-carousel.tsx | 22 +- .../reference/api-collapsible.client.tsx | 14 +- components/reference/api-page.tsx | 40 +- components/reference/api-section.tsx | 93 +- components/reference/types.ts | 11 +- components/search-dialog.tsx | 389 ++- components/steps.tsx | 2 +- components/table.tsx | 53 +- components/theme-provider.tsx | 6 +- components/ui/accordion.tsx | 32 +- components/ui/alert.tsx | 34 +- components/ui/avatar.tsx | 19 +- components/ui/badge.tsx | 24 +- components/ui/banner.tsx | 55 +- components/ui/breadcrumb.tsx | 113 +- components/ui/button.tsx | 42 +- components/ui/card.tsx | 130 +- components/ui/carousel.tsx | 350 +-- components/ui/checkbox.tsx | 18 +- components/ui/collapsible.tsx | 17 +- components/ui/command.tsx | 61 +- components/ui/dialog.tsx | 47 +- components/ui/drawer.tsx | 51 +- components/ui/dropdown-menu.tsx | 67 +- components/ui/icon.tsx | 370 +-- components/ui/input.tsx | 15 +- components/ui/interactive-tags.tsx | 30 +- components/ui/kbd.tsx | 35 +- components/ui/label.tsx | 21 +- components/ui/navigation-menu.tsx | 22 +- components/ui/popover.tsx | 14 +- components/ui/scroll-area.tsx | 24 +- components/ui/select.tsx | 51 +- components/ui/separator.tsx | 43 +- components/ui/sheet.tsx | 69 +- components/ui/skeleton.tsx | 16 +- components/ui/table.tsx | 98 +- components/ui/tabs.tsx | 14 +- components/ui/tag-filter-system.tsx | 41 +- components/ui/textarea.tsx | 10 +- components/ui/toggle-group.tsx | 28 +- components/ui/toggle.tsx | 31 +- components/ui/tooltip.tsx | 12 +- .../(ai-integration)/prompts/meta.json | 6 +- .../meta.json | 7 +- content/_hidden/(deployment)/meta.json | 7 +- content/_hidden/(event-streaming)/meta.json | 2 +- content/_hidden/(local-development)/meta.json | 2 +- .../(setting-up-your-environment)/meta.json | 7 +- .../(testing-your-contracts)/meta.json | 8 +- .../(working-with-hiro-apis)/meta.json | 7 +- content/docs/apis/ordinals-api/meta.json | 8 +- .../ordinals-api/reference/brc20/meta.json | 2 +- .../ordinals-api/reference/info/meta.json | 2 +- .../reference/inscriptions/meta.json | 2 +- .../ordinals-api/reference/satoshis/meta.json | 2 +- .../reference/statistics/meta.json | 2 +- content/docs/apis/platform-api/meta.json | 8 +- .../reference/chainhooks/meta.json | 11 +- .../platform-api/reference/devnet/meta.json | 9 +- content/docs/apis/runes-api/meta.json | 8 +- .../runes-api/reference/activities/meta.json | 2 +- .../runes-api/reference/balances/meta.json | 2 +- .../runes-api/reference/etchings/meta.json | 2 +- .../apis/runes-api/reference/info/meta.json | 2 +- .../docs/apis/signer-metrics-api/meta.json | 8 +- .../reference/block-proposals/meta.json | 2 +- .../reference/blocks/meta.json | 2 +- .../reference/info/meta.json | 2 +- .../reference/signers/meta.json | 2 +- .../reference/accounts/meta.json | 2 +- .../reference/blocks/meta.json | 2 +- .../reference/burn-blocks/meta.json | 1 - .../reference/faucets/meta.json | 2 +- .../reference/fees/meta.json | 2 +- .../reference/info/meta.json | 2 +- .../reference/mempool/meta.json | 2 +- .../reference/nakamoto/meta.json | 10 +- .../reference/proof-of-transfer/meta.json | 2 +- .../reference/search/meta.json | 2 +- .../reference/sortitions/meta.json | 2 +- .../reference/stacking-pool/meta.json | 2 +- .../reference/transactions/meta.json | 1 - .../reference/info/meta.json | 6 +- .../reference/tokens/meta.json | 2 +- content/docs/meta.json | 7 +- .../reference/stacks.js/(connect)/meta.json | 2 +- .../stacks.js/(integrations)/meta.json | 7 +- .../stacks.js/(local-accounts)/meta.json | 9 +- .../reference/stacks.js/(overview)/meta.json | 9 +- .../stacks.js/(post-conditions)/meta.json | 7 +- .../reference/stacks.js/(utils)/meta.json | 9 +- content/docs/resources/archive/meta.json | 8 +- .../clarity/(integrations)/meta.json | 6 +- content/docs/resources/snippets/meta.json | 2 +- content/docs/resources/templates/meta.json | 5 +- .../tools/bitcoin-indexer/(indexer)/meta.json | 9 +- .../bitcoin-indexer/(integrations)/meta.json | 7 +- .../bitcoin-indexer/(overview)/meta.json | 2 +- .../tools/chainhook/(chainhook-cli)/meta.json | 8 +- .../chainhook/(event-handling)/meta.json | 9 +- .../tools/chainhook/(integrations)/meta.json | 6 +- .../docs/tools/chainhook/(overview)/meta.json | 7 +- content/docs/tools/chainhook/meta.json | 2 +- .../clarinet/(clarinet-js-sdk)/meta.json | 2 +- .../docs/tools/clarinet/(overview)/meta.json | 7 +- contexts/mobile-menu.tsx | 42 +- fonts/index.ts | 84 +- hooks/use-breadcrumb.tsx | 42 +- hooks/use-is-mobile.tsx | 10 +- hooks/use-keyboard-shortcuts.tsx | 16 +- hooks/use-llms-txt.ts | 52 +- hooks/use-search.tsx | 22 +- hooks/use-tag-filtering.ts | 13 +- lib/all-guides.json | 8 +- lib/api-config.ts | 24 +- lib/github-discussions.ts | 75 +- lib/is-active.ts | 6 +- lib/loader.ts | 40 +- lib/markdown-generator.ts | 251 +- lib/metadata.ts | 330 +- lib/openapi.ts | 12 +- lib/remark-custom-directives.ts | 228 +- lib/source.ts | 418 ++- lib/utils.ts | 4 +- lib/utils/frontmatter-parser.ts | 11 +- lib/utils/tag-filtering.ts | 9 +- lint.ts | 33 +- middleware.ts | 20 +- next.config.mjs | 8 +- package.json | 15 +- providers/query-provider.tsx | 16 +- public/contract-call-payload.json | 2 +- scripts/fetch-openapi-specs.mts | 890 +++--- scripts/generate-llms-txt.ts | 101 +- scripts/generate-reference-docs.ts | 84 +- scripts/manage-discussions.ts | 71 +- scripts/openapi-to-markdown.mts | 507 +-- scripts/utils/api-endpoint-mapping.mts | 72 +- source.config.ts | 26 +- types/feedback.ts | 3 +- types/index.ts | 37 +- utils/process-markdown-links.ts | 112 +- vercel.json | 38 +- 268 files changed, 7175 insertions(+), 9107 deletions(-) create mode 100644 .biomeignore delete mode 100644 .eslintrc.json rename .github/workflows/{linkcheck.yml => ci.yml} (84%) create mode 100644 .vscode/settings.json create mode 100644 .zed/settings.json create mode 100644 biome.json diff --git a/.biomeignore b/.biomeignore new file mode 100644 index 000000000..238a27813 --- /dev/null +++ b/.biomeignore @@ -0,0 +1,17 @@ +node_modules +dist +.next +*.lock +bun.lockb +generated +public/**/*.js +**/*.min.js +build +coverage +.git +.DS_Store +*.log +.env* +.vercel +out +.turbo diff --git a/.eslintrc.json b/.eslintrc.json deleted file mode 100644 index 86fed8bef..000000000 --- a/.eslintrc.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "extends": ["next/core-web-vitals", "next/typescript"], - "rules": { - "@typescript-eslint/no-explicit-any": "off", - "react-hooks/rules-of-hooks": "off", - "@next/next/no-img-element": "off", - "@typescript-eslint/no-empty-object-type": "off", - "@typescript-eslint/no-unused-vars": "off", - "react-hooks/exhaustive-deps": "off" - } -} \ No newline at end of file diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/ci.yml similarity index 84% rename from .github/workflows/linkcheck.yml rename to .github/workflows/ci.yml index 5e0583a0a..d7fdb1913 100644 --- a/.github/workflows/linkcheck.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: linkcheck +name: CI on: push: @@ -23,10 +23,13 @@ jobs: - name: Install dependencies run: bun install --frozen-lockfile + - name: Run Biome checks + run: bun run check + - name: Generate llms.txt files run: bun run generate-llms env: LLMS_BASE_URL: https://docs.hiro.so - name: Run link validation - run: bun run lint + run: bun run validate-links diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..5c2ba504c --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,26 @@ +{ + "editor.formatOnSave": true, + "editor.defaultFormatter": "biomejs.biome", + "editor.codeActionsOnSave": { + "quickfix.biome": "explicit", + "source.organizeImports.biome": "explicit" + }, + "[javascript]": { + "editor.defaultFormatter": "biomejs.biome" + }, + "[typescript]": { + "editor.defaultFormatter": "biomejs.biome" + }, + "[javascriptreact]": { + "editor.defaultFormatter": "biomejs.biome" + }, + "[typescriptreact]": { + "editor.defaultFormatter": "biomejs.biome" + }, + "[json]": { + "editor.defaultFormatter": "biomejs.biome" + }, + "[jsonc]": { + "editor.defaultFormatter": "biomejs.biome" + } +} diff --git a/.zed/settings.json b/.zed/settings.json new file mode 100644 index 000000000..1b11b0f2c --- /dev/null +++ b/.zed/settings.json @@ -0,0 +1,49 @@ +{ + "format_on_save": "on", + "formatter": "language_server", + "languages": { + "JavaScript": { + "format_on_save": "on", + "formatter": "language_server", + "language_servers": [ + "biome", + "!vtsls", + "!typescript-language-server", + "!eslint" + ] + }, + "TypeScript": { + "format_on_save": "on", + "formatter": "language_server", + "language_servers": [ + "biome", + "!vtsls", + "!typescript-language-server", + "!eslint" + ] + }, + "TSX": { + "format_on_save": "on", + "formatter": "language_server", + "language_servers": [ + "biome", + "!vtsls", + "!typescript-language-server", + "!eslint" + ] + }, + "JSON": { + "format_on_save": "on", + "formatter": "language_server", + "language_servers": [ + "biome", + "..." + ] + }, + "Markdown": { + "format_on_save": "on", + "formatter": "language_server", + "remove_trailing_whitespace_on_save": true + } + } +} diff --git a/app/(docs)/[...slug]/page.tsx b/app/(docs)/[...slug]/page.tsx index 47a79157a..2ecec9a6f 100644 --- a/app/(docs)/[...slug]/page.tsx +++ b/app/(docs)/[...slug]/page.tsx @@ -1,12 +1,12 @@ -import fs from "fs/promises"; -import matter from "gray-matter"; -import { source } from "@/lib/source"; -import { notFound } from "next/navigation"; -import type { HeadingProps } from "@/types"; -import { getMDXComponents } from "@/components/mdx"; -import { API } from "@/components/reference/api-page"; -import { APIPage } from "@/components/openapi/api-page"; -import { Badge } from "@/components/ui/badge"; +import fs from 'fs/promises'; +import matter from 'gray-matter'; +import { source } from '@/lib/source'; +import { notFound } from 'next/navigation'; +import type { HeadingProps } from '@/types'; +import { getMDXComponents } from '@/components/mdx'; +import { API } from '@/components/reference/api-page'; +import { APIPage } from '@/components/openapi/api-page'; +import { Badge } from '@/components/ui/badge'; import { DocsPage, DocsPageLayout, @@ -17,42 +17,37 @@ import { DocsPageTitle, DocsPageDescription, DocsPageProse, -} from "@/components/layouts/page"; -import { - InteractiveHeader, - InteractiveLayout, -} from "@/components/layouts/interactive"; -import defaultMdxComponents from "fumadocs-ui/mdx"; -import { LLMShare } from "@/components/llm-share"; -import { CheckIcon } from "lucide-react"; -import { TagFilterSystem } from "@/components/ui/tag-filter-system"; -import { getAllFilterablePages } from "@/lib/source"; -import { Mermaid } from "@/components/mdx/mermaid"; -import { Callout } from "@/components/callout"; -import * as customIcons from "@/components/ui/icon"; -import * as lucideIcons from "lucide-react"; -import { FeedbackWrapper } from "@/components/feedback/feedback-wrapper"; +} from '@/components/layouts/page'; +import { InteractiveHeader, InteractiveLayout } from '@/components/layouts/interactive'; +import defaultMdxComponents from 'fumadocs-ui/mdx'; +import { LLMShare } from '@/components/llm-share'; +import { CheckIcon } from 'lucide-react'; +import { TagFilterSystem } from '@/components/ui/tag-filter-system'; +import { getAllFilterablePages } from '@/lib/source'; +import { Mermaid } from '@/components/mdx/mermaid'; +import { Callout } from '@/components/callout'; +import * as customIcons from '@/components/ui/icon'; +import * as lucideIcons from 'lucide-react'; +import { FeedbackWrapper } from '@/components/feedback/feedback-wrapper'; -export default async function Page(props: { - params: Promise<{ slug?: string[] }>; -}) { +export default async function Page(props: { params: Promise<{ slug?: string[] }> }) { const params = await props.params; const page = source.getPage(params.slug); if (!page) notFound(); - const fileContent = await fs.readFile(page.data._file.absolutePath, "utf-8"); + const fileContent = await fs.readFile(page.data._file.absolutePath, 'utf-8'); const { content: rawMarkdownContent } = matter(fileContent); const LLMContent = rawMarkdownContent - .split("\n") - .filter((line) => !line.trim().startsWith("import")) - .join("\n") + .split('\n') + .filter((line) => !line.trim().startsWith('import')) + .join('\n') .trim(); const MDX = page.data.body; if (!MDX) { - console.error("MDX component is undefined for page:", page.url); + console.error('MDX component is undefined for page:', page.url); notFound(); } @@ -60,21 +55,21 @@ export default async function Page(props: { const allFilterablePages = getAllFilterablePages(); // Extract section from current page URL for scoped filtering - const currentSection = page.url.split("/").filter(Boolean)[1] || "general"; + const currentSection = page.url.split('/').filter(Boolean)[1] || 'general'; // Helper function to get icon component const getIconComponent = (iconName: string) => { - const iconProps = { className: "w-3 h-3 shrink-0" }; + const iconProps = { className: 'w-3 h-3 shrink-0' }; // Check custom icons first const CustomIcon = (customIcons as any)[iconName]; - if (CustomIcon && typeof CustomIcon === "function") { + if (CustomIcon && typeof CustomIcon === 'function') { return ; } // Try with "Icon" suffix for custom icons const CustomIconWithSuffix = (customIcons as any)[`${iconName}Icon`]; - if (CustomIconWithSuffix && typeof CustomIconWithSuffix === "function") { + if (CustomIconWithSuffix && typeof CustomIconWithSuffix === 'function') { return ; } @@ -88,7 +83,7 @@ export default async function Page(props: { for (const pattern of lucidePatterns) { const LucideIcon = (lucideIcons as any)[pattern]; - if (LucideIcon && typeof LucideIcon === "function") { + if (LucideIcon && typeof LucideIcon === 'function') { return ; } } @@ -140,10 +135,8 @@ export default async function Page(props: { /> ), h1: ({ children, ...props }: HeadingProps) => { - const H1 = - defaultMdxComponents.h1 as React.ComponentType; - const id = - typeof children === "string" ? children : undefined; + const H1 = defaultMdxComponents.h1 as React.ComponentType; + const id = typeof children === 'string' ? children : undefined; return (

{children} @@ -158,28 +151,21 @@ export default async function Page(props: { /> ), hr: (props: React.PropsWithChildren) => ( -
+
), - input: ( - props: React.InputHTMLAttributes, - ) => { - if (props.type === "checkbox") { + input: (props: React.InputHTMLAttributes) => { + if (props.type === 'checkbox') { return (
- {props.checked && ( - - )} + {props.checked && }
); @@ -191,10 +177,7 @@ export default async function Page(props: { />
- + @@ -243,10 +226,8 @@ export default async function Page(props: { /> ), h1: ({ children, ...props }: HeadingProps) => { - const H1 = - defaultMdxComponents.h1 as React.ComponentType; - const id = - typeof children === "string" ? children : undefined; + const H1 = defaultMdxComponents.h1 as React.ComponentType; + const id = typeof children === 'string' ? children : undefined; return (

{children} @@ -261,28 +242,21 @@ export default async function Page(props: { /> ), hr: (props: React.PropsWithChildren) => ( -
+
), - input: ( - props: React.InputHTMLAttributes, - ) => { - if (props.type === "checkbox") { + input: (props: React.InputHTMLAttributes) => { + if (props.type === 'checkbox') { return (
- {props.checked && ( - - )} + {props.checked && }
); @@ -294,10 +268,7 @@ export default async function Page(props: { />
- + @@ -314,9 +285,7 @@ export async function generateStaticParams() { ); } -export async function generateMetadata(props: { - params: Promise<{ slug?: string[] }>; -}) { +export async function generateMetadata(props: { params: Promise<{ slug?: string[] }> }) { const params = await props.params; const page = source.getPage(params.slug); if (!page) notFound(); diff --git a/app/(docs)/error.tsx b/app/(docs)/error.tsx index 1930ed80b..33c463b4f 100644 --- a/app/(docs)/error.tsx +++ b/app/(docs)/error.tsx @@ -1,7 +1,7 @@ -"use client"; +'use client'; -import React from "react"; -import Link from "next/link"; +import React from 'react'; +import Link from 'next/link'; export default function Error({ error, @@ -12,31 +12,31 @@ export default function Error({ }) { React.useEffect(() => { // Hide sidebar for errors (including 404s) - const aside = document.querySelector("aside"); + const aside = document.querySelector('aside'); if (aside) { - aside.style.display = "none"; + aside.style.display = 'none'; } return () => { - const asideCleanup = document.querySelector("aside"); + const asideCleanup = document.querySelector('aside'); if (asideCleanup) { - asideCleanup.style.display = ""; + asideCleanup.style.display = ''; } }; }, []); // Check if this is likely a 404 error - const is404 = error.message?.includes("404") || error.message?.includes("not found"); + const is404 = error.message?.includes('404') || error.message?.includes('not found'); return (

- {is404 ? "Page not found" : "Something went wrong"} + {is404 ? 'Page not found' : 'Something went wrong'}

{is404 ? "The documentation you are looking for doesn't exist or has been moved." - : "An error occurred while loading this page."} + : 'An error occurred while loading this page.'}

); -} \ No newline at end of file +} diff --git a/app/(docs)/layout.tsx b/app/(docs)/layout.tsx index 6058b6ff1..e9c235f59 100644 --- a/app/(docs)/layout.tsx +++ b/app/(docs)/layout.tsx @@ -1,7 +1,7 @@ -import { DocsLayout } from "@/components/layouts/docs"; -import type { ReactNode } from "react"; -import { baseOptions } from "@/app/layout.config"; -import { source } from "@/lib/source"; +import { DocsLayout } from '@/components/layouts/docs'; +import type { ReactNode } from 'react'; +import { baseOptions } from '@/app/layout.config'; +import { source } from '@/lib/source'; export default function Layout({ children }: { children: ReactNode }) { return ( diff --git a/app/(docs)/not-found.tsx b/app/(docs)/not-found.tsx index 315b86fb6..8be677752 100644 --- a/app/(docs)/not-found.tsx +++ b/app/(docs)/not-found.tsx @@ -1,20 +1,21 @@ -import Link from "next/link"; +import Link from 'next/link'; export default function DocsNotFound() { return ( <> -