@@ -13,6 +13,7 @@ import { center, rule, wrap } from "./components/utils"
13
13
import { stripIndent } from "common-tags"
14
14
import { trackCli } from "./tracking"
15
15
import crypto from "crypto"
16
+ import { setSiteMetadata } from "./site-metadata"
16
17
17
18
const sha256 = ( str : string ) : string =>
18
19
crypto . createHash ( `sha256` ) . update ( str ) . digest ( `hex` )
@@ -301,10 +302,13 @@ ${c.bold(`Thanks! Here's what we'll now do:`)}
301
302
c . green ( c . symbols . check ) + ` Created site in ` + c . green ( data . project )
302
303
)
303
304
305
+ const fullPath = path . resolve ( data . project )
306
+
304
307
if ( plugins . length ) {
305
308
console . log ( c . bold ( `${ w ( `🔌 ` ) } Installing plugins...` ) )
306
- await installPlugins ( plugins , pluginConfig , path . resolve ( data . project ) , [ ] )
309
+ await installPlugins ( plugins , pluginConfig , fullPath , [ ] )
307
310
}
311
+ await setSiteMetadata ( fullPath , `title` , data . project )
308
312
309
313
const pm = await getPackageManager ( )
310
314
@@ -315,7 +319,7 @@ ${c.bold(`Thanks! Here's what we'll now do:`)}
315
319
${ w ( `🎉 ` ) } Your new Gatsby site ${ c . bold (
316
320
data . project
317
321
) } has been successfully bootstrapped
318
- at ${ c . bold ( path . resolve ( data . project ) ) } .
322
+ at ${ c . bold ( fullPath ) } .
319
323
`
320
324
)
321
325
console . log ( `Start by going to the directory with\n
@@ -330,7 +334,7 @@ ${c.bold(`Thanks! Here's what we'll now do:`)}
330
334
${ c . blueBright ( `https://www.gatsbyjs.com/docs/gatsby-cli/` ) }
331
335
` )
332
336
333
- const siteHash = md5 ( path . resolve ( data . project ) )
337
+ const siteHash = md5 ( fullPath )
334
338
trackCli ( `CREATE_GATSBY_SUCCESS` , { siteHash } )
335
339
}
336
340
0 commit comments