website: add Carbon to homepage

This commit is contained in:
Yangshun
2022-03-16 13:37:31 +08:00
parent ab9be4e5cd
commit ad8cc45251
4 changed files with 72 additions and 17 deletions

View File

@@ -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 (
<div>
<script
async
type="text/javascript"
src="//cdn.carbonads.com/carbon.js?serve=CEAI4537&placement=wwwtechinterviewhandbookorg"
id="_carbonads_js"
/>
</div>
);
});
export default function DocItem(props) {
const {content: DocContent} = props;
const {metadata, frontMatter} = DocContent;