テンプレートの選択と編集

テンプレート

テンプレートは”gatsby-starter-portfolio-cara”を使います。

Cara - Gatsby Starter Portfolio

npx gatsby new gatsby-starter-portfolio-cara [<https://github.com/LekoArts/gatsby-starter-portfolio-cara>](<https://github.com/LekoArts/gatsby-starter-portfolio-cara>)

Gitリポジトリの向き先変更

git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://[アカウト名]:[AouthToke]@github.com/[リポジトリのパス]
git push -u origin main

ファイルの編集

パス 変更内容 メモ
package.json nameなど
gatsby-config.ts siteTitle, siteUrlなど

サイトの公開

サイトはNetlifyで公開してみましょう。

Develop and deploy websites and apps in record time | Netlify

Netlifyでの公開

Netlifyでアカウント登録を行い、ログイン後、”Add New Site”を押してその後に”Import an existing project from a Git repository”選択、対象のリポジトリを選択すればNetlifyが自動的にビルド・サイトの公開まで行ってくれます。

Build settingではRuntimeに”Gatsby”を選択してください。