首页 > 其他 > 详细

[Gatsby] Install Gatsby and Scaffold a Blog

时间:2018-02-13 19:44:45      阅读:259      评论:0      收藏:0      [点我收藏+]

In this lesson, you’ll install Gatsby and the plugins that give the default starter the ability to transform Markdown into HTML.

 

Install:

npm i -g gatsby-cli

 

Create a project:

gatsby new my-blog

 

cd to the project and install some dependenicy.

yarn add gatsby-source-filesystem gatsby-transformer-remark

 

Add libs to the config file:

module.exports = {
  siteMetadata: {
    title: `Gatsby Default Starter`,
  },
  plugins: [
    `gatsby-plugin-react-helmet`,
    `gatsby-transformer-remark`,
    {
      resolve: `gatsby-source-filesystem`,
      options: {
        name: `src`,
        path: `${__dirname}/src`
      }
    }
  ],
}

 

Run:

gatsby serve

or

gatsby develop

 

[Gatsby] Install Gatsby and Scaffold a Blog

原文:https://www.cnblogs.com/Answer1215/p/8447242.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!