Skip to content

Commit

Permalink
Update Docusaurus to 3.6 and enable faster builds
Browse files Browse the repository at this point in the history
  • Loading branch information
t1m0thyj committed Nov 8, 2024
1 parent 8a73fe7 commit b3299cb
Show file tree
Hide file tree
Showing 9 changed files with 4,099 additions and 2,101 deletions.
17 changes: 5 additions & 12 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ const versionsArray = require("./versions.json");

module.exports = {
title: "Zowe Docs",
tagline:
"Combining the past and the present to build the future of Mainframe",
tagline: "Combining the past and the present to build the future of Mainframe",
url: "https://docs.zowe.org/",
baseUrl: "/",
onBrokenLinks: "warn",
Expand All @@ -18,18 +17,12 @@ module.exports = {
comments: true
}
},
webpack: {
jsLoader: (isServer) => ({
loader: require.resolve("esbuild-loader"),
options: {
loader: "tsx",
format: isServer ? "cjs" : undefined,
target: isServer ? "node12" : "es2017",
},
}),
future: {
// https://docusaurus.io/blog/releases/3.6#docusaurus-faster
experimental_faster: true,
},
themeConfig: {
docs: {
docs: {
sidebar: {
hideable: true
}
Expand Down
6,154 changes: 4,080 additions & 2,074 deletions package-lock.json

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@
"docs:pdf:user": "npx docs-to-pdf --initialDocURLs=\"http://localhost:3000/stable/getting-started/overview,http://localhost:3000/stable/user-guide/installandconfig,http://localhost:3000/stable/troubleshoot/troubleshooting\" --contentSelector=\"article\" --paginationSelector=\".pagination-nav__link--next\" --cssStyle=\":root{--ifm-font-size-base: 60%;}\" --excludeSelectors=\".announcementBar_UUUQ,nav.navbar,.docSidebarContainer_3pwe,.docMainContainer_2pgU .col.col--3,footer.footer,.docItemContainer_2szM > .margin-vert--xl > .row > .col:first-child,.pagination-nav,.docsRating,.navbar__inner,.thin-scrollbar\" --coverImage=\"http://localhost:3000/img/zowe-icon.png\" --coverTitle=\"Zowe Documentation\" --outputPDFFilename=\"static/zowe-docs-user.pdf\" --protocolTimeout=1800000"
},
"dependencies": {
"@docusaurus/core": "^3.4.0",
"@docusaurus/plugin-client-redirects": "^3.4.0",
"@docusaurus/plugin-pwa": "^3.4.0",
"@docusaurus/preset-classic": "^3.4.0",
"@mdx-js/react": "^3.0.0",
"@docusaurus/core": "^3.6.0",
"@docusaurus/faster": "^3.5.2",
"@docusaurus/plugin-client-redirects": "^3.6.0",
"@docusaurus/plugin-pwa": "^3.6.0",
"@docusaurus/preset-classic": "^3.6.0",
"@mdx-js/react": "^3.1.0",
"clsx": "^2.1.1",
"esbuild-loader": "^4.2.2",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-medium-image-zoom": "^5.2.8",
"react-medium-image-zoom": "^5.2.10",
"reading-time": "^1.5.0"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions src/theme/DocItem/DocContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { MDXProvider } from "@mdx-js/react";
import {
useDoc,
useDocsVersion,
useTitleFormatter,
} from "@docusaurus/theme-common/internal";
} from "@docusaurus/plugin-content-docs/client";
import { useTitleFormatter } from "@docusaurus/theme-common/internal";
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
import useBaseUrl from "@docusaurus/useBaseUrl";
import DocPaginator from "@theme/DocPaginator";
Expand Down
2 changes: 1 addition & 1 deletion src/theme/DocItem/Layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import React from 'react';
import clsx from 'clsx';
import {useWindowSize} from '@docusaurus/theme-common';
import {useDoc} from '@docusaurus/theme-common/internal';
import {useDoc} from '@docusaurus/plugin-content-docs/client';
import DocItemPaginator from '@theme/DocItem/Paginator';
import DocVersionBanner from '@theme/DocVersionBanner';
import DocVersionBadge from '@theme/DocVersionBadge';
Expand Down
2 changes: 1 addition & 1 deletion src/theme/DocItem/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useEffect, useRef, useState } from "react";
import readingTime from "reading-time/lib/reading-time";
import { DocProvider } from "@docusaurus/theme-common/internal";
import { DocProvider } from "@docusaurus/plugin-content-docs/client";

//Components
import { DocContent } from "./DocContent";
Expand Down
3 changes: 1 addition & 2 deletions src/theme/DocVersionBanner/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ import React from 'react';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import Link from '@docusaurus/Link';
import Translate from '@docusaurus/Translate';
import {useActivePlugin, useDocVersionSuggestions} from '@docusaurus/plugin-content-docs/client';
import {useActivePlugin, useDocsVersion, useDocVersionSuggestions} from '@docusaurus/plugin-content-docs/client';
import {useDocsPreferredVersion} from '@docusaurus/theme-common';
import {useDocsVersion} from "@docusaurus/theme-common/internal";

function UnreleasedVersionLabel({siteTitle, versionMetadata}) {
return (
Expand Down
2 changes: 1 addition & 1 deletion src/theme/MDXComponents/Tpsr.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react";
import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
import {
useDocsVersion,
} from "@docusaurus/theme-common/internal";
} from "@docusaurus/plugin-content-docs/client";

function Tpsr() {
const { siteConfig } = useDocusaurusContext();
Expand Down
2 changes: 1 addition & 1 deletion src/theme/NavbarItem/DocsVersionDropdownNavbarItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
useActiveDocContext,
} from '@docusaurus/plugin-content-docs/client';
import {useDocsPreferredVersion} from '@docusaurus/theme-common';
import {useDocsVersionCandidates} from '@docusaurus/theme-common/internal';
import {useDocsVersionCandidates} from '@docusaurus/plugin-content-docs/client';
import {translate} from '@docusaurus/Translate';
import {useLocation} from '@docusaurus/router';
import DefaultNavbarItem from '@theme/NavbarItem/DefaultNavbarItem';
Expand Down

0 comments on commit b3299cb

Please sign in to comment.