From 8ed57ac909d318557ecd3de403ec72b90fa3a745 Mon Sep 17 00:00:00 2001 From: Tylah Kapa Date: Thu, 3 Oct 2024 14:27:21 +1000 Subject: [PATCH 01/43] Add gatsby-plugin-mdx --- gatsby-config.js | 5 +- gatsby-node.js | 22 +- package.json | 3 +- yarn.lock | 865 +++++++++++++++++++++++------------------------ 4 files changed, 431 insertions(+), 464 deletions(-) diff --git a/gatsby-config.js b/gatsby-config.js index a9d295496..0bb7e5acd 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -91,10 +91,11 @@ module.exports = { }, 'gatsby-plugin-sharp', { - resolve: 'gatsby-transformer-remark', + resolve: 'gatsby-plugin-mdx', options: { + extensions: ['.mdx', '.md'], excerpt_separator: '', - plugins: [ + gatsbyRemarkPlugins: [ { resolve: '@raae/gatsby-remark-oembed', options: { diff --git a/gatsby-node.js b/gatsby-node.js index db591e0d7..d06df59bb 100644 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -25,7 +25,7 @@ let assetsManifest = {}; exports.onCreateNode = ({ node, getNode, actions }) => { const { createNodeField } = actions; - if (node.internal.type === 'MarkdownRemark') { + if (node.internal.type === 'Mdx') { const slug = createFilePath({ node, getNode, basePath: '' }); createNodeField({ node, @@ -34,6 +34,7 @@ exports.onCreateNode = ({ node, getNode, actions }) => { }); } }; + exports.createSchemaCustomization = ({ actions }) => { const { createTypes } = actions; const typeDefs = ` @@ -88,7 +89,7 @@ exports.createPages = async ({ graphql, actions }) => { const result = await graphql(` query { - categories: allMarkdownRemark( + categories: allMdx( filter: { frontmatter: { type: { eq: "category" } } } ) { nodes { @@ -108,11 +109,12 @@ exports.createPages = async ({ graphql, actions }) => { relativeDirectory } } + internal { + contentFilePath + } } } - rules: allMarkdownRemark( - filter: { frontmatter: { type: { in: ["rule"] } } } - ) { + rules: allMdx(filter: { frontmatter: { type: { in: ["rule"] } } }) { nodes { fields { slug @@ -125,14 +127,14 @@ exports.createPages = async ({ graphql, actions }) => { redirects seoDescription } + internal { + contentFilePath + } } } } `); - const categoryTemplate = require.resolve('./src/templates/category.js'); - const ruleTemplate = require.resolve('./src/templates/rule.js'); - result.data.categories.nodes.forEach((node) => { // Find any categories that can't resolve a rule node.frontmatter.index.forEach((inCat) => { @@ -162,7 +164,7 @@ exports.createPages = async ({ graphql, actions }) => { console.log('Creating Category: ' + node.parent.name); createPage({ path: node.parent.name, - component: categoryTemplate, + component: `${node}?__contentFilePath=${node.internal.contentFilePath}`, context: { slug: node.fields.slug, index: node.frontmatter.index, @@ -209,7 +211,7 @@ exports.createPages = async ({ graphql, actions }) => { console.log('Creating Rule: ' + node.frontmatter.title); createPage({ path: node.frontmatter.uri, - component: ruleTemplate, + component: `${node}?__contentFilePath=${node.internal.contentFilePath}`, context: { slug: node.fields.slug, related: node.frontmatter.related ? node.frontmatter.related : [''], diff --git a/package.json b/package.json index ec0e39389..ab2a4d2a3 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ }, "dependencies": { "@auth0/auth0-react": "^2.2.4", + "@mdx-js/react": "^3.0.1", "@microsoft/applicationinsights-web": "^3.3.2", "@raae/gatsby-remark-oembed": "^0.3.3", "algoliasearch": "^4.24.0", @@ -45,6 +46,7 @@ "gatsby-plugin-fontawesome-css": "^1.2.0", "gatsby-plugin-google-gtag": "^5.13.1", "gatsby-plugin-google-tagmanager": "^5.13.1", + "gatsby-plugin-mdx": "^5.13.1", "gatsby-plugin-postcss": "6.13.1", "gatsby-plugin-react-helmet": "^6.13.1", "gatsby-plugin-sharp": "^5.13.1", @@ -66,7 +68,6 @@ "gatsby-source-git": "^1.1.0", "gatsby-source-local-git": "^1.3.0", "gatsby-transformer-json": "^5.13.1", - "gatsby-transformer-remark": "3.2.0", "gatsby-transformer-sharp": "^5.13.1", "markdown-it": "^14.1.0", "markdown-it-container": "^4.0.0", diff --git a/yarn.lock b/yarn.lock index 2eced0d1c..387b7598a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4758,6 +4758,43 @@ __metadata: languageName: node linkType: hard +"@mdx-js/mdx@npm:^2.3.0": + version: 2.3.0 + resolution: "@mdx-js/mdx@npm:2.3.0" + dependencies: + "@types/estree-jsx": "npm:^1.0.0" + "@types/mdx": "npm:^2.0.0" + estree-util-build-jsx: "npm:^2.0.0" + estree-util-is-identifier-name: "npm:^2.0.0" + estree-util-to-js: "npm:^1.1.0" + estree-walker: "npm:^3.0.0" + hast-util-to-estree: "npm:^2.0.0" + markdown-extensions: "npm:^1.0.0" + periscopic: "npm:^3.0.0" + remark-mdx: "npm:^2.0.0" + remark-parse: "npm:^10.0.0" + remark-rehype: "npm:^10.0.0" + unified: "npm:^10.0.0" + unist-util-position-from-estree: "npm:^1.0.0" + unist-util-stringify-position: "npm:^3.0.0" + unist-util-visit: "npm:^4.0.0" + vfile: "npm:^5.0.0" + checksum: 719384d8e72abd3e83aa2fd3010394636e32cc0e5e286b6414427ef03121397586ce97ec816afcc4d2b22ba65939c3801a8198e04cf921dd597c0aa9fd75dbb4 + languageName: node + linkType: hard + +"@mdx-js/react@npm:^3.0.1": + version: 3.0.1 + resolution: "@mdx-js/react@npm:3.0.1" + dependencies: + "@types/mdx": "npm:^2.0.0" + peerDependencies: + "@types/react": ">=16" + react: ">=16" + checksum: d210d926ef488d39ad65f04d821936b668eadcdde3b6421e94ec4200ca7ad17f17d24c5cbc543882586af9f08b10e2eea715c728ce6277487945e05c5199f532 + languageName: node + linkType: hard + "@microsoft/applicationinsights-analytics-js@npm:3.3.2": version: 3.3.2 resolution: "@microsoft/applicationinsights-analytics-js@npm:3.3.2" @@ -8373,6 +8410,13 @@ __metadata: languageName: node linkType: hard +"@types/extend@npm:^3.0.0": + version: 3.0.4 + resolution: "@types/extend@npm:3.0.4" + checksum: f3f073720df5380d86756a2c36612f0f1163a2591760e5f184e9652f560ed5841f16837bb3e382e00597d5e9b5740ae531cd61e82ac5cb76a3feb415a0d64d0d + languageName: node + linkType: hard + "@types/get-port@npm:^3.2.0": version: 3.2.0 resolution: "@types/get-port@npm:3.2.0" @@ -8509,7 +8553,7 @@ __metadata: languageName: node linkType: hard -"@types/mdast@npm:^3.0.0, @types/mdast@npm:^3.0.3": +"@types/mdast@npm:^3.0.0": version: 3.0.14 resolution: "@types/mdast@npm:3.0.14" dependencies: @@ -8536,6 +8580,13 @@ __metadata: languageName: node linkType: hard +"@types/mdx@npm:^2.0.0": + version: 2.0.13 + resolution: "@types/mdx@npm:2.0.13" + checksum: 5edf1099505ac568da55f9ae8a93e7e314e8cbc13d3445d0be61b75941226b005e1390d9b95caecf5dcb00c9d1bab2f1f60f6ff9876dc091a48b547495007720 + languageName: node + linkType: hard + "@types/minimatch@npm:*, @types/minimatch@npm:^5.1.2": version: 5.1.2 resolution: "@types/minimatch@npm:5.1.2" @@ -8817,27 +8868,6 @@ __metadata: languageName: node linkType: hard -"@types/vfile-message@npm:*": - version: 1.0.1 - resolution: "@types/vfile-message@npm:1.0.1" - dependencies: - "@types/node": "npm:*" - "@types/unist": "npm:*" - checksum: 9809348f1ac21429eeacfe42d8940b69f2cb70fbe480a09212ef20b1a4a457d38748f597d3c58d0d74d11880da2863315de34e17fd910fdeb81af7bce659b091 - languageName: node - linkType: hard - -"@types/vfile@npm:^3.0.0": - version: 3.0.2 - resolution: "@types/vfile@npm:3.0.2" - dependencies: - "@types/node": "npm:*" - "@types/unist": "npm:*" - "@types/vfile-message": "npm:*" - checksum: d93398c201af7f80f8020bfd051ad1e3deba005f5fd22e59a4837363eb04382884394ccc311d31209e9c8b66fc83f6278904247110b26fe6c969cd52fbcbed26 - languageName: node - linkType: hard - "@types/yoga-layout@npm:1.9.2": version: 1.9.2 resolution: "@types/yoga-layout@npm:1.9.2" @@ -10093,6 +10123,7 @@ __metadata: "@fortawesome/free-brands-svg-icons": "npm:^6.6.0" "@fortawesome/free-solid-svg-icons": "npm:^6.6.0" "@fortawesome/react-fontawesome": "npm:^0.2.2" + "@mdx-js/react": "npm:^3.0.1" "@microsoft/applicationinsights-web": "npm:^3.3.2" "@playwright/test": "npm:^1.47.1" "@raae/gatsby-remark-oembed": "npm:^0.3.3" @@ -10123,6 +10154,7 @@ __metadata: gatsby-plugin-fontawesome-css: "npm:^1.2.0" gatsby-plugin-google-gtag: "npm:^5.13.1" gatsby-plugin-google-tagmanager: "npm:^5.13.1" + gatsby-plugin-mdx: "npm:^5.13.1" gatsby-plugin-postcss: "npm:6.13.1" gatsby-plugin-react-helmet: "npm:^6.13.1" gatsby-plugin-sharp: "npm:^5.13.1" @@ -10144,7 +10176,6 @@ __metadata: gatsby-source-git: "npm:^1.1.0" gatsby-source-local-git: "npm:^1.3.0" gatsby-transformer-json: "npm:^5.13.1" - gatsby-transformer-remark: "npm:3.2.0" gatsby-transformer-sharp: "npm:^5.13.1" markdown-it: "npm:^14.1.0" markdown-it-container: "npm:^4.0.0" @@ -10865,13 +10896,6 @@ __metadata: languageName: node linkType: hard -"array-iterate@npm:^1.0.0": - version: 1.1.4 - resolution: "array-iterate@npm:1.1.4" - checksum: d80e997d157519fbc4393e158e0620f36ca61e4a95d6c5944419bcfd89662e990683c12bc07f6b78036360e0525763b3a66cf6af283786c34bc0cc89edc7cb05 - languageName: node - linkType: hard - "array-move@npm:4.0.0": version: 4.0.0 resolution: "array-move@npm:4.0.0" @@ -11073,6 +11097,15 @@ __metadata: languageName: node linkType: hard +"astring@npm:^1.8.0, astring@npm:^1.8.5": + version: 1.9.0 + resolution: "astring@npm:1.9.0" + bin: + astring: bin/astring + checksum: e7519544d9824494e80ef0e722bb3a0c543a31440d59691c13aeaceb75b14502af536b23f08db50aa6c632dafaade54caa25f0788aa7550b6b2d6e2df89e0830 + languageName: node + linkType: hard + "async-lock@npm:^1.4.1": version: 1.4.1 resolution: "async-lock@npm:1.4.1" @@ -11564,6 +11597,13 @@ __metadata: languageName: node linkType: hard +"bcp-47-match@npm:^2.0.0": + version: 2.0.3 + resolution: "bcp-47-match@npm:2.0.3" + checksum: ae5c202854df8a9ad4777dc3b49562578495a69164869f365a88c1a089837a9fbbce4c0c44f6f1a5e44c7841f47e91fe6fea00306ca49ce5ec95a7eb71f839c4 + languageName: node + linkType: hard + "bcrypt-pbkdf@npm:^1.0.0": version: 1.0.2 resolution: "bcrypt-pbkdf@npm:1.0.2" @@ -12873,7 +12913,7 @@ __metadata: languageName: node linkType: hard -"comma-separated-tokens@npm:^1.0.0, comma-separated-tokens@npm:^1.0.1": +"comma-separated-tokens@npm:^1.0.0": version: 1.0.8 resolution: "comma-separated-tokens@npm:1.0.8" checksum: c3bcfeaa6d50313528a006a40bcc0f9576086665c9b48d4b3a76ddd63e7d6174734386c98be1881cbf6ecfc25e1db61cd775a7b896d2ea7a65de28f83a0f9b17 @@ -14846,6 +14886,15 @@ __metadata: languageName: node linkType: hard +"direction@npm:^2.0.0": + version: 2.0.1 + resolution: "direction@npm:2.0.1" + bin: + direction: cli.js + checksum: dce809431cad978e0778769a3818ea797ebe0bd542c85032ad9ad98971e2021a146be62feb259d7ffe4b76739e07b23e861b29c3f184ac8d38cc6ba956d5c586 + languageName: node + linkType: hard + "directory-named-webpack-plugin@npm:^4.1.0": version: 4.1.0 resolution: "directory-named-webpack-plugin@npm:4.1.0" @@ -14994,15 +15043,6 @@ __metadata: languageName: node linkType: hard -"domhandler@npm:^3.0.0": - version: 3.3.0 - resolution: "domhandler@npm:3.3.0" - dependencies: - domelementtype: "npm:^2.0.1" - checksum: 376e6462a6144121f6ae50c9c1b8e0b22d2e0c68f9fb2ef6e57a5f4f9395854b1258cb638c58b171ee291359a5f41a4a57f403954db976484a59ffcee4c1e405 - languageName: node - linkType: hard - "domhandler@npm:^4.0.0, domhandler@npm:^4.2.0, domhandler@npm:^4.3.1": version: 4.3.1 resolution: "domhandler@npm:4.3.1" @@ -15048,7 +15088,7 @@ __metadata: languageName: node linkType: hard -"domutils@npm:^2.0.0, domutils@npm:^2.5.2, domutils@npm:^2.8.0": +"domutils@npm:^2.5.2, domutils@npm:^2.8.0": version: 2.8.0 resolution: "domutils@npm:2.8.0" dependencies: @@ -16308,6 +16348,26 @@ __metadata: languageName: node linkType: hard +"estree-util-attach-comments@npm:^2.0.0": + version: 2.1.1 + resolution: "estree-util-attach-comments@npm:2.1.1" + dependencies: + "@types/estree": "npm:^1.0.0" + checksum: cdb5fdb5809b376ca4a96afbcd916c3570b4bbf5d0115b8a9e1e8a10885d8d9fb549df0a16c077abb42ee35fa33192b69714bac25d4f3c43a36092288c9a64fd + languageName: node + linkType: hard + +"estree-util-build-jsx@npm:^2.0.0, estree-util-build-jsx@npm:^2.2.2": + version: 2.2.2 + resolution: "estree-util-build-jsx@npm:2.2.2" + dependencies: + "@types/estree-jsx": "npm:^1.0.0" + estree-util-is-identifier-name: "npm:^2.0.0" + estree-walker: "npm:^3.0.0" + checksum: 2cef6ad6747f51934eba0601c3477ba08c98331cfe616635e08dfc89d06b9bbd370c4d80e87fe7d42d82776fa7840868201f48491b0ef9c808039f15fe4667e1 + languageName: node + linkType: hard + "estree-util-is-identifier-name@npm:2.1.0, estree-util-is-identifier-name@npm:^2.0.0": version: 2.1.0 resolution: "estree-util-is-identifier-name@npm:2.1.0" @@ -16315,6 +16375,17 @@ __metadata: languageName: node linkType: hard +"estree-util-to-js@npm:^1.1.0": + version: 1.2.0 + resolution: "estree-util-to-js@npm:1.2.0" + dependencies: + "@types/estree-jsx": "npm:^1.0.0" + astring: "npm:^1.8.0" + source-map: "npm:^0.7.0" + checksum: ad9c99dc34b0510ab813b485251acbf0abd06361c07b13c08da5d1611c279bee02ec09f2c269ae30b8d2da587115fc1fad4fa9f2f5ba69e094e758a3a4de7069 + languageName: node + linkType: hard + "estree-util-visit@npm:^1.0.0": version: 1.2.1 resolution: "estree-util-visit@npm:1.2.1" @@ -16339,6 +16410,15 @@ __metadata: languageName: node linkType: hard +"estree-walker@npm:^3.0.0": + version: 3.0.3 + resolution: "estree-walker@npm:3.0.3" + dependencies: + "@types/estree": "npm:^1.0.0" + checksum: c12e3c2b2642d2bcae7d5aa495c60fa2f299160946535763969a1c83fc74518ffa9c2cd3a8b69ac56aea547df6a8aac25f729a342992ef0bbac5f1c73e78995d + languageName: node + linkType: hard + "esutils@npm:^2.0.2": version: 2.0.3 resolution: "esutils@npm:2.0.3" @@ -16585,7 +16665,7 @@ __metadata: languageName: node linkType: hard -"extend@npm:^3.0.0, extend@npm:^3.0.2, extend@npm:~3.0.2": +"extend@npm:^3.0.0, extend@npm:~3.0.2": version: 3.0.2 resolution: "extend@npm:3.0.2" checksum: 73bf6e27406e80aa3e85b0d1c4fd987261e628064e170ca781125c0b635a3dabad5e05adbf07595ea0cf1e6c5396cacb214af933da7cbaf24fe75ff14818e8f9 @@ -16840,7 +16920,7 @@ __metadata: languageName: node linkType: hard -"file-type@npm:^16.0.0, file-type@npm:^16.5.3, file-type@npm:^16.5.4": +"file-type@npm:^16.0.0, file-type@npm:^16.5.4": version: 16.5.4 resolution: "file-type@npm:16.5.4" dependencies: @@ -17291,17 +17371,6 @@ __metadata: languageName: node linkType: hard -"fs-extra@npm:^10.0.0": - version: 10.1.0 - resolution: "fs-extra@npm:10.1.0" - dependencies: - graceful-fs: "npm:^4.2.0" - jsonfile: "npm:^6.0.1" - universalify: "npm:^2.0.0" - checksum: 5f579466e7109719d162a9249abbeffe7f426eb133ea486e020b89bc6d67a741134076bf439983f2eb79276ceaf6bd7b7c1e43c3fd67fe889863e69072fb0a5e - languageName: node - linkType: hard - "fs-extra@npm:^11.1.1": version: 11.1.1 resolution: "fs-extra@npm:11.1.1" @@ -17523,24 +17592,6 @@ __metadata: languageName: node linkType: hard -"gatsby-core-utils@npm:^2.2.0": - version: 2.15.0 - resolution: "gatsby-core-utils@npm:2.15.0" - dependencies: - "@babel/runtime": "npm:^7.15.4" - ci-info: "npm:2.0.0" - configstore: "npm:^5.0.1" - file-type: "npm:^16.5.3" - fs-extra: "npm:^10.0.0" - got: "npm:^11.8.2" - node-object-hash: "npm:^2.3.9" - proper-lockfile: "npm:^4.1.2" - tmp: "npm:^0.2.1" - xdg-basedir: "npm:^4.0.0" - checksum: 365dff27ed387d6216cbf5637779f74c26b128ef80fd3773e69c48ad41575ee3b12e07c88e739e6092ab0597675c6d335fbe47a95e1ba121b22f8e97028ea4f2 - languageName: node - linkType: hard - "gatsby-core-utils@npm:^4.13.1": version: 4.13.1 resolution: "gatsby-core-utils@npm:4.13.1" @@ -17746,6 +17797,39 @@ __metadata: languageName: node linkType: hard +"gatsby-plugin-mdx@npm:^5.13.1": + version: 5.13.1 + resolution: "gatsby-plugin-mdx@npm:5.13.1" + dependencies: + "@mdx-js/mdx": "npm:^2.3.0" + acorn: "npm:^8.8.2" + acorn-jsx: "npm:^5.3.2" + astring: "npm:^1.8.5" + deepmerge: "npm:^4.3.1" + estree-util-build-jsx: "npm:^2.2.2" + fs-extra: "npm:^11.1.1" + gatsby-core-utils: "npm:^4.13.1" + gatsby-plugin-utils: "npm:^4.13.1" + gray-matter: "npm:^4.0.3" + mdast-util-mdx: "npm:^2.0.1" + mdast-util-to-hast: "npm:^10.2.0" + mdast-util-to-markdown: "npm:^1.5.0" + mdast-util-toc: "npm:^6.1.1" + rehype-infer-description-meta: "npm:^1.1.0" + remark-unwrap-images: "npm:^3.0.1" + unified: "npm:^10.1.2" + unist-util-visit: "npm:^4.1.2" + vfile: "npm:^5.3.7" + peerDependencies: + "@mdx-js/react": ^2.0.0 + gatsby: ^5.0.0-next + gatsby-source-filesystem: ^5.0.0-next + react: ^18.0.0 || ^0.0.0 + react-dom: ^18.0.0 || ^0.0.0 + checksum: 42257f45fb8564011515d3186f9b8b06c0a4ff313ac0bfb71e6c69977020639970b33f53c354efaac594273d781a77ac38b98218cb4315453340564eba812aae + languageName: node + linkType: hard + "gatsby-plugin-page-creator@npm:^5.13.1": version: 5.13.1 resolution: "gatsby-plugin-page-creator@npm:5.13.1" @@ -18190,36 +18274,6 @@ __metadata: languageName: node linkType: hard -"gatsby-transformer-remark@npm:3.2.0": - version: 3.2.0 - resolution: "gatsby-transformer-remark@npm:3.2.0" - dependencies: - "@babel/runtime": "npm:^7.12.5" - gatsby-core-utils: "npm:^2.2.0" - gray-matter: "npm:^4.0.2" - hast-util-raw: "npm:^4.0.0" - hast-util-to-html: "npm:^4.0.1" - lodash: "npm:^4.17.21" - mdast-util-to-hast: "npm:^3.0.4" - mdast-util-to-string: "npm:^1.1.0" - mdast-util-toc: "npm:^5.0" - remark: "npm:^10.0.1" - remark-parse: "npm:^6.0.3" - remark-retext: "npm:^3.1.3" - remark-stringify: "npm:6.0.4" - retext-english: "npm:^3.0.4" - sanitize-html: "npm:^1.27.5" - underscore.string: "npm:^3.3.5" - unified: "npm:^6.2.0" - unist-util-remove-position: "npm:^1.1.4" - unist-util-select: "npm:^1.5.0" - unist-util-visit: "npm:^1.4.1" - peerDependencies: - gatsby: ^3.0.0-next.0 - checksum: d413e4946214491d37ac47af7f2ae67bcbdc6000178fd892bbb2d78801f1aab9bd3e535f380bcbc4b13ffeb51ec7d0d9e4e2bf0c066ff19151d7c1729356ed2d - languageName: node - linkType: hard - "gatsby-transformer-sharp@npm:^5.13.1": version: 5.13.1 resolution: "gatsby-transformer-sharp@npm:5.13.1" @@ -18658,13 +18712,20 @@ __metadata: languageName: node linkType: hard -"github-slugger@npm:^1.2.1, github-slugger@npm:^1.5.0": +"github-slugger@npm:^1.5.0": version: 1.5.0 resolution: "github-slugger@npm:1.5.0" checksum: 116f99732925f939cbfd6f2e57db1aa7e111a460db0d103e3b3f2fce6909d44311663d4542350706cad806345b9892358cc3b153674f88eeae77f43380b3bfca languageName: node linkType: hard +"github-slugger@npm:^2.0.0": + version: 2.0.0 + resolution: "github-slugger@npm:2.0.0" + checksum: 21b912b6b1e48f1e5a50b2292b48df0ff6abeeb0691b161b3d93d84f4ae6b1acd6ae23702e914af7ea5d441c096453cf0f621b72d57893946618d21dd1a1c486 + languageName: node + linkType: hard + "glob-parent@npm:^3.1.0": version: 3.1.0 resolution: "glob-parent@npm:3.1.0" @@ -18853,7 +18914,7 @@ __metadata: languageName: node linkType: hard -"got@npm:^11.8.2, got@npm:^11.8.6": +"got@npm:^11.8.6": version: 11.8.6 resolution: "got@npm:11.8.6" dependencies: @@ -19273,16 +19334,13 @@ __metadata: languageName: node linkType: hard -"hast-util-from-parse5@npm:^4.0.2": - version: 4.0.2 - resolution: "hast-util-from-parse5@npm:4.0.2" +"hast-util-excerpt@npm:^1.0.0": + version: 1.0.2 + resolution: "hast-util-excerpt@npm:1.0.2" dependencies: - ccount: "npm:^1.0.3" - hastscript: "npm:^4.0.0" - property-information: "npm:^4.0.0" - web-namespaces: "npm:^1.1.2" - xtend: "npm:^4.0.1" - checksum: 8c4e0d9f372040da2b74186666a09f782ae7fbfc758d288e10249b4b53249cef176d20f0af07274216f7982b42a593b1cf7b78b22d8df59491eefd531a35b166 + "@types/hast": "npm:^2.0.0" + hast-util-truncate: "npm:^1.0.0" + checksum: 372241cdb1c5888d0ac13d34a15e6229038d8b12a556b46a7d1c20c28bc8f6feb501808ed62b602456a7bae41962fa0c20653746d5c2ce295f78ff71d2007da1 languageName: node linkType: hard @@ -19306,6 +19364,13 @@ __metadata: languageName: node linkType: hard +"hast-util-has-property@npm:^2.0.0": + version: 2.0.1 + resolution: "hast-util-has-property@npm:2.0.1" + checksum: 0e3956ae8ad40148d908be94717c04bd237cabaf5a72093e1992a17cc9f143fd1524b27ae9af229893797babbaaa666f8735e83636523859c935a3d6b230c2ff + languageName: node + linkType: hard + "hast-util-is-element@npm:^1.0.0, hast-util-is-element@npm:^1.1.0": version: 1.1.0 resolution: "hast-util-is-element@npm:1.1.0" @@ -19313,44 +19378,66 @@ __metadata: languageName: node linkType: hard -"hast-util-parse-selector@npm:^2.0.0, hast-util-parse-selector@npm:^2.2.0": +"hast-util-is-element@npm:^2.0.0": + version: 2.1.3 + resolution: "hast-util-is-element@npm:2.1.3" + dependencies: + "@types/hast": "npm:^2.0.0" + "@types/unist": "npm:^2.0.0" + checksum: a1f22d96a24aba39e85fc52b4f7248d66fd2fd60c0fcf9cdb0644aad92a315b22eeffe434f63791077a69196e30af629d80a04ddcedc344ca88c021bc8af19c7 + languageName: node + linkType: hard + +"hast-util-parse-selector@npm:^2.0.0": version: 2.2.5 resolution: "hast-util-parse-selector@npm:2.2.5" checksum: 29b7ee77960ded6a99d30c287d922243071cc07b39f2006f203bd08ee54eb8f66bdaa86ef6527477c766e2382d520b60ee4e4087f189888c35d8bcc020173648 languageName: node linkType: hard -"hast-util-raw@npm:^4.0.0": - version: 4.0.0 - resolution: "hast-util-raw@npm:4.0.0" +"hast-util-select@npm:^5.0.0": + version: 5.0.5 + resolution: "hast-util-select@npm:5.0.5" dependencies: - hast-util-from-parse5: "npm:^4.0.2" - hast-util-to-parse5: "npm:^4.0.1" - html-void-elements: "npm:^1.0.1" - parse5: "npm:^5.0.0" - unist-util-position: "npm:^3.0.0" - web-namespaces: "npm:^1.0.0" - xtend: "npm:^4.0.1" - zwitch: "npm:^1.0.0" - checksum: 967a330685c369b9a682176fbcf5104ea0f73453a98bd39f0dbd135b98c7ab55f84af7d4152dafbdadd9dbb6e933ca206bf02b18472613837afaa69079875453 + "@types/hast": "npm:^2.0.0" + "@types/unist": "npm:^2.0.0" + bcp-47-match: "npm:^2.0.0" + comma-separated-tokens: "npm:^2.0.0" + css-selector-parser: "npm:^1.0.0" + direction: "npm:^2.0.0" + hast-util-has-property: "npm:^2.0.0" + hast-util-to-string: "npm:^2.0.0" + hast-util-whitespace: "npm:^2.0.0" + not: "npm:^0.1.0" + nth-check: "npm:^2.0.0" + property-information: "npm:^6.0.0" + space-separated-tokens: "npm:^2.0.0" + unist-util-visit: "npm:^4.0.0" + zwitch: "npm:^2.0.0" + checksum: af9b27bacfbb1c0423e64d9ef4a717c7a5f36de3f35b0173b0b13cec514c4eff2b62c8c5c7fb155eb81e65f35206860fb9965d49474a17daa341fd5ef09ec6c5 languageName: node linkType: hard -"hast-util-to-html@npm:^4.0.1": - version: 4.0.1 - resolution: "hast-util-to-html@npm:4.0.1" +"hast-util-to-estree@npm:^2.0.0": + version: 2.3.3 + resolution: "hast-util-to-estree@npm:2.3.3" dependencies: - ccount: "npm:^1.0.0" - comma-separated-tokens: "npm:^1.0.1" - hast-util-is-element: "npm:^1.0.0" - hast-util-whitespace: "npm:^1.0.0" - html-void-elements: "npm:^1.0.0" - property-information: "npm:^4.0.0" - space-separated-tokens: "npm:^1.0.0" - stringify-entities: "npm:^1.0.1" - unist-util-is: "npm:^2.0.0" - xtend: "npm:^4.0.1" - checksum: 574fbd6b7ed4ddb3301a5c94f2512fe63fb74383408b0201e4076464cb99dad76a22acef53015dcfe76e7ce4934d988b576b6d8f5c88cb8a6e99a00cdc2ab871 + "@types/estree": "npm:^1.0.0" + "@types/estree-jsx": "npm:^1.0.0" + "@types/hast": "npm:^2.0.0" + "@types/unist": "npm:^2.0.0" + comma-separated-tokens: "npm:^2.0.0" + estree-util-attach-comments: "npm:^2.0.0" + estree-util-is-identifier-name: "npm:^2.0.0" + hast-util-whitespace: "npm:^2.0.0" + mdast-util-mdx-expression: "npm:^1.0.0" + mdast-util-mdxjs-esm: "npm:^1.0.0" + property-information: "npm:^6.0.0" + space-separated-tokens: "npm:^2.0.0" + style-to-object: "npm:^0.4.1" + unist-util-position: "npm:^4.0.0" + zwitch: "npm:^2.0.0" + checksum: 5947b5030a6d20c193f5ea576cc751507e0b30d00f91e40a5208ca3a7add03a3862795a83600c0fdadf19c8b051917c7904715fa7dd358f04603d67a36341c38 languageName: node linkType: hard @@ -19411,16 +19498,12 @@ __metadata: languageName: node linkType: hard -"hast-util-to-parse5@npm:^4.0.1": - version: 4.0.1 - resolution: "hast-util-to-parse5@npm:4.0.1" +"hast-util-to-string@npm:^2.0.0": + version: 2.0.0 + resolution: "hast-util-to-string@npm:2.0.0" dependencies: - hast-to-hyperscript: "npm:^5.0.0" - property-information: "npm:^4.0.0" - web-namespaces: "npm:^1.0.0" - xtend: "npm:^4.0.1" - zwitch: "npm:^1.0.0" - checksum: d69103b052c1c27451e29b9f5ccba89011cbaf73275ad631c2939f5294950b5516ac279dff2f68076a47d3170d4679a160a77e0c8944eda884faf90a38eb2f2e + "@types/hast": "npm:^2.0.0" + checksum: 9cf78d0de776e379476408d8363eeb690421e1b042919cfd97651eb968dbfe4ca9f5e4e23478a8d2c0d84a5432478d02d4c8ceef294b903becc5e8b71fa12849 languageName: node linkType: hard @@ -19435,6 +19518,28 @@ __metadata: languageName: node linkType: hard +"hast-util-to-text@npm:^3.0.0": + version: 3.1.2 + resolution: "hast-util-to-text@npm:3.1.2" + dependencies: + "@types/hast": "npm:^2.0.0" + "@types/unist": "npm:^2.0.0" + hast-util-is-element: "npm:^2.0.0" + unist-util-find-after: "npm:^4.0.0" + checksum: 0d93d04c42a066955f0425bb6056e472ea65eb5591412303acd865e59dd5962f40d15a3f70066c16013b541954ae52652ae1fd2bce99f537dca7f1a66928b916 + languageName: node + linkType: hard + +"hast-util-truncate@npm:^1.0.0": + version: 1.0.2 + resolution: "hast-util-truncate@npm:1.0.2" + dependencies: + "@types/hast": "npm:^2.0.0" + micromark-util-character: "npm:^1.0.0" + checksum: bdc274b78159fd4cf39caed676b1f967372c283be662d195e1b67598b53d94312cc48ce83b043e15dac3ec6599aa4ea65c1ea44948c9f3cbb13da5d7a059c78e + languageName: node + linkType: hard + "hast-util-whitespace@npm:^1.0.0, hast-util-whitespace@npm:^1.0.4": version: 1.0.4 resolution: "hast-util-whitespace@npm:1.0.4" @@ -19442,6 +19547,13 @@ __metadata: languageName: node linkType: hard +"hast-util-whitespace@npm:^2.0.0": + version: 2.0.1 + resolution: "hast-util-whitespace@npm:2.0.1" + checksum: dcf6ebab091c802ffa7bb3112305c7631c15adb6c07a258f5528aefbddf82b4e162c8310ef426c48dc1dc623982cc33920e6dde5a50015d307f2778dcf6c2487 + languageName: node + linkType: hard + "hast-util-whitespace@npm:^3.0.0": version: 3.0.0 resolution: "hast-util-whitespace@npm:3.0.0" @@ -19451,18 +19563,6 @@ __metadata: languageName: node linkType: hard -"hastscript@npm:^4.0.0": - version: 4.1.0 - resolution: "hastscript@npm:4.1.0" - dependencies: - comma-separated-tokens: "npm:^1.0.0" - hast-util-parse-selector: "npm:^2.2.0" - property-information: "npm:^4.0.0" - space-separated-tokens: "npm:^1.0.0" - checksum: 942c28de78d5a590fab0b125f03dd738ccd60a3d0816215d8c6ea4471009545bb0fe4b1c4e6442ae4aee77cd3f910cb8794d1b23ff137598a5c86da9d43862d2 - languageName: node - linkType: hard - "hastscript@npm:^5.0.0": version: 5.1.2 resolution: "hastscript@npm:5.1.2" @@ -19598,7 +19698,7 @@ __metadata: languageName: node linkType: hard -"html-void-elements@npm:^1.0.0, html-void-elements@npm:^1.0.1": +"html-void-elements@npm:^1.0.0": version: 1.0.5 resolution: "html-void-elements@npm:1.0.5" checksum: 97b6c108d7d6b31a45deddf95a65eb074bd0f358b55a61f3a031e055812eec368076ca23f0181674c5212166168988f35312756a3b376490e31e73d9a51f5549 @@ -19667,18 +19767,6 @@ __metadata: languageName: node linkType: hard -"htmlparser2@npm:^4.1.0": - version: 4.1.0 - resolution: "htmlparser2@npm:4.1.0" - dependencies: - domelementtype: "npm:^2.0.1" - domhandler: "npm:^3.0.0" - domutils: "npm:^2.0.0" - entities: "npm:^2.0.0" - checksum: a2d8d12ba45534a657d1965b71d4d581e521d14b7fc966ef031722cdd3895a23ce769fed63024e796538b3fc370e894b3a2f5b5071e54120905a6111cd3f88b0 - languageName: node - linkType: hard - "htmlparser2@npm:^6.1.0": version: 6.1.0 resolution: "htmlparser2@npm:6.1.0" @@ -20265,7 +20353,7 @@ __metadata: languageName: node linkType: hard -"is-buffer@npm:^1.1.4, is-buffer@npm:^1.1.5": +"is-buffer@npm:^1.1.5": version: 1.1.6 resolution: "is-buffer@npm:1.1.6" checksum: ae18aa0b6e113d6c490ad1db5e8df9bdb57758382b313f5a22c9c61084875c6396d50bbf49315f5b1926d142d74dfb8d31b40d993a383e0a158b15fea7a82234 @@ -20628,7 +20716,7 @@ __metadata: languageName: node linkType: hard -"is-plain-obj@npm:^1.0.0, is-plain-obj@npm:^1.1.0": +"is-plain-obj@npm:^1.0.0": version: 1.1.0 resolution: "is-plain-obj@npm:1.1.0" checksum: daaee1805add26f781b413fdf192fc91d52409583be30ace35c82607d440da63cc4cac0ac55136716688d6c0a2c6ef3edb2254fecbd1fe06056d6bd15975ee8c @@ -20679,6 +20767,15 @@ __metadata: languageName: node linkType: hard +"is-reference@npm:^3.0.0": + version: 3.0.2 + resolution: "is-reference@npm:3.0.2" + dependencies: + "@types/estree": "npm:*" + checksum: 652d31b405e8e8269071cee78fe874b072745012eba202c6dc86880fd603a65ae043e3160990ab4a0a4b33567cbf662eecf3bc6b3c2c1550e6c2b6cf885ce5aa + languageName: node + linkType: hard + "is-regex@npm:^1.1.4": version: 1.1.4 resolution: "is-regex@npm:1.1.4" @@ -22437,6 +22534,13 @@ __metadata: languageName: node linkType: hard +"markdown-extensions@npm:^1.0.0": + version: 1.1.1 + resolution: "markdown-extensions@npm:1.1.1" + checksum: eb9154016502ad1fb4477683ddb5cae8ba3ca06451b381b04dc4c34e91d8d168129d50d404b717d6bf7d458e13088c109303fc72d57cee7151a6082b0e7bba71 + languageName: node + linkType: hard + "markdown-it-container@npm:^4.0.0": version: 4.0.0 resolution: "markdown-it-container@npm:4.0.0" @@ -22551,6 +22655,17 @@ __metadata: languageName: node linkType: hard +"mdast-util-definitions@npm:^5.0.0": + version: 5.1.2 + resolution: "mdast-util-definitions@npm:5.1.2" + dependencies: + "@types/mdast": "npm:^3.0.0" + "@types/unist": "npm:^2.0.0" + unist-util-visit: "npm:^4.0.0" + checksum: da9049c15562e44ee4ea4a36113d98c6c9eaa3d8a17d6da2aef6a0626376dcd01d9ec007d77a8dfcad6d0cbd5c32a4abbad72a3f48c3172a55934c7d9a916480 + languageName: node + linkType: hard + "mdast-util-directive@npm:2.2.4": version: 2.2.4 resolution: "mdast-util-directive@npm:2.2.4" @@ -22840,7 +22955,7 @@ __metadata: languageName: node linkType: hard -"mdast-util-mdx@npm:^2.0.0": +"mdast-util-mdx@npm:^2.0.0, mdast-util-mdx@npm:^2.0.1": version: 2.0.1 resolution: "mdast-util-mdx@npm:2.0.1" dependencies: @@ -22901,6 +23016,22 @@ __metadata: languageName: node linkType: hard +"mdast-util-to-hast@npm:^12.1.0": + version: 12.3.0 + resolution: "mdast-util-to-hast@npm:12.3.0" + dependencies: + "@types/hast": "npm:^2.0.0" + "@types/mdast": "npm:^3.0.0" + mdast-util-definitions: "npm:^5.0.0" + micromark-util-sanitize-uri: "npm:^1.1.0" + trim-lines: "npm:^3.0.0" + unist-util-generated: "npm:^2.0.0" + unist-util-position: "npm:^4.0.0" + unist-util-visit: "npm:^4.0.0" + checksum: 0753e45bfcce423f7a13979ac720a23ed8d6bafed174c387f43bbe8baf3838f3a043cd8006975b71e5c4068b7948f83f1348acea79801101af31eaec4e7a499a + languageName: node + linkType: hard + "mdast-util-to-hast@npm:^13.0.0": version: 13.2.0 resolution: "mdast-util-to-hast@npm:13.2.0" @@ -22918,25 +23049,6 @@ __metadata: languageName: node linkType: hard -"mdast-util-to-hast@npm:^3.0.4": - version: 3.0.4 - resolution: "mdast-util-to-hast@npm:3.0.4" - dependencies: - collapse-white-space: "npm:^1.0.0" - detab: "npm:^2.0.0" - mdast-util-definitions: "npm:^1.2.0" - mdurl: "npm:^1.0.1" - trim: "npm:0.0.1" - trim-lines: "npm:^1.0.0" - unist-builder: "npm:^1.0.1" - unist-util-generated: "npm:^1.1.0" - unist-util-position: "npm:^3.0.0" - unist-util-visit: "npm:^1.1.0" - xtend: "npm:^4.0.1" - checksum: f9cf5fd72fea229391482079517674cd42661d1fcf92f7f01a7827a17699f39d7325ef38b8ca3facb148decf9548abbb820ac6fb5f95054dc042961f8ceb6dd9 - languageName: node - linkType: hard - "mdast-util-to-hast@npm:^4.0.0": version: 4.0.0 resolution: "mdast-util-to-hast@npm:4.0.0" @@ -22986,19 +23098,7 @@ __metadata: languageName: node linkType: hard -"mdast-util-to-nlcst@npm:^3.2.0": - version: 3.2.3 - resolution: "mdast-util-to-nlcst@npm:3.2.3" - dependencies: - nlcst-to-string: "npm:^2.0.0" - repeat-string: "npm:^1.5.2" - unist-util-position: "npm:^3.0.0" - vfile-location: "npm:^2.0.0" - checksum: 5357d7922f15667cfc192884461f81818c3d4f8033a164c07503ed696d91cff61f7a2cb54bb93297c7ee553389421c7669faede948a921c17e55ba6bd826b813 - languageName: node - linkType: hard - -"mdast-util-to-string@npm:^1.0.0, mdast-util-to-string@npm:^1.0.5, mdast-util-to-string@npm:^1.1.0": +"mdast-util-to-string@npm:^1.0.0, mdast-util-to-string@npm:^1.0.5": version: 1.1.0 resolution: "mdast-util-to-string@npm:1.1.0" checksum: 5dad9746ec0839792a8a35f504564e8d2b8c30013652410306c111963d33f1ee7b5477aa64ed77b64e13216363a29395809875ffd80e2031a08614657628a121 @@ -23021,18 +23121,18 @@ __metadata: languageName: node linkType: hard -"mdast-util-toc@npm:^5.0": - version: 5.1.0 - resolution: "mdast-util-toc@npm:5.1.0" +"mdast-util-toc@npm:^6.1.1": + version: 6.1.1 + resolution: "mdast-util-toc@npm:6.1.1" dependencies: - "@types/mdast": "npm:^3.0.3" - "@types/unist": "npm:^2.0.3" - extend: "npm:^3.0.2" - github-slugger: "npm:^1.2.1" - mdast-util-to-string: "npm:^2.0.0" - unist-util-is: "npm:^4.0.0" - unist-util-visit: "npm:^2.0.0" - checksum: f13cc1e9adb7c122926dd904f17907868e9c0a77de6109363e4a674881369fae451046e504be196076dedb070785faeccf7d6b2c3d9e44ebc6155157e9d152ba + "@types/extend": "npm:^3.0.0" + "@types/mdast": "npm:^3.0.0" + extend: "npm:^3.0.0" + github-slugger: "npm:^2.0.0" + mdast-util-to-string: "npm:^3.1.0" + unist-util-is: "npm:^5.0.0" + unist-util-visit: "npm:^4.0.0" + checksum: cb2855e2887625e0a4da11ba71fc9f80560498c4f073ec5edc16123766a7c418a42d913a64e8b7588b1b3833fa93ea5c8e2f78d24f2fd1df8fe57d1ae3b00b18 languageName: node linkType: hard @@ -23707,7 +23807,7 @@ __metadata: languageName: node linkType: hard -"micromark-util-sanitize-uri@npm:^1.0.0": +"micromark-util-sanitize-uri@npm:^1.0.0, micromark-util-sanitize-uri@npm:^1.1.0": version: 1.2.0 resolution: "micromark-util-sanitize-uri@npm:1.2.0" dependencies: @@ -24415,13 +24515,6 @@ __metadata: languageName: node linkType: hard -"nlcst-to-string@npm:^2.0.0": - version: 2.0.4 - resolution: "nlcst-to-string@npm:2.0.4" - checksum: db2bdb52c00201a29bfa2a00bc12d9b74259312d77f46c2ab6fbb137719a87f4320078a0a313065e7952eaa5f6afda91c69ddae07c8871629ab82f141fb9d34e - languageName: node - linkType: hard - "no-case@npm:^3.0.4": version: 3.0.4 resolution: "no-case@npm:3.0.4" @@ -24580,7 +24673,7 @@ __metadata: languageName: node linkType: hard -"node-object-hash@npm:^2.0.0, node-object-hash@npm:^2.3.10, node-object-hash@npm:^2.3.9": +"node-object-hash@npm:^2.0.0, node-object-hash@npm:^2.3.10": version: 2.3.10 resolution: "node-object-hash@npm:2.3.10" checksum: 6a3a59d8de1adfa283ece530ec4b89d889d72e4a3c75b3dacfd25428a67bc13977319b64bb0ab3125ec35afe90ae9c68b91cefbd8c55f62ae1e029e3ba5128ce @@ -25334,18 +25427,6 @@ __metadata: languageName: node linkType: hard -"parse-english@npm:^4.0.0": - version: 4.2.0 - resolution: "parse-english@npm:4.2.0" - dependencies: - nlcst-to-string: "npm:^2.0.0" - parse-latin: "npm:^4.0.0" - unist-util-modify-children: "npm:^2.0.0" - unist-util-visit-children: "npm:^1.0.0" - checksum: 8f2f7ae485f97dd7b3ecb4962e75b207821030328d0f352d806c4dd8d78ee6fb21981d24b6294e3d0ac7418b4c4e0685eeecceb2ffd0b5ebf33792539c6c71ab - languageName: node - linkType: hard - "parse-entities@npm:4.0.1, parse-entities@npm:^4.0.0": version: 4.0.1 resolution: "parse-entities@npm:4.0.1" @@ -25420,17 +25501,6 @@ __metadata: languageName: node linkType: hard -"parse-latin@npm:^4.0.0": - version: 4.3.0 - resolution: "parse-latin@npm:4.3.0" - dependencies: - nlcst-to-string: "npm:^2.0.0" - unist-util-modify-children: "npm:^2.0.0" - unist-util-visit-children: "npm:^1.0.0" - checksum: 77b458c61ba16f2f11cbde8c4648e4bb8cd5fdac7e65c16e4be33108abca5f1bf5c2e3e262b3b956c0b5bb3bc640b4c9bc75c5192ad4aa28ecaa749ee8ab031d - languageName: node - linkType: hard - "parse-path@npm:^4.0.0": version: 4.0.4 resolution: "parse-path@npm:4.0.4" @@ -25461,13 +25531,6 @@ __metadata: languageName: node linkType: hard -"parse-srcset@npm:^1.0.2": - version: 1.0.2 - resolution: "parse-srcset@npm:1.0.2" - checksum: 2f268e3d110d4c53d06ed2a8e8ee61a7da0cee13bf150819a6da066a8ca9b8d15b5600d6e6cae8be940e2edc50ee7c1e1052934d6ec858324065ecef848f0497 - languageName: node - linkType: hard - "parse-url@npm:^6.0.0": version: 6.0.5 resolution: "parse-url@npm:6.0.5" @@ -25713,6 +25776,17 @@ __metadata: languageName: node linkType: hard +"periscopic@npm:^3.0.0": + version: 3.1.0 + resolution: "periscopic@npm:3.1.0" + dependencies: + "@types/estree": "npm:^1.0.0" + estree-walker: "npm:^3.0.0" + is-reference: "npm:^3.0.0" + checksum: fb5ce7cd810c49254cdf1cd3892811e6dd1a1dfbdf5f10a0a33fb7141baac36443c4cad4f0e2b30abd4eac613f6ab845c2bc1b7ce66ae9694c7321e6ada5bd96 + languageName: node + linkType: hard + "pg-int8@npm:1.0.1": version: 1.0.1 resolution: "pg-int8@npm:1.0.1" @@ -25776,13 +25850,6 @@ __metadata: languageName: node linkType: hard -"picocolors@npm:^0.2.1": - version: 0.2.1 - resolution: "picocolors@npm:0.2.1" - checksum: 98a83c77912c80aea0fc518aec184768501bfceafa490714b0f43eda9c52e372b844ce0a591e822bbfe5df16dcf366be7cbdb9534d39cf54a80796340371ee17 - languageName: node - linkType: hard - "picocolors@npm:^1.0.0": version: 1.0.0 resolution: "picocolors@npm:1.0.0" @@ -26510,16 +26577,6 @@ __metadata: languageName: node linkType: hard -"postcss@npm:^7.0.27": - version: 7.0.39 - resolution: "postcss@npm:7.0.39" - dependencies: - picocolors: "npm:^0.2.1" - source-map: "npm:^0.6.1" - checksum: fd27ee808c0d02407582cccfad4729033e2b439d56cd45534fb39aaad308bb35a290f3b7db5f2394980e8756f9381b458a625618550808c5ff01a125f51efc53 - languageName: node - linkType: hard - "postcss@npm:^8.2.15, postcss@npm:^8.2.9, postcss@npm:^8.4.23, postcss@npm:^8.4.24": version: 8.4.31 resolution: "postcss@npm:8.4.31" @@ -28365,6 +28422,21 @@ __metadata: languageName: node linkType: hard +"rehype-infer-description-meta@npm:^1.1.0": + version: 1.1.0 + resolution: "rehype-infer-description-meta@npm:1.1.0" + dependencies: + "@types/hast": "npm:^2.0.0" + hast-util-excerpt: "npm:^1.0.0" + hast-util-select: "npm:^5.0.0" + hast-util-to-text: "npm:^3.0.0" + hast-util-truncate: "npm:^1.0.0" + unified: "npm:^10.0.0" + unist-util-remove-position: "npm:^4.0.0" + checksum: 6641e6692e59301f5a8315660f21ee4fae6c4a448c47dbe35f5de77037fe3bc11f7e9f5732fd768318d326b66dc77bfc527f448e26a6d0f46059487148cd66c9 + languageName: node + linkType: hard + "rehype-minify-whitespace@npm:^4.0.3": version: 4.0.5 resolution: "rehype-minify-whitespace@npm:4.0.5" @@ -28486,7 +28558,7 @@ __metadata: languageName: node linkType: hard -"remark-mdx@npm:2.3.0": +"remark-mdx@npm:2.3.0, remark-mdx@npm:^2.0.0": version: 2.3.0 resolution: "remark-mdx@npm:2.3.0" dependencies: @@ -28507,7 +28579,7 @@ __metadata: languageName: node linkType: hard -"remark-parse@npm:^6.0.0, remark-parse@npm:^6.0.3": +"remark-parse@npm:^6.0.3": version: 6.0.3 resolution: "remark-parse@npm:6.0.3" dependencies: @@ -28539,6 +28611,18 @@ __metadata: languageName: node linkType: hard +"remark-rehype@npm:^10.0.0": + version: 10.1.0 + resolution: "remark-rehype@npm:10.1.0" + dependencies: + "@types/hast": "npm:^2.0.0" + "@types/mdast": "npm:^3.0.0" + mdast-util-to-hast: "npm:^12.1.0" + unified: "npm:^10.0.0" + checksum: 803e658c9b51a9b53ee2ada42ff82e8e570444bb97c873e0d602c2d8dcb69a774fd22bd6f26643dfd5ab4c181059ea6c9fb9a99a2d7f9665f3f11bef1a1489bd + languageName: node + linkType: hard + "remark-rehype@npm:^4.0.0": version: 4.0.1 resolution: "remark-rehype@npm:4.0.1" @@ -28557,15 +28641,6 @@ __metadata: languageName: node linkType: hard -"remark-retext@npm:^3.1.3": - version: 3.1.3 - resolution: "remark-retext@npm:3.1.3" - dependencies: - mdast-util-to-nlcst: "npm:^3.2.0" - checksum: a94c23291abfc0b736b38bc3626415ad041d660115c1de25aaacc87f4ec7b35f21942fbf5a8a2bd5745dcb2aa12ceb3cc9db8fcc74e0129cfb02386e2fb40004 - languageName: node - linkType: hard - "remark-slate-transformer@npm:^0.7.4": version: 0.7.5 resolution: "remark-slate-transformer@npm:0.7.5" @@ -28589,7 +28664,18 @@ __metadata: languageName: node linkType: hard -"remark-stringify@npm:6.0.4, remark-stringify@npm:^6.0.0, remark-stringify@npm:^6.0.4": +"remark-stringify@npm:^10.0.0": + version: 10.0.3 + resolution: "remark-stringify@npm:10.0.3" + dependencies: + "@types/mdast": "npm:^3.0.0" + mdast-util-to-markdown: "npm:^1.0.0" + unified: "npm:^10.0.0" + checksum: 682f26c66ce72e97a00bff75774b68f8008184dc1e4407039e186de896b5cd5d336aa65842bf131f4826a7415acdcd01d14ba59ff41b421a250c23fb187cda85 + languageName: node + linkType: hard + +"remark-stringify@npm:^6.0.4": version: 6.0.4 resolution: "remark-stringify@npm:6.0.4" dependencies: @@ -28611,14 +28697,15 @@ __metadata: languageName: node linkType: hard -"remark-stringify@npm:^10.0.0": - version: 10.0.3 - resolution: "remark-stringify@npm:10.0.3" +"remark-unwrap-images@npm:^3.0.1": + version: 3.0.1 + resolution: "remark-unwrap-images@npm:3.0.1" dependencies: "@types/mdast": "npm:^3.0.0" - mdast-util-to-markdown: "npm:^1.0.0" + hast-util-whitespace: "npm:^2.0.0" unified: "npm:^10.0.0" - checksum: 682f26c66ce72e97a00bff75774b68f8008184dc1e4407039e186de896b5cd5d336aa65842bf131f4826a7415acdcd01d14ba59ff41b421a250c23fb187cda85 + unist-util-visit: "npm:^4.0.0" + checksum: 1da9d9feba42fa7c533ab6fb15a1f5a40812abf291681594be9210f8e675ac6d6727fb47aba4b39ab537649adefa0720d091ea41f29fb115a8a860f8f4c2469c languageName: node linkType: hard @@ -28634,17 +28721,6 @@ __metadata: languageName: node linkType: hard -"remark@npm:^10.0.1": - version: 10.0.1 - resolution: "remark@npm:10.0.1" - dependencies: - remark-parse: "npm:^6.0.0" - remark-stringify: "npm:^6.0.0" - unified: "npm:^7.0.0" - checksum: 5d6e9720888a3574f3b3608511bc273f502639b0a05bccb426243f626a542a068fc42b9daeab5531adb0428acc3ca93fb2b585e15735b730782d04417c9671b2 - languageName: node - linkType: hard - "remove-trailing-separator@npm:^1.0.1": version: 1.1.0 resolution: "remove-trailing-separator@npm:1.1.0" @@ -28685,20 +28761,13 @@ __metadata: languageName: node linkType: hard -"repeat-string@npm:^1.0.0, repeat-string@npm:^1.5.2, repeat-string@npm:^1.5.4, repeat-string@npm:^1.6.1": +"repeat-string@npm:^1.0.0, repeat-string@npm:^1.5.4, repeat-string@npm:^1.6.1": version: 1.6.1 resolution: "repeat-string@npm:1.6.1" checksum: 87fa21bfdb2fbdedc44b9a5b118b7c1239bdd2c2c1e42742ef9119b7d412a5137a1d23f1a83dc6bb686f4f27429ac6f542e3d923090b44181bafa41e8ac0174d languageName: node linkType: hard -"replace-ext@npm:1.0.0": - version: 1.0.0 - resolution: "replace-ext@npm:1.0.0" - checksum: 35c17eda416c4578b49baa25337a417ffad929d89904d6aae45b84febf0291580ef6560245692b66a10406405f5b44d11f9dc2f9ec92ed58bbf22562d5c06fe9 - languageName: node - linkType: hard - "replace-ext@npm:^1.0.0": version: 1.0.1 resolution: "replace-ext@npm:1.0.1" @@ -28961,16 +29030,6 @@ __metadata: languageName: node linkType: hard -"retext-english@npm:^3.0.4": - version: 3.0.4 - resolution: "retext-english@npm:3.0.4" - dependencies: - parse-english: "npm:^4.0.0" - unherit: "npm:^1.0.4" - checksum: 22f36d1080fff3c132e2b6e1cb689d61cded034357663d998e9ec9fa399a56764308ac101f697dd5effda0d2dec89693dddde49983eba858d136cde9dc395c63 - languageName: node - linkType: hard - "retry@npm:^0.12.0": version: 0.12.0 resolution: "retry@npm:0.12.0" @@ -29202,18 +29261,6 @@ __metadata: languageName: node linkType: hard -"sanitize-html@npm:^1.27.5": - version: 1.27.5 - resolution: "sanitize-html@npm:1.27.5" - dependencies: - htmlparser2: "npm:^4.1.0" - lodash: "npm:^4.17.15" - parse-srcset: "npm:^1.0.2" - postcss: "npm:^7.0.27" - checksum: 4d6ead11092b6fb4d7e1a97e7daba912fd89cae4979cb20122907169c1f63b05ee5ac62789e0e849de8029d7d4f112aec8796a68e8d989e0cd2e9b3dc91f6b29 - languageName: node - linkType: hard - "sax@npm:>=0.6.0, sax@npm:^1.2.4": version: 1.3.0 resolution: "sax@npm:1.3.0" @@ -30274,7 +30321,7 @@ __metadata: languageName: node linkType: hard -"source-map@npm:^0.7.3": +"source-map@npm:^0.7.0, source-map@npm:^0.7.3": version: 0.7.4 resolution: "source-map@npm:0.7.4" checksum: dc0cf3768fe23c345ea8760487f8c97ef6fca8a73c83cd7c9bf2fde8bc2c34adb9c0824d6feb14bc4f9e37fb522e18af621543f1289038a66ac7586da29aa7dc @@ -30327,13 +30374,6 @@ __metadata: languageName: node linkType: hard -"sprintf-js@npm:^1.1.1": - version: 1.1.3 - resolution: "sprintf-js@npm:1.1.3" - checksum: 09270dc4f30d479e666aee820eacd9e464215cdff53848b443964202bf4051490538e5dd1b42e1a65cf7296916ca17640aebf63dae9812749c7542ee5f288dec - languageName: node - linkType: hard - "sprintf-js@npm:~1.0.2": version: 1.0.3 resolution: "sprintf-js@npm:1.0.3" @@ -32192,16 +32232,6 @@ __metadata: languageName: node linkType: hard -"underscore.string@npm:^3.3.5": - version: 3.3.6 - resolution: "underscore.string@npm:3.3.6" - dependencies: - sprintf-js: "npm:^1.1.1" - util-deprecate: "npm:^1.0.2" - checksum: 172319c7ef5436587e6f0fb5afe0b2e6b50f723a4070c7fb3454c5dfa5398ed3b7042c049eac2826bdd44d37cbd16b2b965d0ccc1597fde354b1d3a846fd4a39 - languageName: node - linkType: hard - "undici-types@npm:~5.26.4": version: 5.26.5 resolution: "undici-types@npm:5.26.5" @@ -32273,7 +32303,7 @@ __metadata: languageName: node linkType: hard -"unified@npm:^10.0.0": +"unified@npm:^10.0.0, unified@npm:^10.1.2": version: 10.1.2 resolution: "unified@npm:10.1.2" dependencies: @@ -32288,36 +32318,6 @@ __metadata: languageName: node linkType: hard -"unified@npm:^6.2.0": - version: 6.2.0 - resolution: "unified@npm:6.2.0" - dependencies: - bail: "npm:^1.0.0" - extend: "npm:^3.0.0" - is-plain-obj: "npm:^1.1.0" - trough: "npm:^1.0.0" - vfile: "npm:^2.0.0" - x-is-string: "npm:^0.1.0" - checksum: 45ab7f2cce50d8a5ef3c1622f0803fb67aa1470c16e20a23ffb50e0ebdcbbcffe00ab9097b4d170db1a177af497d0fdf032a1b81f919938a894f397a682bc581 - languageName: node - linkType: hard - -"unified@npm:^7.0.0": - version: 7.1.0 - resolution: "unified@npm:7.1.0" - dependencies: - "@types/unist": "npm:^2.0.0" - "@types/vfile": "npm:^3.0.0" - bail: "npm:^1.0.0" - extend: "npm:^3.0.0" - is-plain-obj: "npm:^1.1.0" - trough: "npm:^1.0.0" - vfile: "npm:^3.0.0" - x-is-string: "npm:^0.1.0" - checksum: 1d780d624d0c73e0d1a7ef3af89b4243d9d658a0ad3d4053c3ef85eeb1d069a67d1023b0983cc519c028aa366c4bbe0dcc3e884b14e5d41f607587d85d674200 - languageName: node - linkType: hard - "unified@npm:^9.0.0, unified@npm:^9.2.0, unified@npm:^9.2.2": version: 9.2.2 resolution: "unified@npm:9.2.2" @@ -32396,6 +32396,16 @@ __metadata: languageName: node linkType: hard +"unist-util-find-after@npm:^4.0.0": + version: 4.0.1 + resolution: "unist-util-find-after@npm:4.0.1" + dependencies: + "@types/unist": "npm:^2.0.0" + unist-util-is: "npm:^5.0.0" + checksum: 3b53e6a74009ed4f5db45aae76b81630f0fcd721825f886e724d5262089955fce86d83e98083598820cb4fa48070b7b819390d66c410f705a4841d0ffc0614f1 + languageName: node + linkType: hard + "unist-util-generated@npm:^1.0.0, unist-util-generated@npm:^1.1.0": version: 1.1.6 resolution: "unist-util-generated@npm:1.1.6" @@ -32403,6 +32413,13 @@ __metadata: languageName: node linkType: hard +"unist-util-generated@npm:^2.0.0": + version: 2.0.1 + resolution: "unist-util-generated@npm:2.0.1" + checksum: 6f052dd47a7280785f3787f52cdfe8819e1de50317a1bcf7c9346c63268cf2cebc61a5980e7ca734a54735e27dbb73091aa0361a98504ab7f9409fb75f1b16bb + languageName: node + linkType: hard + "unist-util-is@npm:^2.0.0": version: 2.1.3 resolution: "unist-util-is@npm:2.1.3" @@ -32442,15 +32459,6 @@ __metadata: languageName: node linkType: hard -"unist-util-modify-children@npm:^2.0.0": - version: 2.0.0 - resolution: "unist-util-modify-children@npm:2.0.0" - dependencies: - array-iterate: "npm:^1.0.0" - checksum: 407cafab9ab0980fbba8ef230e20871cab7b20b5c0e3d3b8769aabb774ed2b2e6fcb5a7e22842593750fe52d23c6cb8f63e060dec9328a9d9b408da31795d58e - languageName: node - linkType: hard - "unist-util-position-from-estree@npm:^1.0.0, unist-util-position-from-estree@npm:^1.1.0": version: 1.1.2 resolution: "unist-util-position-from-estree@npm:1.1.2" @@ -32467,6 +32475,15 @@ __metadata: languageName: node linkType: hard +"unist-util-position@npm:^4.0.0": + version: 4.0.4 + resolution: "unist-util-position@npm:4.0.4" + dependencies: + "@types/unist": "npm:^2.0.0" + checksum: e506d702e25a0fb47a64502054f709a6ff5db98993bf139eec868cd11eb7de34392b781c6c2002e2c24d97aa398c14b32a47076129f36e4b894a2c1351200888 + languageName: node + linkType: hard + "unist-util-position@npm:^5.0.0": version: 5.0.0 resolution: "unist-util-position@npm:5.0.0" @@ -32476,7 +32493,7 @@ __metadata: languageName: node linkType: hard -"unist-util-remove-position@npm:^1.0.0, unist-util-remove-position@npm:^1.1.4": +"unist-util-remove-position@npm:^1.0.0": version: 1.1.4 resolution: "unist-util-remove-position@npm:1.1.4" dependencies: @@ -32495,7 +32512,7 @@ __metadata: languageName: node linkType: hard -"unist-util-select@npm:1.5.0, unist-util-select@npm:^1.5.0": +"unist-util-select@npm:1.5.0": version: 1.5.0 resolution: "unist-util-select@npm:1.5.0" dependencies: @@ -32552,13 +32569,6 @@ __metadata: languageName: node linkType: hard -"unist-util-stringify-position@npm:^1.0.0, unist-util-stringify-position@npm:^1.1.1": - version: 1.1.2 - resolution: "unist-util-stringify-position@npm:1.1.2" - checksum: 669abf4f395928991ac12047e600d41daf20eb641a7aff3995acb2d693d68b78988f00122102c7567746fcc3e7c9dea94a20dfce50fe1187544dbd3a6e070a1d - languageName: node - linkType: hard - "unist-util-stringify-position@npm:^2.0.0": version: 2.0.3 resolution: "unist-util-stringify-position@npm:2.0.3" @@ -32577,13 +32587,6 @@ __metadata: languageName: node linkType: hard -"unist-util-visit-children@npm:^1.0.0": - version: 1.1.4 - resolution: "unist-util-visit-children@npm:1.1.4" - checksum: 83e6a03b8e04c5a0a50b41d966ce32a2422d805d9ba2bd528c16a271ac4ecbb57e9fc84c7975dedd862a610126cd0f00c31e7dba4a2e2bd03373a7867797702a - languageName: node - linkType: hard - "unist-util-visit-parents@npm:3.1.1, unist-util-visit-parents@npm:^3.0.0, unist-util-visit-parents@npm:^3.1.1": version: 3.1.1 resolution: "unist-util-visit-parents@npm:3.1.1" @@ -32623,7 +32626,7 @@ __metadata: languageName: node linkType: hard -"unist-util-visit@npm:4.1.2, unist-util-visit@npm:^4.0.0": +"unist-util-visit@npm:4.1.2, unist-util-visit@npm:^4.0.0, unist-util-visit@npm:^4.1.2": version: 4.1.2 resolution: "unist-util-visit@npm:4.1.2" dependencies: @@ -33131,15 +33134,6 @@ __metadata: languageName: node linkType: hard -"vfile-message@npm:^1.0.0": - version: 1.1.1 - resolution: "vfile-message@npm:1.1.1" - dependencies: - unist-util-stringify-position: "npm:^1.1.1" - checksum: 95158d5d6e5ccc03bd32f29b27ca1f6732b9a8fc3bb8ba06a9860e715a023ccc802716aec9e8ceb463e81c6cf7fa6f288d03441d2e99f6c592543ba24cbaa457 - languageName: node - linkType: hard - "vfile-message@npm:^2.0.0": version: 2.0.4 resolution: "vfile-message@npm:2.0.4" @@ -33160,30 +33154,6 @@ __metadata: languageName: node linkType: hard -"vfile@npm:^2.0.0": - version: 2.3.0 - resolution: "vfile@npm:2.3.0" - dependencies: - is-buffer: "npm:^1.1.4" - replace-ext: "npm:1.0.0" - unist-util-stringify-position: "npm:^1.0.0" - vfile-message: "npm:^1.0.0" - checksum: d9386518425d12f60a65ba042e402902221ad0a904cc54cee039162f9a836ee15a4298aed103f915766340972365fafbe87f8e31680ed63a6a5e2f46ae0bebb6 - languageName: node - linkType: hard - -"vfile@npm:^3.0.0": - version: 3.0.1 - resolution: "vfile@npm:3.0.1" - dependencies: - is-buffer: "npm:^2.0.0" - replace-ext: "npm:1.0.0" - unist-util-stringify-position: "npm:^1.0.0" - vfile-message: "npm:^1.0.0" - checksum: abc67795a4d789b28977582f8b3fad48c7930c0ffa9a0f8ddded132cbd9f3d3da4e20aaa4560e5338ed2740c641f5a9128eb35f54f93195993c5692d35db6b5a - languageName: node - linkType: hard - "vfile@npm:^4.0.0": version: 4.2.1 resolution: "vfile@npm:4.2.1" @@ -33196,7 +33166,7 @@ __metadata: languageName: node linkType: hard -"vfile@npm:^5.0.0": +"vfile@npm:^5.0.0, vfile@npm:^5.3.7": version: 5.3.7 resolution: "vfile@npm:5.3.7" dependencies: @@ -33337,7 +33307,7 @@ __metadata: languageName: node linkType: hard -"web-namespaces@npm:^1.0.0, web-namespaces@npm:^1.1.2": +"web-namespaces@npm:^1.1.2": version: 1.1.4 resolution: "web-namespaces@npm:1.1.4" checksum: 05b5782c32a33ef94fa7a412afdebc9d0d3cc7b59db31d2cc7bd80de3e237d4b6309cb5f156d06e3a837b9826c9414448c25111ec1d4407d2025ffeb7bea4f62 @@ -33736,13 +33706,6 @@ __metadata: languageName: node linkType: hard -"x-is-string@npm:^0.1.0": - version: 0.1.0 - resolution: "x-is-string@npm:0.1.0" - checksum: 1ec001229eb17ac5c08c5bfb03c6d6e415306a6e923c0dbcadc5cb655b6008f61d50f29fcf610c9527bcbb9df40db82fb3cc9aefcb575898fba2affa17864f1c - languageName: node - linkType: hard - "xdg-basedir@npm:^4.0.0": version: 4.0.0 resolution: "xdg-basedir@npm:4.0.0" From 9c11578a2f3995ecd66cf9e94e8196765d4344cc Mon Sep 17 00:00:00 2001 From: Tylah Kapa Date: Fri, 4 Oct 2024 15:31:38 +1000 Subject: [PATCH 02/43] Update gatsby-node --- gatsby-node.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gatsby-node.js b/gatsby-node.js index d06df59bb..ee3182ee7 100644 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -38,7 +38,7 @@ exports.onCreateNode = ({ node, getNode, actions }) => { exports.createSchemaCustomization = ({ actions }) => { const { createTypes } = actions; const typeDefs = ` - type MarkdownRemark implements Node @infer { + type Mdx implements Node @infer { frontmatter: Frontmatter } type Frontmatter @infer { @@ -135,6 +135,9 @@ exports.createPages = async ({ graphql, actions }) => { } `); + const categoryTemplate = require.resolve('./src/templates/category.js'); + const ruleTemplate = require.resolve('./src/templates/rule.js'); + result.data.categories.nodes.forEach((node) => { // Find any categories that can't resolve a rule node.frontmatter.index.forEach((inCat) => { @@ -164,7 +167,7 @@ exports.createPages = async ({ graphql, actions }) => { console.log('Creating Category: ' + node.parent.name); createPage({ path: node.parent.name, - component: `${node}?__contentFilePath=${node.internal.contentFilePath}`, + component: `${categoryTemplate}?__contentFilePath=${node.internal.contentFilePath}`, context: { slug: node.fields.slug, index: node.frontmatter.index, @@ -211,7 +214,7 @@ exports.createPages = async ({ graphql, actions }) => { console.log('Creating Rule: ' + node.frontmatter.title); createPage({ path: node.frontmatter.uri, - component: `${node}?__contentFilePath=${node.internal.contentFilePath}`, + component: `${ruleTemplate}?__contentFilePath=${node.internal.contentFilePath}`, context: { slug: node.fields.slug, related: node.frontmatter.related ? node.frontmatter.related : [''], From 96129420e00def1e831a3470096dcfdd39d43682 Mon Sep 17 00:00:00 2001 From: Calinator444 Date: Thu, 10 Oct 2024 11:39:27 +1100 Subject: [PATCH 03/43] changed allMarkdownRemark instances to allMdx & reinstalled gatsby-transformer-remark --- gatsby-node.js | 2 +- .../profile-content/profile-content.js | 38 +++++++++---------- src/helpers/algolia-queries.js | 2 +- src/pages/archived.js | 25 ++++++------ src/pages/index.js | 20 +++++----- src/pages/latest-rules.js | 14 +++---- src/pages/orphaned.js | 35 ++++++++--------- src/pages/profile.js | 14 +++---- src/pages/search.js | 12 +++--- src/pages/user/index.js | 10 ++--- src/templates/category.js | 32 ++++++++-------- src/templates/rule.js | 30 +++++++-------- 12 files changed, 112 insertions(+), 122 deletions(-) diff --git a/gatsby-node.js b/gatsby-node.js index ee3182ee7..3901565c5 100644 --- a/gatsby-node.js +++ b/gatsby-node.js @@ -241,7 +241,7 @@ exports.createPages = async ({ graphql, actions }) => { createPage({ path: `${siteConfig.pathPrefix}/people/`, matchPath: `${siteConfig.pathPrefix}/people/:gitHubUsername`, - component: profilePage, + component: `${profilePage}?__contentFilePath=${node.fiels.slug}`, }); }; diff --git a/src/components/profile-content/profile-content.js b/src/components/profile-content/profile-content.js index 62ccaf18b..92ef5d182 100644 --- a/src/components/profile-content/profile-content.js +++ b/src/components/profile-content/profile-content.js @@ -1,38 +1,38 @@ /* eslint-disable no-undef */ /* eslint-disable quotes */ -import React, { useEffect, useState, useRef } from 'react'; -import PropTypes from 'prop-types'; +import BookmarkIcon from '-!svg-react-loader!../../images/bookmarkIcon.svg'; +import DisqusIcon from '-!svg-react-loader!../../images/disqusIcon.svg'; import { Link } from 'gatsby'; +import PropTypes from 'prop-types'; +import React, { useEffect, useRef, useState } from 'react'; import { - GetBookmarksForUser, + DisqusError, GetAllLikedDisliked, + GetBookmarksForUser, + GetDisqusUserCommentsList, + GetUser, RemoveBookmark, RemoveReaction, - GetDisqusUserCommentsList, RemoveUserCommentsAccount, - GetUser, - DisqusError, } from '../../services/apiService'; import { useAuthService } from '../../services/authService'; -import BookmarkIcon from '-!svg-react-loader!../../images/bookmarkIcon.svg'; -import DisqusIcon from '-!svg-react-loader!../../images/disqusIcon.svg'; +import { useAuth0 } from '@auth0/auth0-react'; +import { ApplicationInsights } from '@microsoft/applicationinsights-web'; import MD from 'gatsby-custom-md'; import GreyBox from '../greybox/greybox'; -import { useAuth0 } from '@auth0/auth0-react'; import { Filter } from '../profile-filter-menu/profile-filter-menu'; -import { ApplicationInsights } from '@microsoft/applicationinsights-web'; -import CommentsNotConnected from '../comments-not-connected/comments-not-connected'; -import DisableDisqusPrivacy from '../disable-disqus-privacy/disable-disqus-privacy'; -import RadioButton from '../radio-button/radio-button'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faArrowCircleRight, - faQuoteLeft, - faFileLines, faBook, + faFileLines, + faQuoteLeft, } from '@fortawesome/free-solid-svg-icons'; +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import CommentsNotConnected from '../comments-not-connected/comments-not-connected'; +import DisableDisqusPrivacy from '../disable-disqus-privacy/disable-disqus-privacy'; +import RadioButton from '../radio-button/radio-button'; const appInsights = new ApplicationInsights({ config: { @@ -92,7 +92,7 @@ const ProfileContent = (props) => { function getBookmarkList() { GetBookmarksForUser(user.sub) .then((success) => { - const allRules = props.data.allMarkdownRemark.nodes; + const allRules = props.data.allMdx.nodes; const bookmarkedGuids = success.bookmarkedRules.size != 0 ? success.bookmarkedRules.map((r) => r.ruleGuid) @@ -123,7 +123,7 @@ const ProfileContent = (props) => { } }); - const allRules = props.data.allMarkdownRemark.nodes; + const allRules = props.data.allMdx.nodes; const commentedRulesMap = allRules.filter((value) => commentedRuleGuids.includes(value.frontmatter.guid) @@ -178,7 +178,7 @@ const ProfileContent = (props) => { function getLikesDislikesLists() { GetAllLikedDisliked(user.sub) .then((success) => { - const allRules = props.data.allMarkdownRemark.nodes; + const allRules = props.data.allMdx.nodes; const reactedGuids = success.likesDislikedRules.map((r) => r.ruleGuid); const reactedRules = allRules.filter((value) => reactedGuids.includes(value.frontmatter.guid) diff --git a/src/helpers/algolia-queries.js b/src/helpers/algolia-queries.js index 2c884d326..28f7c4d5c 100644 --- a/src/helpers/algolia-queries.js +++ b/src/helpers/algolia-queries.js @@ -1,7 +1,7 @@ const indexName = 'Rules'; const pageQuery = `{ - pages: allMarkdownRemark(filter: { frontmatter: { type: { eq: "rule" } } }) { + pages: allMdx(filter: { frontmatter: { type: { eq: "rule" } } }) { nodes { id excerpt(format: PLAIN, pruneLength: 500) diff --git a/src/pages/archived.js b/src/pages/archived.js index f2fee0687..b903f73c3 100644 --- a/src/pages/archived.js +++ b/src/pages/archived.js @@ -1,14 +1,15 @@ -import React, { useRef } from 'react'; -import { useStaticQuery, graphql } from 'gatsby'; -import PropTypes from 'prop-types'; import { config } from '@fortawesome/fontawesome-svg-core'; +import { + faArchive, + faExclamationTriangle, +} from '@fortawesome/free-solid-svg-icons'; +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import { graphql, Link, useStaticQuery } from 'gatsby'; +import PropTypes from 'prop-types'; +import React, { useRef } from 'react'; import Breadcrumb from '../components/breadcrumb/breadcrumb'; import SideBar from '../components/side-bar/side-bar'; -import { Link } from 'gatsby'; import TopCategoryHeader from '../components/topcategory-header/topcategory-header'; -import { faExclamationTriangle } from '@fortawesome/free-solid-svg-icons'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { faArchive } from '@fortawesome/free-solid-svg-icons'; config.autoAddCss = false; @@ -163,7 +164,7 @@ Archived.propTypes = { function ArchivedWithQuery(props) { const data = useStaticQuery(graphql` query ArchiveQuery { - main: allMarkdownRemark( + main: allMdx( filter: { fileAbsolutePath: { regex: "/(categories)/" } frontmatter: { type: { eq: "main" } } @@ -183,7 +184,7 @@ function ArchivedWithQuery(props) { } } } - topCategories: allMarkdownRemark( + topCategories: allMdx( filter: { fileAbsolutePath: { regex: "/(categories)/" } frontmatter: { type: { eq: "top-category" } } @@ -204,7 +205,7 @@ function ArchivedWithQuery(props) { } } } - categories: allMarkdownRemark( + categories: allMdx( filter: { fileAbsolutePath: { regex: "/(categories)/" } frontmatter: { type: { eq: "category" } } @@ -226,9 +227,7 @@ function ArchivedWithQuery(props) { } } } - rules: allMarkdownRemark( - filter: { frontmatter: { type: { eq: "rule" } } } - ) { + rules: allMdx(filter: { frontmatter: { type: { eq: "rule" } } }) { nodes { frontmatter { uri diff --git a/src/pages/index.js b/src/pages/index.js index 483cb86fd..de937c3ba 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -1,19 +1,19 @@ -import { Link, useStaticQuery, graphql } from 'gatsby'; import { faArchive, - faPause, faBolt, faFrownOpen, + faPause, } from '@fortawesome/free-solid-svg-icons'; +import { graphql, Link, useStaticQuery } from 'gatsby'; -import Breadcrumb from '../components/breadcrumb/breadcrumb'; +import { config } from '@fortawesome/fontawesome-svg-core'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import PropTypes from 'prop-types'; import React from 'react'; +import Breadcrumb from '../components/breadcrumb/breadcrumb'; +import SearchBar from '../components/search-bar/search-bar'; import SideBar from '../components/side-bar/side-bar'; import TopCategory from '../components/top-category/top-category'; -import { config } from '@fortawesome/fontawesome-svg-core'; -import SearchBar from '../components/search-bar/search-bar'; config.autoAddCss = false; @@ -111,7 +111,7 @@ Index.propTypes = { function IndexWithQuery(props) { const data = useStaticQuery(graphql` query HomepageQuery { - main: allMarkdownRemark( + main: allMdx( filter: { fileAbsolutePath: { regex: "/(categories)/" } frontmatter: { type: { eq: "main" } } @@ -131,7 +131,7 @@ function IndexWithQuery(props) { } } } - topCategories: allMarkdownRemark( + topCategories: allMdx( filter: { fileAbsolutePath: { regex: "/(categories)/" } frontmatter: { type: { eq: "top-category" } } @@ -152,7 +152,7 @@ function IndexWithQuery(props) { } } } - categories: allMarkdownRemark( + categories: allMdx( filter: { fileAbsolutePath: { regex: "/(categories)/" } frontmatter: { type: { eq: "category" } } @@ -174,9 +174,7 @@ function IndexWithQuery(props) { } } } - rules: allMarkdownRemark( - filter: { frontmatter: { type: { eq: "rule" } } } - ) { + rules: allMdx(filter: { frontmatter: { type: { eq: "rule" } } }) { nodes { frontmatter { title diff --git a/src/pages/latest-rules.js b/src/pages/latest-rules.js index 209f095ac..64c26d0ca 100644 --- a/src/pages/latest-rules.js +++ b/src/pages/latest-rules.js @@ -1,13 +1,13 @@ -import Filter, { FilterOptions } from '../components/filter/filter'; import React, { useEffect, useState } from 'react'; +import Filter, { FilterOptions } from '../components/filter/filter'; -import LatestRulesContent from '../components/latest-rules-content/latestRulesContent'; -import Breadcrumb from '../components/breadcrumb/breadcrumb'; -import SideBar from '../components/side-bar/side-bar'; -import SearchBar from '../components/search-bar/search-bar'; import { graphql } from 'gatsby'; import { objectOf } from 'prop-types'; import qs from 'query-string'; +import Breadcrumb from '../components/breadcrumb/breadcrumb'; +import LatestRulesContent from '../components/latest-rules-content/latestRulesContent'; +import SearchBar from '../components/search-bar/search-bar'; +import SideBar from '../components/side-bar/side-bar'; import { sanitizeName } from '../helpers/sanitizeName'; const LatestRules = ({ data, location }) => { @@ -18,7 +18,7 @@ const LatestRules = ({ data, location }) => { const filterTitle = 'Results'; const history = data.allHistoryJson.edges; - const rules = data.allMarkdownRemark.nodes; + const rules = data.allMdx.nodes; const userRules = data.allCommitsJson.edges; const queryStringSearch = qs.parse(location?.search, { @@ -176,7 +176,7 @@ export const pageQuery = graphql` } } } - allMarkdownRemark(filter: { frontmatter: { type: { eq: "rule" } } }) { + allMdx(filter: { frontmatter: { type: { eq: "rule" } } }) { nodes { frontmatter { title diff --git a/src/pages/orphaned.js b/src/pages/orphaned.js index 5e1c10079..6d9068cf5 100644 --- a/src/pages/orphaned.js +++ b/src/pages/orphaned.js @@ -1,24 +1,23 @@ -import React, { useRef, useState, useEffect } from 'react'; -import { useStaticQuery, graphql } from 'gatsby'; -import PropTypes from 'prop-types'; import { config } from '@fortawesome/fontawesome-svg-core'; -import Breadcrumb from '../components/breadcrumb/breadcrumb'; -import Tooltip from '../components/tooltip/tooltip'; -import RadioButton from '../components/radio-button/radio-button'; -import { Link } from 'gatsby'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { ApplicationInsights } from '@microsoft/applicationinsights-web'; import { faGithub } from '@fortawesome/free-brands-svg-icons'; import { faArrowCircleRight, - faPencilAlt, + faBook, faExclamationTriangle, - faQuoteLeft, faFileLines, - faBook, + faPencilAlt, + faQuoteLeft, } from '@fortawesome/free-solid-svg-icons'; -import Bookmark from '../components/bookmark/bookmark'; +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import { ApplicationInsights } from '@microsoft/applicationinsights-web'; +import { graphql, Link, useStaticQuery } from 'gatsby'; +import PropTypes from 'prop-types'; +import React, { useEffect, useRef, useState } from 'react'; import { pathPrefix } from '../../site-config'; +import Bookmark from '../components/bookmark/bookmark'; +import Breadcrumb from '../components/breadcrumb/breadcrumb'; +import RadioButton from '../components/radio-button/radio-button'; +import Tooltip from '../components/tooltip/tooltip'; config.autoAddCss = false; @@ -275,7 +274,7 @@ Orphaned.propTypes = { function OrphanedWithQuery(props) { const data = useStaticQuery(graphql` query OrphanedQuery { - main: allMarkdownRemark( + main: allMdx( filter: { fileAbsolutePath: { regex: "/(categories)/" } frontmatter: { type: { eq: "main" } } @@ -295,7 +294,7 @@ function OrphanedWithQuery(props) { } } } - topCategories: allMarkdownRemark( + topCategories: allMdx( filter: { fileAbsolutePath: { regex: "/(categories)/" } frontmatter: { type: { eq: "top-category" } } @@ -316,7 +315,7 @@ function OrphanedWithQuery(props) { } } } - categories: allMarkdownRemark( + categories: allMdx( filter: { fileAbsolutePath: { regex: "/(categories)/" } frontmatter: { type: { eq: "category" } } @@ -338,9 +337,7 @@ function OrphanedWithQuery(props) { } } } - rules: allMarkdownRemark( - filter: { frontmatter: { type: { eq: "rule" } } } - ) { + rules: allMdx(filter: { frontmatter: { type: { eq: "rule" } } }) { nodes { frontmatter { uri diff --git a/src/pages/profile.js b/src/pages/profile.js index 30a4d670e..c9d396cb9 100644 --- a/src/pages/profile.js +++ b/src/pages/profile.js @@ -1,17 +1,17 @@ /* eslint-disable no-console */ -import React, { useEffect, useState } from 'react'; +import DisqusIcon from '-!svg-react-loader!../images/disqusIcon.svg'; +import GitHubIcon from '-!svg-react-loader!../images/github.svg'; +import { useAuth0 } from '@auth0/auth0-react'; +import { ApplicationInsights } from '@microsoft/applicationinsights-web'; +import { graphql, useStaticQuery } from 'gatsby'; import PropTypes from 'prop-types'; -import { useStaticQuery, graphql } from 'gatsby'; +import React, { useEffect, useState } from 'react'; import Breadcrumb from '../components/breadcrumb/breadcrumb'; import ProfileBadge from '../components/profile-badge/profile-badge'; import ProfileContent from '../components/profile-content/profile-content'; import ProfileFilterMenu from '../components/profile-filter-menu/profile-filter-menu'; -import GitHubIcon from '-!svg-react-loader!../images/github.svg'; -import DisqusIcon from '-!svg-react-loader!../images/disqusIcon.svg'; -import { useAuth0 } from '@auth0/auth0-react'; import { GetUser } from '../services/apiService'; import { useAuthService } from '../services/authService'; -import { ApplicationInsights } from '@microsoft/applicationinsights-web'; const appInsights = new ApplicationInsights({ config: { @@ -147,7 +147,7 @@ Profile.propTypes = { function ProfileWithQuery(props) { const data = useStaticQuery(graphql` query ProfilePageQuery { - allMarkdownRemark(filter: { frontmatter: { type: { eq: "rule" } } }) { + allMdx(filter: { frontmatter: { type: { eq: "rule" } } }) { nodes { excerpt(format: HTML, pruneLength: 500) frontmatter { diff --git a/src/pages/search.js b/src/pages/search.js index a4d421c04..ed4736288 100644 --- a/src/pages/search.js +++ b/src/pages/search.js @@ -1,12 +1,12 @@ -import Filter, { FilterOptions } from '../components/filter/filter'; import React, { useEffect, useState } from 'react'; +import Filter, { FilterOptions } from '../components/filter/filter'; -import LatestRulesContent from '../components/latest-rules-content/latestRulesContent'; -import Breadcrumb from '../components/breadcrumb/breadcrumb'; -import SideBar from '../components/side-bar/side-bar'; -import SearchBar from '../components/search-bar/search-bar'; import { graphql } from 'gatsby'; import { objectOf } from 'prop-types'; +import Breadcrumb from '../components/breadcrumb/breadcrumb'; +import LatestRulesContent from '../components/latest-rules-content/latestRulesContent'; +import SearchBar from '../components/search-bar/search-bar'; +import SideBar from '../components/side-bar/side-bar'; import { sanitizeName } from '../helpers/sanitizeName'; const SearchRules = ({ data, location }) => { @@ -144,7 +144,7 @@ export const pageQuery = graphql` } } } - allMarkdownRemark(filter: { frontmatter: { type: { eq: "rule" } } }) { + allMdx(filter: { frontmatter: { type: { eq: "rule" } } }) { nodes { frontmatter { title diff --git a/src/pages/user/index.js b/src/pages/user/index.js index 832012688..bf774840b 100644 --- a/src/pages/user/index.js +++ b/src/pages/user/index.js @@ -1,13 +1,13 @@ import React, { useEffect, useState } from 'react'; -import LatestRulesContent from '@/components/latest-rules-content/latestRulesContent'; import Breadcrumb from '@/components/breadcrumb/breadcrumb'; +import { FilterOptions } from '@/components/filter/filter'; +import LatestRulesContent from '@/components/latest-rules-content/latestRulesContent'; import SideBar from '@/components/side-bar/side-bar'; +import { ApplicationInsights } from '@microsoft/applicationinsights-web'; import { graphql } from 'gatsby'; import { objectOf } from 'prop-types'; import qs from 'query-string'; -import { FilterOptions } from '@/components/filter/filter'; -import { ApplicationInsights } from '@microsoft/applicationinsights-web'; const appInsights = new ApplicationInsights({ config: { instrumentationKey: process.env.APPINSIGHTS_INSTRUMENTATIONKEY, @@ -36,7 +36,7 @@ const UserRules = ({ data, location }) => { const [showProfileLink, setShowProfileLink] = useState(false); const filterTitle = 'Results'; - const rules = data.allMarkdownRemark.nodes; + const rules = data.allMdx.nodes; // eslint-disable-next-line no-undef const uniqueRuleTitles = new Set(); @@ -358,7 +358,7 @@ const UserRules = ({ data, location }) => { export const pageQuery = graphql` query latestRulesQuery { - allMarkdownRemark(filter: { frontmatter: { type: { eq: "rule" } } }) { + allMdx(filter: { frontmatter: { type: { eq: "rule" } } }) { nodes { frontmatter { title diff --git a/src/templates/category.js b/src/templates/category.js index d48d5fff3..4a8589019 100644 --- a/src/templates/category.js +++ b/src/templates/category.js @@ -1,25 +1,25 @@ -import React, { useRef, useState, useEffect } from 'react'; -import { graphql, Link } from 'gatsby'; -import PropTypes from 'prop-types'; -import MD from 'gatsby-custom-md'; -import GreyBox from '../components/greybox/greybox'; -import Breadcrumb from '../components/breadcrumb/breadcrumb'; -import RadioButton from '../components/radio-button/radio-button'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { faGithub } from '@fortawesome/free-brands-svg-icons'; -import Bookmark from '../components/bookmark/bookmark'; -import Tooltip from '../components/tooltip/tooltip'; -import { ApplicationInsights } from '@microsoft/applicationinsights-web'; import { faArrowCircleRight, - faPencilAlt, + faBook, faExclamationTriangle, - faQuoteLeft, faFileLines, - faBook, + faPencilAlt, + faQuoteLeft, } from '@fortawesome/free-solid-svg-icons'; -import { pathPrefix } from '../../site-config'; +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import { ApplicationInsights } from '@microsoft/applicationinsights-web'; +import { graphql, Link } from 'gatsby'; +import MD from 'gatsby-custom-md'; import markdownIt from 'markdown-it'; +import PropTypes from 'prop-types'; +import React, { useEffect, useRef, useState } from 'react'; +import { pathPrefix } from '../../site-config'; +import Bookmark from '../components/bookmark/bookmark'; +import Breadcrumb from '../components/breadcrumb/breadcrumb'; +import GreyBox from '../components/greybox/greybox'; +import RadioButton from '../components/radio-button/radio-button'; +import Tooltip from '../components/tooltip/tooltip'; const appInsights = new ApplicationInsights({ config: { @@ -360,7 +360,7 @@ export const query = graphql` } } } - rule: allMarkdownRemark(filter: { frontmatter: { uri: { in: $index } } }) { + rule: allMdx(filter: { frontmatter: { uri: { in: $index } } }) { nodes { excerpt(format: HTML, pruneLength: 500) frontmatter { diff --git a/src/templates/rule.js b/src/templates/rule.js index 997cc94b3..584f6ed52 100644 --- a/src/templates/rule.js +++ b/src/templates/rule.js @@ -1,32 +1,32 @@ +import { graphql } from 'gatsby'; import { GetGithubOrganisationName, GetOrganisations, GetSecretContent, } from '../services/apiService'; -import { graphql } from 'gatsby'; /* eslint-disable jsx-a11y/anchor-has-content */ -import React, { useLayoutEffect, useState } from 'react'; import { faExclamationTriangle, faPencilAlt, } from '@fortawesome/free-solid-svg-icons'; -import { pathPrefix } from '../../site-config.js'; import markdownIt from 'markdown-it'; +import React, { useLayoutEffect, useState } from 'react'; +import { pathPrefix } from '../../site-config.js'; +import { useAuth0 } from '@auth0/auth0-react'; +import { faGithub } from '@fortawesome/free-brands-svg-icons'; +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { ApplicationInsights } from '@microsoft/applicationinsights-web'; +import { format } from 'date-fns'; +import formatDistance from 'date-fns/formatDistance'; +import PropTypes from 'prop-types'; +import ReactDOMServer from 'react-dom/server'; import Bookmark from '../components/bookmark/bookmark'; import Breadcrumb from '../components/breadcrumb/breadcrumb'; import Comments from '../components/comments/comments'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import PropTypes from 'prop-types'; -import ReactDOMServer from 'react-dom/server'; import Reaction from '../components/reaction/reaction'; import RuleSideBar from '../components/rule-side-bar/rule-side-bar'; -import formatDistance from 'date-fns/formatDistance'; -import { format } from 'date-fns'; -import { useAuth0 } from '@auth0/auth0-react'; import { useAuthService } from '../services/authService'; -import { faGithub } from '@fortawesome/free-brands-svg-icons'; const appInsights = new ApplicationInsights({ config: { @@ -335,9 +335,7 @@ export const query = graphql` } } } - categories: allMarkdownRemark( - filter: { frontmatter: { index: { glob: $uri } } } - ) { + categories: allMdx(filter: { frontmatter: { index: { glob: $uri } } }) { nodes { frontmatter { title @@ -350,9 +348,7 @@ export const query = graphql` } } } - relatedRules: allMarkdownRemark( - filter: { frontmatter: { uri: { in: $related } } } - ) { + relatedRules: allMdx(filter: { frontmatter: { uri: { in: $related } } }) { nodes { frontmatter { title @@ -360,7 +356,7 @@ export const query = graphql` } } } - relatedRulesFromRedirects: allMarkdownRemark( + relatedRulesFromRedirects: allMdx( filter: { frontmatter: { redirects: { in: $related } } } ) { nodes { From 5ff464142fbdb687ff155d43cb152a96f3690fc9 Mon Sep 17 00:00:00 2001 From: Calinator444 Date: Thu, 10 Oct 2024 11:44:16 +1100 Subject: [PATCH 04/43] removed all html from graphql queries --- src/pages/archived.js | 3 --- src/pages/index.js | 3 --- src/pages/orphaned.js | 4 ---- src/templates/rule.js | 1 - 4 files changed, 11 deletions(-) diff --git a/src/pages/archived.js b/src/pages/archived.js index b903f73c3..abef272b7 100644 --- a/src/pages/archived.js +++ b/src/pages/archived.js @@ -171,7 +171,6 @@ function ArchivedWithQuery(props) { } ) { nodes { - html frontmatter { type title @@ -191,7 +190,6 @@ function ArchivedWithQuery(props) { } ) { nodes { - html frontmatter { type title @@ -212,7 +210,6 @@ function ArchivedWithQuery(props) { } ) { nodes { - html frontmatter { type title diff --git a/src/pages/index.js b/src/pages/index.js index de937c3ba..4a4fad7e1 100644 --- a/src/pages/index.js +++ b/src/pages/index.js @@ -118,7 +118,6 @@ function IndexWithQuery(props) { } ) { nodes { - html frontmatter { type title @@ -138,7 +137,6 @@ function IndexWithQuery(props) { } ) { nodes { - html frontmatter { type title @@ -159,7 +157,6 @@ function IndexWithQuery(props) { } ) { nodes { - html frontmatter { type title diff --git a/src/pages/orphaned.js b/src/pages/orphaned.js index 6d9068cf5..e08c5049c 100644 --- a/src/pages/orphaned.js +++ b/src/pages/orphaned.js @@ -281,7 +281,6 @@ function OrphanedWithQuery(props) { } ) { nodes { - html frontmatter { type title @@ -301,7 +300,6 @@ function OrphanedWithQuery(props) { } ) { nodes { - html frontmatter { type title @@ -322,7 +320,6 @@ function OrphanedWithQuery(props) { } ) { nodes { - html frontmatter { type title @@ -344,7 +341,6 @@ function OrphanedWithQuery(props) { archivedreason title } - html excerpt(format: HTML, pruneLength: 500) } } diff --git a/src/templates/rule.js b/src/templates/rule.js index 584f6ed52..1a4b8f073 100644 --- a/src/templates/rule.js +++ b/src/templates/rule.js @@ -313,7 +313,6 @@ export const query = graphql` fields { slug } - html frontmatter { uri title From 9693e29a3a05c3d7fd24b8a15fcbc6450c9b9063 Mon Sep 17 00:00:00 2001 From: Calinator444 Date: Fri, 11 Oct 2024 16:52:38 +1100 Subject: [PATCH 05/43] got gatsby mdx working --- gatsby-config.js | 268 +++---- gatsby-node.js | 32 +- plugins/gatsby-remark-my-plugin/index.js | 9 + plugins/gatsby-remark-my-plugin/package.json | 8 + src/helpers/wrapPageElement.js | 8 +- src/pages/404.js | 58 +- src/pages/archived.js | 484 ++++++------ src/pages/index.js | 362 ++++----- src/pages/latest-rules.js | 426 +++++------ src/pages/orphaned.js | 668 ++++++++-------- src/pages/profile.js | 346 ++++----- src/pages/search.js | 332 ++++---- src/pages/user/index.js | 766 +++++++++---------- src/templates/category.js | 694 ++++++++--------- src/templates/rule.js | 27 +- 15 files changed, 2233 insertions(+), 2255 deletions(-) create mode 100644 plugins/gatsby-remark-my-plugin/index.js create mode 100644 plugins/gatsby-remark-my-plugin/package.json diff --git a/gatsby-config.js b/gatsby-config.js index 0bb7e5acd..784b4e5be 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -56,17 +56,17 @@ module.exports = { patterns: ['categories/**/*', 'rules/**/*'], }, }, - { - resolve: 'gatsby-source-git', - options: { + // { + // resolve: 'gatsby-source-git', + // options: { name: 'categories', - remote: 'https://github.com/SSWConsulting/SSW.Rules.Content.git', - // Optionally supply a branch. If none supplied, you'll get the default branch. - branch: process.env.CONTENT_BRANCH, - // Tailor which files get imported eg. import the docs folder from a codebase. - patterns: ['assets/**'], - }, - }, + // remote: 'https://github.com/SSWConsulting/SSW.Rules.Content.git', + // // Optionally supply a branch. If none supplied, you'll get the default branch. + // branch: process.env.CONTENT_BRANCH, + // // Tailor which files get imported eg. import the docs folder from a codebase. + // patterns: ['assets/**'], + // }, + // }, { resolve: 'gatsby-source-filesystem', options: { @@ -94,132 +94,138 @@ module.exports = { resolve: 'gatsby-plugin-mdx', options: { extensions: ['.mdx', '.md'], - excerpt_separator: '', gatsbyRemarkPlugins: [ { - resolve: '@raae/gatsby-remark-oembed', - options: { - // usePrefix defaults to false - // usePrefix: true is the same as ["oembed"] - usePrefix: ['oembed', 'video'], - providers: { - // Important to exclude providers - // that adds js to the page. - // If you do not need them. - exclude: ['Reddit'], - }, - }, - }, - { - resolve: 'gatsby-remark-figure-caption', - options: { figureClassName: 'image' }, - }, - { - resolve: 'gatsby-remark-vscode', - options: { - colorTheme: 'Dark+ (default dark)', - injectStyles: true, - extensions: [], - extensionDataDirectory: path.resolve('extensions'), - logLevel: 'error', - }, - }, - { - resolve: 'gatsby-remark-figure-caption', - options: { figureClassName: 'image' }, + resolve: 'gatsby-remark-my-plugin', + options: {}, }, + // { + // resolve: '@raae/gatsby-remark-oembed', + // options: { + // // usePrefix defaults to false + // // usePrefix: true is the same as ["oembed"] + // usePrefix: ['oembed', 'video'], + // providers: { + // // Important to exclude providers + // // that adds js to the page. + // // If you do not need them. + // exclude: ['Reddit'], + // }, + // }, + // }, + // { + // resolve: 'gatsby-remark-figure-caption', + // options: { figureClassName: 'image' }, + // }, + // { + // resolve: 'gatsby-remark-vscode', + // options: { + // colorTheme: 'Dark+ (default dark)', + // injectStyles: true, + // extensions: [], + // extensionDataDirectory: path.resolve('extensions'), + // logLevel: 'error', + // }, + // }, + // { + // resolve: 'gatsby-remark-figure-caption', + // options: { figureClassName: 'image' }, + // }, // gatsby-remark-relative-images must // go before gatsby-remark-images - { - resolve: 'gatsby-remark-relative-images-v2', - }, - { - resolve: 'gatsby-remark-images', - options: { - // It's important to specify the maxWidth (in pixels) of - // the content container as this plugin uses this as the - // base for generating different widths of each image. - //linkImagesToOriginal: false, - maxWidth: 1024, - backgroundColor: 'transparent', - }, - }, - { - resolve: 'gatsby-remark-autolink-headers', - options: { - offsetY: '100', - icon: '', - maintainCase: false, - removeAccents: true, - isIconAfterHeader: true, - elements: ['h2', 'h3', 'h4'], - }, - }, - { - resolve: 'gatsby-remark-copy-linked-files', - options: { - ignoreFileExtensions: [], - }, - }, - 'gatsby-remark-fenced-divs', - { - resolve: 'gatsby-remark-custom-blocks', - options: { - blocks: { - imgBadge: { - classes: 'img-badge', - }, - imgBanner: { - classes: 'img-banner', - }, - imgLg: { - classes: 'img-large', - }, - imgMd: { - classes: 'img-medium', - }, - imgSm: { - classes: 'img-small', - }, - goodExample: { - classes: 'good-example', - title: 'optional', - }, - badExample: { - classes: 'bad-example', - title: 'optional', - }, - oKExample: { - classes: 'ok-example', - title: 'optional', - }, - greyBox: { - classes: 'greybox', - title: 'optional', - }, - noBorder: { - classes: 'no-border', - title: 'optional', - }, - }, - }, - }, - { - resolve: 'gatsby-remark-embed-video', - options: { - related: false, //Optional: Will remove related videos from the end of an embedded YouTube video. - noIframeBorder: true, //Optional: Disable insertion of