From 3c3dc88d57b1109214bc9601e19335ee68eae631 Mon Sep 17 00:00:00 2001 From: Nathaniel Tucker Date: Sun, 10 Sep 2023 23:06:45 -0500 Subject: [PATCH] docs: Do render github button iframe in server HTML --- website/src/pages/index.js | 36 +++++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/website/src/pages/index.js b/website/src/pages/index.js index 54ae2a9a6ef5..9d9d96b2b9a6 100644 --- a/website/src/pages/index.js +++ b/website/src/pages/index.js @@ -1,3 +1,4 @@ +import BrowserOnly from '@docusaurus/BrowserOnly'; import Head from '@docusaurus/Head'; import Link from '@docusaurus/Link'; import useBaseUrl from '@docusaurus/useBaseUrl'; @@ -10,6 +11,7 @@ import React from 'react'; import styles from './index.module.css'; import Demo from '../components/Demo/index'; import HomepageFeatures from '../components/HomepageFeatures'; +import { isGoogleBot } from '../components/Playground/isGoogleBot'; import StackBlitz from '../components/StackBlitz'; const ProjectTitle = () => { @@ -54,13 +56,33 @@ function HomepageHeader() { - + } + > + {() => + isGoogleBot ? ( + + ) : ( +