Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add not found wrapper and redirect #2453

Merged
merged 1 commit into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ const config: Config = {
"@docusaurus/plugin-client-redirects",
{
redirects: [
{
from: "/client/concepts/bootstrapping",
to: "/sdk_monitoring/",
},
{
from: "/client/concepts/bootstrapping",
to: "/client/concepts/initialize/#2-bootstrap-initialization",
Comment on lines +147 to 153
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The path /client/concepts/bootstrapping has two conflicting redirect rules. Only the first redirect to /sdk_monitoring/ will ever be applied, making the second redirect to /client/concepts/initialize/#2-bootstrap-initialization unreachable. Please consolidate these into a single redirect rule pointing to the intended final destination.

Spotted by Graphite Reviewer

Is this helpful? React 👍 or 👎 to let us know.

Expand Down
14 changes: 14 additions & 0 deletions src/theme/NotFound/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import React, { useEffect } from 'react';
import NotFound from '@theme-original/NotFound';
import type NotFoundType from '@theme/NotFound';
import type {WrapperProps} from '@docusaurus/types';

type Props = WrapperProps<typeof NotFoundType>;

export default function NotFoundWrapper(props: Props): JSX.Element {
return (
<>
<NotFound {...props} />
</>
);
}
Loading