Skip to content

Commit c33450a

Browse files
committed
Add sitemap configuration and update redirect paths
1 parent dd29a9a commit c33450a

File tree

2 files changed

+16
-15
lines changed

2 files changed

+16
-15
lines changed

docusaurus.config.ts

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type * as Preset from "@docusaurus/preset-classic";
22
import type { Config } from "@docusaurus/types";
33
import { themes as prismThemes } from "prism-react-renderer";
4+
import { EnumChangefreq } from "sitemap";
45

56
// const baseUrl = "/docs";
67
// const baseUrl = "/blog";
@@ -40,10 +41,6 @@ const config: Config = {
4041
"@docusaurus/plugin-client-redirects",
4142
{
4243
redirects: [
43-
{
44-
to: "docs/introduction",
45-
from: "/",
46-
},
4744
{
4845
to: "/docs/get-started/signup",
4946
from: "/docs/get-started",
@@ -70,8 +67,7 @@ const config: Config = {
7067
{
7168
docs: {
7269
sidebarPath: "./sidebars.ts",
73-
// path: "./docs",
74-
routeBasePath: "/",
70+
routeBasePath: "/docs",
7571
breadcrumbs: true,
7672
},
7773
blog: {
@@ -81,6 +77,12 @@ const config: Config = {
8177
theme: {
8278
customCss: "./src/css/custom.css",
8379
},
80+
sitemap: {
81+
changefreq: "weekly" as EnumChangefreq,
82+
priority: 0.5,
83+
ignorePatterns: ["/tags/**"],
84+
filename: "sitemap.xml",
85+
},
8486
} satisfies Preset.Options,
8587
],
8688
],
@@ -129,21 +131,20 @@ const config: Config = {
129131
href: "https://coderabbit.ai",
130132
},
131133
items: [
132-
{
133-
// type: "docSidebar",
134-
// sidebarId: "blogsSidebar",
135-
position: "left",
136-
label: "Blog",
137-
to: "/blog",
138-
},
139134
{
140135
type: "docSidebar",
141136
sidebarId: "docsSidebar",
142137
position: "left",
143138
label: "Docs",
144139
to: "/docs/introduction",
145140
},
146-
141+
{
142+
// type: "docSidebar",
143+
// sidebarId: "blogsSidebar",
144+
position: "left",
145+
label: "Blog",
146+
to: "/blog",
147+
},
147148
{
148149
href: "https://discord.gg/CVtemB5c",
149150
className: "header-discord-link",

src/pages/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ import { Redirect } from "@docusaurus/router";
22

33
export default function Home(): JSX.Element {
44
// const { siteConfig } = useDocusaurusContext();
5-
return <Redirect to="/introduction" />;
5+
return <Redirect to="/docs/introduction" />;
66
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy