Skip to content

Commit

Permalink
chore: bump Docusaurus to v3 (#1176)
Browse files Browse the repository at this point in the history
  • Loading branch information
barjin authored Sep 3, 2024
1 parent c05bcb9 commit 13f0942
Show file tree
Hide file tree
Showing 39 changed files with 23,349 additions and 11,345 deletions.
3 changes: 2 additions & 1 deletion .markdownlint.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@
"link-fragments": false,
"no-duplicate-heading": {
"siblings_only": true
}
},
"no-bare-urls": false
}
4 changes: 2 additions & 2 deletions apify-docs-theme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"access": "public"
},
"dependencies": {
"@apify/docs-search-modal": "^1.0.26",
"@docusaurus/theme-common": "^2.4.1",
"@apify/docs-search-modal": "^1.1.0",
"@docusaurus/theme-common": "^3.5.2",
"@stackql/docusaurus-plugin-hubspot": "^1.1.0",
"axios": "^1.7.4",
"babel-loader": "^9.1.3",
Expand Down
6 changes: 3 additions & 3 deletions apify-docs-theme/src/theme/DocBreadcrumbs/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import Link from '@docusaurus/Link';
import { ThemeClassNames } from '@docusaurus/theme-common';
import {
useSidebarBreadcrumbs,
useHomePageRoute,
} from '@docusaurus/theme-common/internal';
} from '@docusaurus/plugin-content-docs/client';
import { ThemeClassNames } from '@docusaurus/theme-common';
import { useHomePageRoute } from '@docusaurus/theme-common/internal';
import { translate } from '@docusaurus/Translate';
import HomeBreadcrumbItem from '@theme/DocBreadcrumbs/Items/Home';
import clsx from 'clsx';
Expand Down
2 changes: 1 addition & 1 deletion apify-docs-theme/src/theme/DocSidebarItem/Link/index.jsx
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 { ThemeClassNames } from '@docusaurus/theme-common';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import { isActiveSidebarItem } from '@docusaurus/theme-common/internal';
import { isActiveSidebarItem } from '@docusaurus/plugin-content-docs/client';
import Link from '@docusaurus/Link';
import isInternalUrl from '@docusaurus/isInternalUrl';
import IconExternalLink from '@theme/Icon/ExternalLink';
Expand Down
2 changes: 1 addition & 1 deletion apify-docs-theme/src/theme/NavbarItem/ComponentTypes.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import HtmlNavbarItem from '@theme/NavbarItem/HtmlNavbarItem';
import DocSidebarNavbarItem from '@theme/NavbarItem/DocSidebarNavbarItem';
import DocsVersionNavbarItem from '@theme/NavbarItem/DocsVersionNavbarItem';
import DocsVersionDropdownNavbarItem from '@theme/NavbarItem/DocsVersionDropdownNavbarItem';
import { useDocsVersion, useLayoutDoc } from '@docusaurus/theme-common/internal';
import { useDocsVersion, useLayoutDoc } from '@docusaurus/plugin-content-docs/client';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import React from 'react';

Expand Down
11 changes: 11 additions & 0 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ module.exports = {
},
],
() => ({
name: 'webpack-loader-fix',
configureWebpack() {
return {
module: {
Expand Down Expand Up @@ -190,6 +191,16 @@ module.exports = {
],
markdown: {
mermaid: true,
parseFrontMatter: async (params) => {
const result = await params.defaultParseFrontMatter(params);

const ogImageURL = new URL('https://apify.com/og-image/docs-article');

ogImageURL.searchParams.set('title', result.frontMatter.title);
result.frontMatter.image ??= ogImageURL.toString();

return result;
},
},
themeConfig: config.themeConfig,
staticDirectories: ['apify-docs-theme/static', 'static'],
Expand Down
Loading

0 comments on commit 13f0942

Please sign in to comment.