Skip to content

Commit 1e80f1a

Browse files
committed
blog home page
1 parent 87fcbd1 commit 1e80f1a

File tree

20 files changed

+290
-54
lines changed

20 files changed

+290
-54
lines changed

blog/ai-code-reviews-reclaims-2023-10-05/blog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: How AI Code Review Reclaims Your Team's Time
44
description: How AI Code Review Reclaims Your Team's Time
55
authors: [simone]
66
tags: ["AI", "Code Review", "Productivity"]
7-
image: ./preview.png
7+
image: /img/blog-previews/ai-code-reviews-reclaims.png
88
---
99

1010
### Introduction

blog/ai-transforming-traditional-code-review-practices-2024-03-29/blog.md

Lines changed: 127 additions & 35 deletions
Large diffs are not rendered by default.

blog/boosting-engineering-efficiency-2023-11-13/blog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description:
55
In a world where the office is just a step away from your bed, we dive into
66
the challenges and triumphs of maintaining code quality across continents.
77
authors: [dotlabs]
8-
image: ./preview.jpeg
8+
image: /img/blog-previews/boosting-engineering-efficiency.jpeg
99
tags: ["AI", "Code Reviews", "Remote Work"]
1010
---
1111

blog/coderabbit-deep-dive-2023-08-26/blog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: AI and the Future of Code Reviews - A Deep Dive into CodeRabbit
44
description: AI and the Future of Code Reviews - A Deep Dive into CodeRabbit
55
authors: [gur, vishu]
66
tags: ["CodeRabbit", "AI", "Code Reviews"]
7-
image: ./preview.jpeg
7+
image: /img/blog-previews/coderabbit-deep-dive.jpeg
88
---
99

1010
We are witnessing an inflection point in the software development industry.

blog/fluxninja-acquisition-2024-03-17/blog.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ tags:
1616
"Caching",
1717
"Scheduler",
1818
]
19-
image: ./preview.png
19+
image: /img/blog-previews/fluxninja-acquisition.png
2020
---
2121

22-
![FluxNinja joins CodeRabbit](./preview.png)
22+
![FluxNinja joins CodeRabbit](/img/blog-previews/fluxninja-acquisition.png)
2323

2424
We are excited to announce that CodeRabbit has acquired
2525
[FluxNinja](https://fluxninja.com), a startup that provides a platform for

blog/how-we-built-cost-effective-generative-ai-application-2023-12-23/blog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ description:
66
effective and improve user experience.
77
authors: [gur]
88
tags: ["AI", "Cost Optimization", "Generative AI", "Code Review"]
9+
image: /img/blog-previews/how-we-built-cost-effective-generative-ai-application.png
910
---
1011

1112
# How we built a cost-effective Generative AI application

blog/modern-ai-stack-for-developer-productivity-2024-01-05/blog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Modern AI stack for developer productivity
44
description:
55
Elevate your development workflow with three pillars of developer productivity
66
tools powered by Artificial Intelligence
7-
image: ./preview.jpg
7+
image: /img/blog-previews/modern-ai-stack-for-developer-productivity.jpg
88
authors: [pradeep]
99
tags: ["AI", "Developer Tools", "Code Generation", "Code Review", "Knowledge"]
1010
---

blog/openai-rate-limits-2023-10-23/blog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description:
77
How CodeRabbit uses Aperture to manage OpenAI rate limits with request
88
prioritization
99
authors: [gur, sumanvs, nato]
10-
image: ./preview.png
10+
image: /img/blog-previews/openai-rate-limits.png
1111
tags: ["AI", "OpenAI", "Rate Limits", "Aperture"]
1212
---
1313

docusaurus.config.ts

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +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+
],
3855
[
3956
"@docusaurus/plugin-client-redirects",
4057
{
@@ -77,18 +94,7 @@ const config: Config = {
7794
breadcrumbs: true,
7895
showLastUpdateTime: true,
7996
},
80-
blog: {
81-
blogTitle: "CodeRabbit Blog",
82-
blogDescription: "Blog",
83-
tagsBasePath: "/tags",
84-
editLocalizedFiles: false,
85-
routeBasePath: "/blog",
86-
showReadingTime: true,
87-
blogSidebarCount: "ALL",
88-
blogSidebarTitle: "All our posts",
89-
blogListComponent: "@theme/BlogListPage",
90-
blogPostComponent: "@theme/BlogPostPage",
91-
},
97+
blog: false,
9298
theme: {
9399
customCss: "./src/css/custom.css",
94100
},

plugins/blog-plugin.js

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
const blogPluginExports = require("@docusaurus/plugin-content-blog");
2+
3+
const defaultBlogPlugin = blogPluginExports.default;
4+
5+
async function blogPluginExtended(...pluginOptions) {
6+
const blogPluginInstance = await defaultBlogPlugin(...pluginOptions);
7+
8+
return {
9+
// Add all properties of the default blog plugin so existing functionality is preserved
10+
...blogPluginInstance,
11+
/**
12+
* Override the default `contentLoaded` hook to access blog posts data
13+
*/
14+
contentLoaded: async function (data) {
15+
const { content, actions } = data;
16+
17+
const allBlogPosts = content.blogPosts;
18+
19+
async function createRecentPostModule(blogPost, index) {
20+
return {
21+
// Inject the metadata you need for each recent blog post
22+
metadata: await actions.createData(
23+
`blogpost-metadata-${index}.json`,
24+
JSON.stringify({
25+
title: blogPost.metadata.title,
26+
description: blogPost.metadata.description,
27+
frontMatter: blogPost.metadata.frontMatter,
28+
image: blogPost.metadata.frontMatter.image,
29+
link: blogPost.metadata.permalink,
30+
date: blogPost.metadata.date,
31+
}),
32+
),
33+
34+
// Inject the MDX excerpt as a JSX component prop
35+
// (what's above the <!-- truncate --> marker)
36+
Preview: {
37+
__import: true,
38+
// The markdown file for the blog post will be loaded by webpack
39+
path: blogPost.metadata.source,
40+
query: {
41+
truncated: true,
42+
},
43+
},
44+
};
45+
}
46+
47+
// Create the gallery page
48+
data.actions.addRoute({
49+
// Add route for the home page
50+
path: "/home",
51+
exact: true,
52+
53+
// The component to use for the "Home" page route
54+
component: "@site/src/components/Home/Home.tsx",
55+
// These are the props that will be passed to our "Home" page component
56+
modules: {
57+
blogPosts: await Promise.all(
58+
allBlogPosts.map(createRecentPostModule),
59+
),
60+
},
61+
});
62+
63+
// Call the default overridden `contentLoaded` implementation
64+
return blogPluginInstance.contentLoaded(data);
65+
},
66+
};
67+
}
68+
69+
module.exports = {
70+
...blogPluginExports,
71+
default: blogPluginExtended,
72+
};

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