diff --git a/hbase-website/README.md b/hbase-website/README.md index cbc365b89660..83ea659c3826 100644 --- a/hbase-website/README.md +++ b/hbase-website/README.md @@ -59,9 +59,9 @@ Legacy documentation is preserved for those users who have old bookmarked links Before you begin, ensure you have the following installed: -- **Node.js version 22** - JavaScript runtime (like the JVM for Java) +- **Node.js version 24** - JavaScript runtime (like the JVM for Java) - Download from [nodejs.org](https://nodejs.org/) - - Verify installation: `node --version` (should show v22.12+) + - Verify installation: `node --version` (should show v24.18.1+) - **NPM** - Node Package Manager (like Maven for Java) - Comes bundled with Node.js @@ -254,13 +254,14 @@ The ESLint configuration includes a custom rule (`custom/no-react-router-link`) #### 1. Install Dependencies -Think of this as `mvn install`: +Install the exact dependency versions recorded in `package-lock.json`: ```bash -npm install +npm ci ``` -This downloads all required packages from npm (similar to Maven Central). +This is the right command when you are working with the existing dependency set. It removes any existing `node_modules/` directory and recreates it from `package-lock.json`, so local installs match CI and Maven site generation. +Use `npm install` only when you intentionally add, remove, or update dependencies and need to update `package.json` or `package-lock.json`. #### 2. Generate Developers and Config Data @@ -453,12 +454,13 @@ When you run `mvn site`, the website module automatically: - Removes `node_modules/` directory - Ensures a fresh build environment -2. **Installs Node.js v22.20.0 and npm 11.6.2** (if not already available) +2. **Installs Node.js v24.18.1 and npm 11.6.2** (if not already available) - Installed to `target/` directory - Does not affect your system Node/npm installation -3. **Runs `npm install`** to install all dependencies - - Reads from `package.json` +3. **Runs `npm ci`** to install all dependencies + - Reads exact dependency versions from `package-lock.json` + - Removes and recreates `node_modules/` - Installs to `node_modules/` 4. **Extracts developers data** from the parent `pom.xml` diff --git a/hbase-website/app/components/docs/layout/docs/index.tsx b/hbase-website/app/components/docs/layout/docs/index.tsx index 02e682574044..07aad0e5f18c 100644 --- a/hbase-website/app/components/docs/layout/docs/index.tsx +++ b/hbase-website/app/components/docs/layout/docs/index.tsx @@ -58,7 +58,8 @@ export interface DocsLayoutProps extends BaseLayoutProps { } interface SidebarOptions - extends ComponentProps<"aside">, + extends + ComponentProps<"aside">, Pick, "defaultOpenLevel" | "prefetch"> { enabled?: boolean; component?: ReactNode; diff --git a/hbase-website/app/components/docs/layout/docs/page/client.tsx b/hbase-website/app/components/docs/layout/docs/page/client.tsx index 4d47579c1035..35b8e25a4885 100644 --- a/hbase-website/app/components/docs/layout/docs/page/client.tsx +++ b/hbase-website/app/components/docs/layout/docs/page/client.tsx @@ -29,8 +29,8 @@ import { } from "react"; import { ChevronDown, ChevronLeft, ChevronRight } from "lucide-react"; import Link from "fumadocs-core/link"; -import { useI18n } from "fumadocs-ui/contexts/i18n"; import { useTreeContext, useTreePath } from "fumadocs-ui/contexts/tree"; +import { T } from "@fuma-translate/react"; import type * as PageTree from "fumadocs-core/page-tree"; import { usePathname } from "fumadocs-core/framework"; import { type BreadcrumbOptions, getBreadcrumbItemsFromPath } from "fumadocs-core/breadcrumb"; @@ -101,7 +101,6 @@ export function PageTOCPopover({ className, children, ...rest }: ComponentProps< } export function PageTOCPopoverTrigger({ className, ...props }: ComponentProps<"button">) { - const { text } = useI18n(); const { open } = use(TocPopoverContext)!; const items = useTOCItems(); const active = useActiveAnchor(); @@ -134,7 +133,7 @@ export function PageTOCPopoverTrigger({ className, ...props }: ComponentProps<"b showItem && "pointer-events-none -translate-y-full opacity-0" )} > - {path?.name ?? text.toc} + {path?.name ?? } , "children"> & { date: Date }) { - const { text } = useI18n(); const [date, setDate] = useState(""); useEffect(() => { @@ -233,7 +231,7 @@ export function PageLastUpdate({ return (

- {text.lastUpdate} {date} + {date}

); } @@ -283,7 +281,6 @@ export function PageFooter({ items, children, className, ...props }: FooterProps } function FooterItem({ item, index }: { item: Item; index: 0 | 1 }) { - const { text } = useI18n(); const Icon = index === 0 ? ChevronLeft : ChevronRight; return ( @@ -304,7 +301,12 @@ function FooterItem({ item, index }: { item: Item; index: 0 | 1 }) {

{item.name}

- {item.description ?? (index === 0 ? text.previousPage : text.nextPage)} + {item.description ?? + (index === 0 ? ( + + ) : ( + + ))}

); diff --git a/hbase-website/app/components/docs/layout/docs/page/index.tsx b/hbase-website/app/components/docs/layout/docs/page/index.tsx index 8f6d2a7756b2..dc697739f462 100644 --- a/hbase-website/app/components/docs/layout/docs/page/index.tsx +++ b/hbase-website/app/components/docs/layout/docs/page/index.tsx @@ -19,7 +19,7 @@ import type { ComponentProps, ReactNode } from "react"; import { buttonVariants } from "../../../../../ui/button"; import { Edit, Text } from "lucide-react"; -import { I18nLabel } from "fumadocs-ui/contexts/i18n"; +import { T } from "@fuma-translate/react"; import { type BreadcrumbProps, type FooterProps, @@ -176,7 +176,7 @@ export function DocsPage({ className="text-fd-muted-foreground inline-flex items-center gap-1.5 text-sm" > - + {tocOptions.style === "clerk" ? : } @@ -206,7 +206,7 @@ export function EditOnGitHub(props: ComponentProps<"a">) { {props.children ?? ( <> - + )} diff --git a/hbase-website/app/components/docs/layout/language-toggle.tsx b/hbase-website/app/components/docs/layout/language-toggle.tsx index 0427f62d9702..81d9450f87b9 100644 --- a/hbase-website/app/components/docs/layout/language-toggle.tsx +++ b/hbase-website/app/components/docs/layout/language-toggle.tsx @@ -18,6 +18,7 @@ import type { ComponentProps } from "react"; import { useI18n } from "fumadocs-ui/contexts/i18n"; +import { T, useTranslations } from "@fuma-translate/react"; import { Popover, PopoverContent, PopoverTrigger } from "../../../ui/popover"; import { buttonVariants } from "../../../ui/button"; import { cn } from "@/lib/utils"; @@ -26,12 +27,13 @@ export type LanguageSelectProps = ComponentProps<"button">; export function LanguageToggle(props: LanguageSelectProps): React.ReactElement { const context = useI18n(); + const t = useTranslations(); if (!context.locales) throw new Error("Missing ``"); return (

- {context.text.chooseLanguage} +

{context.locales.map((item) => (