diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js
index 106ba614..6bf80cbc 100755
--- a/website/docusaurus.config.js
+++ b/website/docusaurus.config.js
@@ -40,7 +40,7 @@ module.exports = {
href: '/algorithms/introduction',
},
{label: 'Blog', to: 'blog', position: 'left'},
- {label: 'Advertise', to: '/advertise', position: 'left'},
+ // {label: 'Advertise', to: '/advertise', position: 'left'},
{
href: 'https://github.com/yangshun/tech-interview-handbook',
position: 'right',
diff --git a/website/src/components/CarbonAd/index.js b/website/src/components/CarbonAd/index.js
new file mode 100644
index 00000000..2801eed6
--- /dev/null
+++ b/website/src/components/CarbonAd/index.js
@@ -0,0 +1,51 @@
+import React from 'react';
+
+export default React.memo(() => {
+ return (
+
+
+ {process.env.NODE_ENV === 'development' && (
+
+ )}
+
+ );
+});
diff --git a/website/src/pages/index.js b/website/src/pages/index.js
index fa572174..6e6edcf5 100755
--- a/website/src/pages/index.js
+++ b/website/src/pages/index.js
@@ -7,6 +7,7 @@ import useBaseUrl from '@docusaurus/useBaseUrl';
import styles from './styles.module.css';
import successStories from '../data/successStories';
+import CarbonAd from '../components/CarbonAd';
const BLIND_75_URL =
'https://www.teamblind.com/post/New-Year-Gift---Curated-List-of-Top-75-LeetCode-Questions-to-Save-Your-Time-OaM1orEU';
@@ -110,6 +111,7 @@ function Home() {
description={siteConfig.tagline}>
+
@@ -210,6 +212,20 @@ function WhatIsThisSection() {
);
}
+function CarbonAdSection() {
+ return (
+
+ );
+}
+
function MoonchaserSection() {
// Because the SSR and client output can differ and hydration doesn't patch attribute differences,
// we'll render this on the browser only.
@@ -281,7 +297,7 @@ function HowToUseStep({index, title, ctaLink, contents}) {
function HowToUseSection() {
return (
-
+
@@ -505,7 +521,7 @@ function AlgoMonsterSection() {
function TweetsSection() {
return (
-
+
+
diff --git a/website/src/theme/DocItem/index.js b/website/src/theme/DocItem/index.js
index 3ba7e6ba..51deae1f 100644
--- a/website/src/theme/DocItem/index.js
+++ b/website/src/theme/DocItem/index.js
@@ -10,21 +10,9 @@ import TOCCollapsible from '@theme/TOCCollapsible';
import Heading from '@theme/Heading';
import styles from './styles.module.css';
import {ThemeClassNames, useWindowSize} from '@docusaurus/theme-common';
+import CarbonAd from '../../components/CarbonAd';
import SidebarAd from '../../components/SidebarAd';
-const CarbonAd = React.memo(() => {
- return (
-
-
-
- );
-});
-
export default function DocItem(props) {
const {content: DocContent} = props;
const {metadata, frontMatter} = DocContent;