Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Sep 4, 2025. It is now read-only.

Commitdf82440

Browse files
committed
Update routing and styling
1 parentd8a210f commitdf82440

File tree

4 files changed

+15
-66
lines changed

4 files changed

+15
-66
lines changed

‎docs/introduction/about.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ title: What is CodeRabbit?
44
sidebar_label:What is CodeRabbit?
55
description:Accelerate Code Reviews with AI
66
image:"/preview_meta.jpg"
7+
slug:"/"
78
---
89

910
<head>

‎docusaurus.config.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ const config: Config = {
7171
docs:{
7272
sidebarPath:"./sidebars.ts",
7373
// path: "./docs",
74-
routeBasePath:"/docs",
74+
routeBasePath:"/",
7575
breadcrumbs:false,
7676
},
7777
blog:{

‎src/pages/index.module.css‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@
44
*/
55

66
.heroBanner {
7-
padding:4rem0;
8-
text-align: center;
9-
position: relative;
10-
overflow: hidden;
7+
padding:4rem0;
8+
text-align: center;
9+
position: relative;
10+
overflow: hidden;
1111
}
1212

1313
@media screenand (max-width:996px) {
14-
.heroBanner {
15-
padding:2rem;
16-
}
14+
.heroBanner {
15+
padding:2rem;
16+
}
1717
}
1818

1919
.buttons {
20-
display: flex;
21-
align-items: center;
22-
justify-content: center;
20+
display: flex;
21+
align-items: center;
22+
justify-content: center;
2323
}

‎src/pages/index.tsx‎

Lines changed: 3 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,6 @@
1-
importuseDocusaurusContextfrom"@docusaurus/useDocusaurusContext";
2-
importHomepageFeaturesfrom"@site/src/components/HomepageFeatures";
3-
importLayoutfrom"@theme/Layout";
4-
5-
// function HomepageHeader() {
6-
// const { siteConfig } = useDocusaurusContext();
7-
// return (
8-
// <header className={clsx("hero hero--primary", styles.heroBanner)}>
9-
// <div className="container">
10-
// <Heading as="h1" className="hero__title">
11-
// {siteConfig.title}
12-
// </Heading>
13-
// <p className="hero__subtitle">{siteConfig.tagline}</p>
14-
// </div>
15-
// </header>
16-
// );
17-
// }
18-
19-
import{useHistory}from"react-router-dom";// Import useHistory hook
20-
21-
functionHomepageHeader(){
22-
consthistory=useHistory();// Initialize useHistory hook
23-
24-
// Function to navigate to the Blog section
25-
constgoToBlog=()=>{
26-
history.push("/blog");// Redirect to the /blog route
27-
};
28-
29-
// Function to navigate to the Docs section
30-
constgoToDocs=()=>{
31-
history.push("/docs/introduction");// Redirect to the /docs route
32-
};
33-
34-
return(
35-
<header>
36-
{/* Blog link */}
37-
<buttononClick={goToBlog}>Go to Blog</button>
38-
39-
{/* Docs link */}
40-
<buttononClick={goToDocs}>Go to Docs</button>
41-
</header>
42-
);
43-
}
1+
import{Redirect}from"@docusaurus/router";
442

453
exportdefaultfunctionHome():JSX.Element{
46-
const{ siteConfig}=useDocusaurusContext();
47-
return(
48-
<Layout
49-
title={`Docs`}
50-
description="Description will go into a meta tag in <head />"
51-
>
52-
<HomepageHeader/>
53-
<main>
54-
<HomepageFeatures/>
55-
</main>
56-
</Layout>
57-
);
4+
// const { siteConfig } = useDocusaurusContext();
5+
return<Redirectto="/introduction"/>;
586
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp