14 |
15 |
16 |
17 | React Brasil Slack
18 |
19 |
20 | Um grupo criado para discutir tudo sobre ReactJS
21 |
22 |
23 |
24 | Quero participar
25 |
26 |
27 | )
28 | }
29 | }
30 |
31 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 gatsbyjs
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
23 |
--------------------------------------------------------------------------------
/loaders/markdown-loader/index.js:
--------------------------------------------------------------------------------
1 | var frontMatter = require('front-matter')
2 | var markdownIt = require('markdown-it')
3 | var hljs = require('highlight.js')
4 | var objectAssign = require('object-assign')
5 |
6 | var highlight = function (str, lang) {
7 | if ((lang !== null) && hljs.getLanguage(lang)) {
8 | try {
9 | return hljs.highlight(lang, str).value
10 | } catch (_error) {
11 | console.error(_error)
12 | }
13 | }
14 | try {
15 | return hljs.highlightAuto(str).value
16 | } catch (_error) {
17 | console.error(_error)
18 | }
19 | return ''
20 | }
21 |
22 | var md = markdownIt({
23 | html: true,
24 | linkify: true,
25 | typographer: true,
26 | highlight,
27 | })
28 | .use(require('markdown-it-sub'))
29 | .use(require('markdown-it-footnote'))
30 | .use(require('markdown-it-deflist'))
31 | .use(require('markdown-it-abbr'))
32 | .use(require('markdown-it-attrs'))
33 |
34 | module.exports = function (content) {
35 | this.cacheable()
36 | const meta = frontMatter(content)
37 | const body = md.render(meta.body)
38 | const result = objectAssign({}, meta.attributes, {
39 | body,
40 | })
41 | this.value = result
42 | return `module.exports = ${JSON.stringify(result)}`
43 | }
44 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "gatsby-starter-default",
3 | "description": "Gatsby default starter",
4 | "version": "1.0.0",
5 | "author": "Kyle Mathews