migrate docs from npm to pnpm, fix Docusaurus deprecation warnings
## npm → pnpm - Delete package-lock.json, add pnpm-lock.yaml (deterministic installs) - Add packageManager field to package.json (pnpm@10.12.1) - Dockerfile: corepack enable + pnpm install --frozen-lockfile + pnpm build - Faster Docker builds (pnpm caches better than npm) ## Deprecation fixes - Move onBrokenMarkdownLinks from top-level config to markdown.hooks (deprecated in Docusaurus v3, removed in v4) - Build now produces zero deprecation warnings fix #70
This commit is contained in:
@@ -18,12 +18,13 @@ RUN uv run --with pydantic python docs/scripts/export_library.py
|
|||||||
# Stage 2: Build Docusaurus static site
|
# Stage 2: Build Docusaurus static site
|
||||||
FROM node:22-slim AS build
|
FROM node:22-slim AS build
|
||||||
|
|
||||||
|
RUN corepack enable && corepack prepare pnpm@10.12.1 --activate
|
||||||
|
|
||||||
WORKDIR /docs
|
WORKDIR /docs
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies (pnpm for deterministic, fast installs)
|
||||||
COPY docs/package.json docs/package-lock.json* ./
|
COPY docs/package.json docs/pnpm-lock.yaml ./
|
||||||
# hadolint ignore=DL3016
|
RUN pnpm install --frozen-lockfile
|
||||||
RUN npm install
|
|
||||||
|
|
||||||
# Copy Docusaurus config and source
|
# Copy Docusaurus config and source
|
||||||
COPY docs/docusaurus.config.js docs/sidebars.js docs/babel.config.js docs/tsconfig.json ./
|
COPY docs/docusaurus.config.js docs/sidebars.js docs/babel.config.js docs/tsconfig.json ./
|
||||||
@@ -36,7 +37,7 @@ COPY --from=extract /build/docs/docs/api/ docs/api/
|
|||||||
COPY docs/docs/api/index.md docs/api/index.md
|
COPY docs/docs/api/index.md docs/api/index.md
|
||||||
COPY --from=extract /build/docs/static/library.json static/library.json
|
COPY --from=extract /build/docs/static/library.json static/library.json
|
||||||
|
|
||||||
RUN npm run build
|
RUN pnpm build
|
||||||
|
|
||||||
|
|
||||||
# Stage 3: Serve with nginx
|
# Stage 3: Serve with nginx
|
||||||
|
|||||||
@@ -8,10 +8,12 @@ const config = {
|
|||||||
url: "http://docs.homelab.fhirworx.io",
|
url: "http://docs.homelab.fhirworx.io",
|
||||||
baseUrl: "/",
|
baseUrl: "/",
|
||||||
onBrokenLinks: "warn",
|
onBrokenLinks: "warn",
|
||||||
onBrokenMarkdownLinks: "warn",
|
|
||||||
|
|
||||||
markdown: {
|
markdown: {
|
||||||
format: "detect",
|
format: "detect",
|
||||||
|
hooks: {
|
||||||
|
onBrokenMarkdownLinks: "warn",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
i18n: {
|
i18n: {
|
||||||
|
|||||||
18992
docs/package-lock.json
generated
18992
docs/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -39,5 +39,6 @@
|
|||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18.0"
|
"node": ">=18.0"
|
||||||
}
|
},
|
||||||
|
"packageManager": "pnpm@10.12.1"
|
||||||
}
|
}
|
||||||
|
|||||||
11975
docs/pnpm-lock.yaml
generated
Normal file
11975
docs/pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user