Skip to content

Commit 4e46a4d

Browse files
committed
add algolia
1 parent e3fdcc9 commit 4e46a4d

File tree

2 files changed

+40
-33
lines changed

2 files changed

+40
-33
lines changed

docusaurus.config.ts

+39-32
Original file line numberDiff line numberDiff line change
@@ -35,23 +35,23 @@ const config: Config = {
3535
},
3636

3737
plugins: [
38-
[
39-
"./plugins/blog-plugin",
40-
{
41-
id: "blog",
42-
routeBasePath: "blog",
43-
path: "./blog",
44-
blogTitle: "CodeRabbit Blog",
45-
blogDescription: "Blog",
46-
tagsBasePath: "/tags",
47-
editLocalizedFiles: false,
48-
showReadingTime: true,
49-
blogSidebarCount: "ALL",
50-
blogSidebarTitle: "All our posts",
51-
blogListComponent: "@theme/BlogListPage",
52-
blogPostComponent: "@theme/BlogPostPage",
53-
},
54-
],
38+
//[
39+
// "./plugins/blog-plugin",
40+
// {
41+
// id: "blog",
42+
// routeBasePath: "blog",
43+
// path: "./blog",
44+
// blogTitle: "CodeRabbit Blog",
45+
// blogDescription: "Blog",
46+
// tagsBasePath: "/tags",
47+
// editLocalizedFiles: false,
48+
// showReadingTime: true,
49+
// blogSidebarCount: "ALL",
50+
// blogSidebarTitle: "All our posts",
51+
// blogListComponent: "@theme/BlogListPage",
52+
// blogPostComponent: "@theme/BlogPostPage",
53+
// },
54+
//],
5555
[
5656
"@docusaurus/plugin-client-redirects",
5757
{
@@ -135,21 +135,7 @@ const config: Config = {
135135
hideable: true,
136136
},
137137
},
138-
metadata: [
139-
{ name: "keywords", content: "ai, blog" },
140-
{ name: "twitter:card", content: "summary_large_image" },
141-
],
142-
headTags: [
143-
// Declare a <link> preconnect tag
144-
{
145-
tagName: "link",
146-
attributes: {
147-
rel: "preconnect",
148-
href: "https://coderabbit.ai/blog/coderabbit-deep-dive",
149-
},
150-
},
151-
// Declare some json-ld structured data
152-
],
138+
metadata: [{ name: "twitter:card", content: "summary_large_image" }],
153139
navbar: {
154140
title: "",
155141
hideOnScroll: true,
@@ -172,6 +158,27 @@ const config: Config = {
172158
theme: prismThemes.github,
173159
darkTheme: prismThemes.dracula,
174160
},
161+
algolia: {
162+
// The application ID provided by Algolia
163+
appId: "4MKM4DJT5D",
164+
165+
// Public API key: it is safe to commit it
166+
apiKey: "506abdefe85f2dc642b70e28b5026d77",
167+
168+
indexName: "coderabbit",
169+
170+
// Optional: see doc section below
171+
contextualSearch: true,
172+
173+
// Optional: Algolia search parameters
174+
searchParameters: {},
175+
176+
// Optional: path for search page that enabled by default (`false` to disable it)
177+
searchPagePath: "search",
178+
179+
// Optional: whether the insights feature is enabled or not on Docsearch (`false` by default)
180+
insights: false,
181+
},
175182
} satisfies Preset.ThemeConfig,
176183
};
177184

src/theme/Footer/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ function CustomFooter(props) {
8383
<div className="bg-neutral-700 shrink-0 h-px mt-6 max-md:max-w-full" />
8484
<div className="justify-between flex w-full gap-5 mt-7 items-start max-md:max-w-full max-md:flex-wrap">
8585
<div className="text-sm font-medium font-satoshi text-customWhite">
86-
CodeRabbit © 2023.
86+
CodeRabbit © ${new Date().getFullYear()}
8787
</div>
8888
<div className="justify-end items-stretch self-stretch flex gap-4 pl-20 max-md:max-w-full max-md:flex-wrap max-md:pl-5">
8989
<a

0 commit comments

Comments
 (0)