[Gatsby] Start

마크튠·2021년 4월 12일
0

Gatsby

목록 보기
1/3
post-thumbnail

환경설정

  1. node 설치
  2. git 설치
  3. gatsby-cli 전역설치
    npm install -g gatsby-cli

Starter

gatsby new hello-world https://github.com/gatsbyjs/gatsby-starter-hello-world

내용

  1. src/pages 폴더의 js파일이 자동으로 페이징된다.
  2. pages 내부에 폴더를 만들고 index.js 파일생성시 해당 폴더의 이름으로 이동할 수 있다.
    ex) mkdir src/pages/blog, touch index.js => http://localhost:8000/blog
  3. Link를 import하여 내부연동링크로 사용할 수 있다. (a링크 사용시 새로고침)
profile
React, GraphQL, NodeJs

0개의 댓글