码迷,mamicode.com
首页 > 其他好文 > 详细

[Gatsby] Install Gatsby and Scaffold a Blog

时间:2018-02-13 19:52:17      阅读:152      评论:0      收藏:0      [点我收藏+]

标签:orm   pen   creat   sys   tle   serve   run   elm   pat   

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

标签:orm   pen   creat   sys   tle   serve   run   elm   pat   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!