{"_id":"@alexkirsz/gatsby-transformer-remark","_rev":"3-103133163de9cecbc6f0f07fa3b1fc58","name":"@alexkirsz/gatsby-transformer-remark","dist-tags":{"latest":"2.3.0"},"versions":{"2.1.1-rc.0":{"name":"@alexkirsz/gatsby-transformer-remark","description":"Gatsby transformer plugin for Markdown using the Remark library and ecosystem","version":"2.1.1-rc.0","author":{"name":"Kyle Mathews","email":"mathews.kyle@gmail.com"},"bugs":{"url":"https://github.com/gatsbyjs/gatsby/issues"},"dependencies":{"@babel/runtime":"7.0.0-beta.52","bluebird":"^3.5.0","gray-matter":"^4.0.0","hast-util-raw":"^2.0.2","hast-util-to-html":"^3.0.0","lodash":"^4.17.4","mdast-util-to-hast":"^3.0.0","mdast-util-toc":"^2.0.1","remark":"^9.0.0","remark-parse":"^5.0.0","remark-retext":"^3.1.0","remark-stringify":"^5.0.0","retext-english":"^3.0.0","sanitize-html":"^1.18.2","underscore.string":"^3.3.4","unified":"^6.1.5","unist-util-remove-position":"^1.1.2","unist-util-select":"^1.5.0","unist-util-visit":"^1.3.0"},"devDependencies":{"@babel/cli":"7.0.0-beta.52","@babel/core":"7.0.0-beta.52","cross-env":"^5.1.4"},"homepage":"https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-transformer-remark#readme","keywords":["gatsby","gatsby-plugin","markdown","remark"],"license":"MIT","peerDependencies":{"gatsby":">2.0.0-alpha"},"repository":{"type":"git","url":"https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-transformer-remark"},"scripts":{"build":"babel src --out-dir . --ignore **/__tests__","prepare":"cross-env NODE_ENV=production npm run build","watch":"babel -w src --out-dir . --ignore **/__tests__"},"_id":"@alexkirsz/gatsby-transformer-remark@2.1.1-rc.0","_npmVersion":"6.2.0","_nodeVersion":"10.9.0","_npmUser":{"name":"alexkirsz","email":"a.kirszenberg@gmail.com"},"dist":{"integrity":"sha512-v/UPcSmf0rnvXwS+FQXD4efszhQp7Cxa/TCcecmnTOitWfCMpNv3p4iIsLdPnumzWDN6Koa12mG83gMCvHX+Vg==","shasum":"a497c10791b67b6f4933fa9e9910cee426dd3f58","tarball":"https://registry.npmjs.org/@alexkirsz/gatsby-transformer-remark/-/gatsby-transformer-remark-2.1.1-rc.0.tgz","fileCount":8,"unpackedSize":27955,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfBJdCRA9TVsSAnZWagAAsl8P/jmeTp9Hd0XqGk76XcTy\nGHMMly/7GjUkgXCmvWgTyy8dwp7m4bOztn66TBOaa3NGxNo0CpA7Ebwi+si3\n1DmsTSJwlnt4i4eJpFByR6gOqmtZ1z9AJyyJTs8iLA+mvjeU0HaO1BNL56fa\nKQL79DjuJq/y3FbA/xJCEPU9GwDv5f92yJ6R5DEpyIyyOXMNwZxKKE8i6yKc\nC49ZoIQNmF7YY5IUwKM/7d3Hp1Hh2dkf4CCs2y59Jhv2ApoZSOPBhYSKYGpI\nudBpq5ZmWwJx4Y0lPpNA7tR+m2PtCAytx6P8bJYxuAn5bdtRLiTaxRa+f9yJ\n76bz5orVaJm6uexZWE6ZjDWdJcvCUqxkjeLA8r6AFefaGdTcdRRDGBFNEhma\n7xvQFACygCZOLLe6CpNkbBZDGIJj9g98jl9IFNQ7WIi+oDZcjr1JGb5DK6rU\n8BfwqAa1YRgdZNLeX54cCHwNrG4vwKC/t5HBFd3GtK197quAS5qNK96/YnBr\ng3rykc3bYXOtvoUFZD0o8r788QwjK206H1iqH2KWSGW5rPcy+sK+dCwalc/h\npQ/3pqPG2b1IDTK7tMZ/0j5mZkSvDA8xI/Vf0P3EQU6pXASDNIZXzMmh2EiH\naH2n2tefneo7fxHsfVJqFe8nszVnyjlIqXR2Br2dZ+bp1L8wZr7Lzh1ieGsD\niuUp\r\n=5eUs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDpSC1mIMt8UWncv73m80o6oxqfFbw0nzkMDlhayNZ2hAIhAPBX64yiOh0JXrqV6Wp/klIVIx1KcacmPVcr9zf3xEPo"}]},"maintainers":[{"name":"alexkirsz","email":"a.kirszenberg@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gatsby-transformer-remark_2.1.1-rc.0_1534857820894_0.057010033510055624"},"_hasShrinkwrap":false},"2.1.1-rc.1":{"name":"@alexkirsz/gatsby-transformer-remark","description":"Gatsby transformer plugin for Markdown using the Remark library and ecosystem","version":"2.1.1-rc.1","author":{"name":"Kyle Mathews","email":"mathews.kyle@gmail.com"},"bugs":{"url":"https://github.com/gatsbyjs/gatsby/issues"},"dependencies":{"@babel/runtime":"7.0.0-beta.52","bluebird":"^3.5.0","gray-matter":"^4.0.0","hast-util-raw":"^2.0.2","hast-util-to-html":"^3.0.0","lodash":"^4.17.4","mdast-util-to-hast":"^3.0.0","mdast-util-toc":"^2.0.1","remark":"^9.0.0","remark-parse":"^5.0.0","remark-retext":"^3.1.0","remark-stringify":"^5.0.0","retext-english":"^3.0.0","sanitize-html":"^1.18.2","underscore.string":"^3.3.4","unified":"^6.1.5","unist-util-remove-position":"^1.1.2","unist-util-select":"^1.5.0","unist-util-visit":"^1.3.0"},"devDependencies":{"@babel/cli":"7.0.0-beta.52","@babel/core":"7.0.0-beta.52","cross-env":"^5.1.4"},"homepage":"https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-transformer-remark#readme","keywords":["gatsby","gatsby-plugin","markdown","remark"],"license":"MIT","peerDependencies":{"gatsby":">2.0.0-alpha"},"repository":{"type":"git","url":"https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-transformer-remark"},"scripts":{"build":"babel src --out-dir . --ignore **/__tests__","prepare":"cross-env NODE_ENV=production npm run build","watch":"babel -w src --out-dir . --ignore **/__tests__"},"_id":"@alexkirsz/gatsby-transformer-remark@2.1.1-rc.1","_npmVersion":"6.2.0","_nodeVersion":"10.9.0","_npmUser":{"name":"alexkirsz","email":"a.kirszenberg@gmail.com"},"dist":{"integrity":"sha512-Oqla0y3AzO761R2Xsu7NK1Hls3aKaq+6zLWnaVtGWMucBXWbw+XK/+NDaAPd12uUbWiSClhi0lG0amr3NakLvA==","shasum":"fca4ca73d4f123f8932b3e1957b4a8af09c6552c","tarball":"https://registry.npmjs.org/@alexkirsz/gatsby-transformer-remark/-/gatsby-transformer-remark-2.1.1-rc.1.tgz","fileCount":8,"unpackedSize":27728,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfBfMCRA9TVsSAnZWagAA1VYP/37yhOM9NznNyCvKoIVt\n6miJm4rGXgAtYBoRjzfNYm9+N3N5A2oeq5O2NiouGp5N8xcBxQWTD+ZWw/0E\neKjz+Yo9KwEWmdoegkjDHDobtPqEqFHqoSkPykVdCNxp/76ZPQVS121egYDN\ngPjy/yZz6Lf6MlBXIqUTlHS+KdDMfZDkqXFViAP6pKUnp/FGhQ52KwKUOvJU\nElrKKbDDAFJVY8c61oOYXc6rCoWyvZbG3LBoG4LYRnUcQ/DvV4buyXbljnU0\nth4FvFr4Hb822QNy87HwnFyNJX5LQ59dqqPyr/YI1YR8K4E2k8oI7k4BC+vh\nlR6RnIOVAldgRD5f8GqQ4cOlefFzVDN3m7SLR3Y4gmWw5Ws+NG4nrp+ReHJD\nlqPVQQKarJHegZx9rCRGrpd6MN8Sn25At/761LwmLV91jprtpkxPwUYt4VVA\nrSn9OCDGEsbSKSyUYr55/5nCvVszW5ZKOC80UmCJkCm5P236VxsnAEE/ibUD\n8JkvBuMYGMc4GhXdm1jPBMOVrmMmb+P0huS8WVAlK+NsO/vuMiHa7g0u3NyO\nYenYqUjJ/mUY8RR1QLaVqihcRgrSbz0pZbjmJboXQZ/Y5Ed/f6kPUP9HJ7MK\n1AAw2kt/whRLdk7WGvLN9771tp0rE7vFYr8EM2kN4fW1dFTuDvSWwfqYAWi7\nM9K2\r\n=30Qi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG5sxl19QOUBYz5B0tkJz725bHZrPBKLYSGPyW5MleZRAiEAl84quOrhrFU/Z2JEpgzHHYmuSirEAkFIks3KBJZ/CnA="}]},"maintainers":[{"name":"alexkirsz","email":"a.kirszenberg@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gatsby-transformer-remark_2.1.1-rc.1_1534859211832_0.3954575255518824"},"_hasShrinkwrap":false},"2.3.0":{"name":"@alexkirsz/gatsby-transformer-remark","description":"Gatsby transformer plugin for Markdown using the Remark library and ecosystem","version":"2.3.0","author":{"name":"Kyle Mathews","email":"mathews.kyle@gmail.com"},"bugs":{"url":"https://github.com/gatsbyjs/gatsby/issues"},"dependencies":{"@babel/runtime":"^7.0.0","bluebird":"^3.5.0","gray-matter":"^4.0.0","hast-util-raw":"^4.0.0","hast-util-to-html":"^4.0.0","lodash":"^4.17.10","mdast-util-to-hast":"^3.0.0","mdast-util-toc":"^2.0.1","remark":"^9.0.0","remark-parse":"^5.0.0","remark-retext":"^3.1.0","remark-stringify":"^5.0.0","retext-english":"^3.0.0","sanitize-html":"^1.18.2","underscore.string":"^3.3.5","unified":"^6.1.5","unist-util-remove-position":"^1.1.2","unist-util-select":"^1.5.0","unist-util-visit":"^1.3.0"},"devDependencies":{"@babel/cli":"^7.0.0","@babel/core":"^7.0.0","babel-preset-gatsby-package":"^0.1.3","cross-env":"^5.1.4"},"homepage":"https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-transformer-remark#readme","keywords":["gatsby","gatsby-plugin","markdown","remark"],"license":"MIT","peerDependencies":{"gatsby":"^2.0.88"},"repository":{"type":"git","url":"https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-transformer-remark"},"scripts":{"build":"babel src --out-dir . --ignore **/__tests__","prepare":"cross-env NODE_ENV=production npm run build","watch":"babel -w src --out-dir . --ignore **/__tests__"},"_id":"@alexkirsz/gatsby-transformer-remark@2.3.0","_npmVersion":"6.5.0","_nodeVersion":"11.7.0","_npmUser":{"name":"alexkirsz","email":"a.kirszenberg@gmail.com"},"dist":{"integrity":"sha512-28ouqVOcc3EiaJq83jt3pRn9iX6bVjPVifavIU45f8UCBZcwmF9IZPZx5SifdsklrtJtxM6G955Lz0rqm7mOtw==","shasum":"22607c2d99042036a6f5c1851aabfc8ff235d125","tarball":"https://registry.npmjs.org/@alexkirsz/gatsby-transformer-remark/-/gatsby-transformer-remark-2.3.0.tgz","fileCount":9,"unpackedSize":48702,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcXZG7CRA9TVsSAnZWagAALGkP/1CYaD1O/rGXGz/eDk4G\nRD69InmmuxakefF1rManbDoVkdO2tL1/3g65qulmytViqeh1mSEXpSQnb3Ah\n08kgLIWfafstgBzRADhHJybMPo+uaK5WQOnXLTEK31ugwH7fcZ3Uab99/+3C\nK2vMpxAvf+MMwYQULYSn5qDueL7QYGvi07cjkEijkqjANlb9lvChZdIBWxkO\n8vAm6baGNzGCPlMj3KRnBWVdxscXPJ973PAqwvvkRiZlUqdrpaQ3wZ9HKGzl\nHnwYQ2SS+hftI69DpJvK97qt2KxvnsO4mMpTSUs+4Eup0lOTf4DB9pE7y7Xe\nMz3KIUWnD4qiLgEvwnRHDiCbB+cYhmdGecR6eANdoENXGXQH3ysmPIyZGKFE\n7FwjCQgW+zPcYZNVaW1j9FsIkuhcYmawKyK/vL0BbJu4o5eJJ3ps9cR3GRoq\nFAiAvQ0HMH6tRGhcvjFpQSYH2xBxWm0cQBAA+6pEP+xDDw36wZyorwvu9ov5\nSoyfEn7vaf+JWwRms5aFQSrqHHoZWcNIgZ/e3x3DCtbegHfB3aav10mW4s8p\nkdEsyA7tTFl62TjKnBCb/aSlZcoJtlxsAaYqNEPZZg6mmxvhTPBvYPKsBHVa\n5UTGa0+jMgad7kRTIq8Ku5qEDJVz2gBOSNnlHfwSW7thwlYZxpVaDMT+6nRm\ndIgv\r\n=3G/D\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDiH7ISWGRIzmfa+jgN0jA2ZYvuwfsltbIgrg4r5l3m4wIhAOFrA7Xulu1bMCrNvwkBccG56T6miVQRDzlXPC/ghQ8/"}]},"maintainers":[{"name":"alexkirsz","email":"a.kirszenberg@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/gatsby-transformer-remark_2.3.0_1549636026821_0.09205643719931378"},"_hasShrinkwrap":false}},"time":{"created":"2018-08-21T13:23:40.664Z","2.1.1-rc.0":"2018-08-21T13:23:40.968Z","modified":"2022-04-04T12:40:58.101Z","2.1.1-rc.1":"2018-08-21T13:46:51.930Z","2.3.0":"2019-02-08T14:27:06.950Z"},"maintainers":[{"name":"alexkirsz","email":"a.kirszenberg@gmail.com"}],"description":"Gatsby transformer plugin for Markdown using the Remark library and ecosystem","homepage":"https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-transformer-remark#readme","keywords":["gatsby","gatsby-plugin","markdown","remark"],"repository":{"type":"git","url":"https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-transformer-remark"},"author":{"name":"Kyle Mathews","email":"mathews.kyle@gmail.com"},"bugs":{"url":"https://github.com/gatsbyjs/gatsby/issues"},"license":"MIT","readme":"# gatsby-transformer-remark\n\nParses Markdown files using [Remark](http://remark.js.org/).\n\n## Install\n\n`npm install --save gatsby-transformer-remark`\n\n## How to use\n\n```javascript\n// In your gatsby-config.js\nplugins: [\n  {\n    resolve: `gatsby-transformer-remark`,\n    options: {\n\n      // Defaults to `() => true`\n      filter: node => node.sourceInstanceName === `blog`,\n      // Defaults to `MarkdownRemark`\n      type: `BlogPost`,\n      // CommonMark mode (default: true)\n      commonmark: true,\n      // Footnotes mode (default: true)\n      footnotes: true,\n      // Pedantic mode (default: true)\n      pedantic: true,\n      // GitHub Flavored Markdown mode (default: true)\n      gfm: true,\n      // Plugins configs\n      plugins: [],\n    },\n  },\n],\n```\n\nThe following parts of `options` are passed down to Remark as options:\n\n- `options.commonmark`\n- `options.footnotes`\n- `options.pedantic`\n- `options.gfm`\n\nThe details of the Remark options above could be found in [`remark-parse`'s documentation](https://github.com/remarkjs/remark/tree/master/packages/remark-parse#processoruseparse-options)\n\nA full explanation of how to use markdown in Gatsby can be found here:\n[Creating a Blog with Gatsby](https://www.gatsbyjs.org/blog/2017-07-19-creating-a-blog-with-gatsby/)\n\nThere are many Gatsby Remark plugins which you can install to customize how Markdown is processed. Many of them are demoed at https://using-remark.gatsbyjs.org/. See also the [source code for using-remark](https://github.com/gatsbyjs/gatsby/tree/master/examples/using-remark).\n\n## Parsing algorithm\n\nIt recognizes files with the following extensions as Markdown:\n\n- md\n- markdown\n\nEach Markdown file is parsed into a node of type `MarkdownRemark`.\n\nAll frontmatter fields are converted into GraphQL fields. TODO link to docs on\nauto-inferring types/fields.\n\nThis plugin adds additional fields to the `MarkdownRemark` GraphQL type\nincluding `html`, `excerpt`, `headings`, etc. Other Gatsby plugins can also add\nadditional fields.\n\n## How to query\n\nA sample GraphQL query to get MarkdownRemark nodes:\n\n```graphql\n{\n  allMarkdownRemark {\n    edges {\n      node {\n        html\n        headings {\n          depth\n          value\n        }\n        frontmatter {\n          # Assumes you're using title in your frontmatter.\n          title\n        }\n      }\n    }\n  }\n}\n```\n\n### Getting table of contents\n\nUsing the following GraphQL query you'll be able to get the table of contents\n\n```graphql\n{\n  allMarkdownRemark {\n    edges {\n      node {\n        html\n        tableOfContents\n      }\n    }\n  }\n}\n```\n\n### Configuring the tableOfContents\n\nBy default the tableOfContents is using the field `slug` to generate URLs. You can however provide another field using the pathToSlugField parameter. **Note** that providing a non existing field will cause the result to be null. To alter the default values for tableOfContents generation, include values for `heading` (string) and/or `maxDepth` (number 1 to 6) in graphQL query. If a value for `heading` is given, the first heading that matches will be ommitted and the toc is generated from the next heading of the same depth onwards. Value for `maxDepth` sets the maximum depth of the toc (i.e. if a maxDepth of 3 is set, only h1 to h3 headings will appear in the toc).\n\n```graphql\n{\n  allMarkdownRemark {\n    edges {\n      node {\n        html\n        tableOfContents(\n          pathToSlugField: \"frontmatter.path\"\n          heading: \"only show toc from this heading onwards\"\n          maxDepth: 2\n        )\n        frontmatter {\n          # Assumes you're using path in your frontmatter.\n          path\n        }\n      }\n    }\n  }\n}\n```\n\nTo pass default options to the plugin generating the tableOfContents, configure it in gatsby-config.js as shown below. The options shown below are the defaults used by the plugin.\n\n```javascript\n// In your gatsby-config.js\nplugins: [\n  {\n    resolve: `gatsby-transformer-remark`,\n    options: {\n      tableOfContents: {\n        heading: null,\n        maxDepth: 6,\n      },\n    },\n  },\n]\n```\n\n### Excerpts\n\n#### Length\n\nBy default, excerpts have a maximum length of 140 characters. You can change the default using the `pruneLength` argument. For example, if you need 500 characters, you can specify:\n\n```graphql\n{\n  allMarkdownRemark {\n    edges {\n      node {\n        html\n        excerpt(pruneLength: 500)\n      }\n    }\n  }\n}\n```\n\n#### Format\n\nBy default, Gatsby will return excerpts as plain text. This might be useful for populating [opengraph](https://en.wikipedia.org/wiki/Facebook_Platform#Open_Graph_protocol) HTML tags for SEO reasons. You can also explicitly specify a `PLAIN` format like so:\n\n```graphql\n{\n  allMarkdownRemark {\n    edges {\n      node {\n        excerpt(format: PLAIN)\n      }\n    }\n  }\n}\n```\n\nIt's also possible to ask Gatsby to return excerpts formatted as HTML. You might use this if you have a blog post whose an excerpt contains markdown content--e.g. header, link, etc.--and you want these links to render as HTML.\n\n```graphql\n{\n  allMarkdownRemark {\n    edges {\n      node {\n        excerpt(format: HTML)\n      }\n    }\n  }\n}\n```\n\n## gray-matter options\n\n`gatsby-transformer-remark` uses [gray-matter](https://github.com/jonschlinkert/gray-matter) to parse markdown frontmatter, so you can specify any of the options mentioned [here](https://github.com/jonschlinkert/gray-matter#options) in the `gatsby-config.js` file.\n\n### Example: Excerpts\n\nIf you don't want to use `pruneLength` for excerpts but a custom seperator, you can specify an `excerpt_separator`:\n\n```javascript\n{\n  \"resolve\": `gatsby-transformer-remark`,\n  \"options\": {\n    \"excerpt_separator\": `<!-- end -->`\n  }\n}\n```\n\nAny file that does not have the given `excerpt_separator` will fall back to the default pruning method.\n\n## Troubleshooting\n\n### Excerpts for non-latin languages\n\nBy default, `excerpt` uses `underscore.string/prune` which doesn't handle non-latin characters ([https://github.com/epeli/underscore.string/issues/418](https://github.com/epeli/underscore.string/issues/418)).\n\nIf that is the case, you can set `truncate` option on `excerpt` field, like:\n\n```graphql\n{\n  markdownRemark {\n    excerpt(truncate: true)\n  }\n}\n```\n","readmeFilename":"README.md"}