gatsby-remark-import-code
### Install
Last updated a year ago by pomber .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install gatsby-remark-import-code 
SYNC missed versions from official npm registry.

gatsby-remark-import-code

Install

$ npm install gatsby-remark-import-code

Use

Use it together with gatsby-plugin-mdx. In gatsby-config.js:

module.exports = {
  plugins: [
    {
      resolve: `gatsby-plugin-mdx`,
      options: {
        gatsbyRemarkPlugins: [`gatsby-remark-import-code`]
      }
    }
  ]
};

It transforms md/mdx code blocks from this:

```js file=./hello-world.js
```

into:

```js
function helloWorld() {
  return "hello world";
}
```

Related

Current Tags

  • 0.1.1                                ...           latest (a year ago)

2 Versions

  • 0.1.1                                ...           a year ago
  • 0.1.0                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 2
This Month 2
Last Day 0
Last Week 3
Last Month 6
Dependencies (2)
Dev Dependencies (0)
None

Copyright 2014 - 2016 © taobao.org |