From c7d6d9b7e174a06384ba9e4b90059f172fcd62b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20R=C3=A4dle?= Date: Fri, 5 Aug 2022 21:54:19 -0700 Subject: [PATCH] Open graph for Snack and example wrapper (#103) Summary: Pull Request resolved: https://github.com/facebookresearch/playtorch/pull/103 Adding open graph `meta` elements to the Snack and example wrapper pages to render the Snack/example title/name on thumbnail generation Differential Revision: D38482624 fbshipit-source-id: 1c333f87faff3907ccec18de3628503a487eaed0 --- website/src/components/ExpoSnackLandingPage.js | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/website/src/components/ExpoSnackLandingPage.js b/website/src/components/ExpoSnackLandingPage.js index 3ae83e346..b6fdc5a39 100644 --- a/website/src/components/ExpoSnackLandingPage.js +++ b/website/src/components/ExpoSnackLandingPage.js @@ -17,6 +17,10 @@ import RedirectStarterSnack from './RedirectStarterSnack'; export default function ExpoSnackLandingPage({match}) { const {expoSnackPath} = match.params; + const title = React.useMemo( + () => `${expoSnackPath} | PlayTorch Snack`, + [expoSnackPath], + ); if (expoSnackPath == null || expoSnackPath.length === 0) { return ; @@ -24,7 +28,17 @@ export default function ExpoSnackLandingPage({match}) { return (
- + + + + + +