From f7382aed638f6ef4f8a75cdc150a8b8d937521bc Mon Sep 17 00:00:00 2001 From: Kyle Gill Date: Thu, 22 Aug 2019 16:00:20 -0600 Subject: [PATCH] feat(www): add code snippet with install command to starters (#16972) --- www/src/templates/template-starter-page.js | 2 + www/src/views/starter/installation.js | 64 ++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 www/src/views/starter/installation.js diff --git a/www/src/templates/template-starter-page.js b/www/src/templates/template-starter-page.js index 144874dede332..575f18eff9a3f 100644 --- a/www/src/templates/template-starter-page.js +++ b/www/src/templates/template-starter-page.js @@ -9,6 +9,7 @@ import StarterHeader from "../views/starter/header" import StarterMeta from "../views/starter/meta" import StarterScreenshot from "../views/starter/screenshot" import StarterSource from "../views/starter/source" +import StarterInstallation from "../views/starter/installation" import StarterDetails from "../views/starter/details" import FooterLinks from "../components/shared/footer-links" @@ -115,6 +116,7 @@ class StarterTemplate extends React.Component { + { + const content = `gatsby new ${repoName || `my-gatsby-project`} ${repoUrl}` + return ( +
+
+ Install this starter locally: +
+
+        
+          {content}
+          
+        
+      
+
+ ) +} + +export default StarterInstallation