diff --git a/site/gatsby-config.js b/site/gatsby-config.js index 9e1a8c4..241a703 100644 --- a/site/gatsby-config.js +++ b/site/gatsby-config.js @@ -66,9 +66,6 @@ module.exports = { 'gatsby-remark-autolink-headers', 'gatsby-remark-prismjs', 'gatsby-remark-external-links', - // TODO: cleanup when issue with links in md resolved - // https://github.com/gatsbyjs/gatsby/issues/3316 - 'gatsby-md-links-fix', ], }, }, diff --git a/site/package.json b/site/package.json index af6c4a9..2e23562 100644 --- a/site/package.json +++ b/site/package.json @@ -5,17 +5,17 @@ "dependencies": { "classnames": "^2.2.5", "docsearch.js": "^2.5.2", - "gatsby": "^1.9.175", - "gatsby-link": "^1.6.35", + "gatsby": "^1.9.184", + "gatsby-link": "^1.6.36", "gatsby-plugin-catch-links": "^1.0.9", "gatsby-plugin-react-helmet": "^2.0.3", "gatsby-plugin-react-next": "^1.0.7", "gatsby-plugin-sass": "^1.0.15", "gatsby-remark-autolink-headers": "^1.4.8", "gatsby-remark-external-links": "^0.0.4", - "gatsby-remark-prismjs": "^1.2.9", - "gatsby-source-filesystem": "^1.5.16", - "gatsby-transformer-remark": "^1.7.30", + "gatsby-remark-prismjs": "^1.2.14", + "gatsby-source-filesystem": "^1.5.18", + "gatsby-transformer-remark": "^1.7.31", "github-slugger": "^1.2.0", "prettier": "^1.8.2", "prop-types": "^15.6.0", diff --git a/site/plugins/gatsby-md-links-fix/index.js b/site/plugins/gatsby-md-links-fix/index.js deleted file mode 100644 index 09f020f..0000000 --- a/site/plugins/gatsby-md-links-fix/index.js +++ /dev/null @@ -1,20 +0,0 @@ -const visit = require('unist-util-visit'); - -function withPrefix(path, pathPrefix = '') { - // ensure only one `/` in new path - return (pathPrefix + path).replace(/\/\//, '/'); -} - -module.exports = ({ markdownAST, pathPrefix }) => { - visit(markdownAST, 'link', node => { - if ( - node.url.startsWith('/') && - pathPrefix && - !node.url.startsWith(pathPrefix) - ) { - node.url = withPrefix(node.url, pathPrefix); - } - }); - - return markdownAST; -}; diff --git a/site/plugins/gatsby-md-links-fix/package.json b/site/plugins/gatsby-md-links-fix/package.json deleted file mode 100644 index 91d44af..0000000 --- a/site/plugins/gatsby-md-links-fix/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "name": "gatsby-md-links-fix" -}