diff --git a/gridsome.config.js b/gridsome.config.js index 3db6300..c017a78 100644 --- a/gridsome.config.js +++ b/gridsome.config.js @@ -82,7 +82,8 @@ module.exports = { transformers: { remark: { plugins: [ - ['@gridsome/remark-prismjs', { transformInlineCode: false }] + ['@gridsome/remark-prismjs', { transformInlineCode: false }], + 'gridsome-remark-katex', ], slug: false } diff --git a/package.json b/package.json index a3ef579..0b99be5 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "gridsome": "^0.7.0", "gridsome-plugin-robots": "^0.2.1", "gridsome-plugin-tailwindcss": "^2.2.43", + "gridsome-remark-katex": "^0.1.1", "lodash": "^4.17.15", "moment": "^2.24.0", "prism-themes": "^1.4.0", diff --git a/src/main.js b/src/main.js index 100b6ab..d1f25b4 100644 --- a/src/main.js +++ b/src/main.js @@ -7,6 +7,7 @@ import generateSchemaPlugin from '~/plugins/generate-schema' import timeToReadPlugin from '~/plugins/timeToRead' import font from './font' +// import 'katex/dist/katex.min.css' import 'prism-themes/themes/prism-vsc-dark-plus.css' import './main.css' diff --git a/yarn.lock b/yarn.lock index 9f4ee69..4594654 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2544,7 +2544,7 @@ commander@2.17.x: resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf" integrity sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg== -commander@^2.15.1, commander@^2.20.0, commander@^2.20.3: +commander@^2.15.1, commander@^2.19.0, commander@^2.20.0, commander@^2.20.3: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== @@ -4546,6 +4546,15 @@ gridsome-plugin-tailwindcss@^2.2.43: postcss-preset-env "^6.7.0" tailwindcss ">=1.4" +gridsome-remark-katex@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/gridsome-remark-katex/-/gridsome-remark-katex-0.1.1.tgz#cd619a7856e8b86d9ad23ab15985aece81582c88" + integrity sha512-AVHkWi7+1/hG9JkxntpXuvhscOtt3WUY16BsyXGA/KNEpoXqs23BkQPzb1Tj7I11z6h3+hKLuENVEjetqt+ziA== + dependencies: + katex "^0.11.0" + remark-math "^1.0.6" + unist-util-visit "^2.0.0" + gridsome@^0.7.0: version "0.7.15" resolved "https://registry.yarnpkg.com/gridsome/-/gridsome-0.7.15.tgz#ea08347ff26da49a846a95ff6e545d3fabbcd508" @@ -5726,6 +5735,13 @@ jsprim@^1.2.2: json-schema "0.2.3" verror "1.10.0" +katex@^0.11.0: + version "0.11.1" + resolved "https://registry.yarnpkg.com/katex/-/katex-0.11.1.tgz#df30ca40c565c9df01a466a00d53e079e84ffaa2" + integrity sha512-5oANDICCTX0NqYIyAiFCCwjQ7ERu3DQG2JFHLbYOf+fXaMoH8eg/zOq5WSYJsKMi/QebW+Eh3gSM+oss1H/bww== + dependencies: + commander "^2.19.0" + keyv@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.0.0.tgz#44923ba39e68b12a7cec7df6c3268c031f2ef373" @@ -8395,6 +8411,13 @@ remark-html@^8.0.0: mdast-util-to-hast "^3.0.0" xtend "^4.0.1" +remark-math@^1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/remark-math/-/remark-math-1.0.6.tgz#49eb3dd15d298734c9ae21673115389793af4d1b" + integrity sha512-I43wU/QOQpXvVFXKjA4FHp5xptK65+5F6yolm8+69/JV0EqSOB64wURUZ3JK50JtnTL8FvwLiH2PZ+fvsBxviA== + dependencies: + trim-trailing-lines "^1.1.0" + remark-parse@^6.0.0: version "6.0.3" resolved "https://registry.yarnpkg.com/remark-parse/-/remark-parse-6.0.3.tgz#c99131052809da482108413f87b0ee7f52180a3a" @@ -9658,6 +9681,11 @@ trim-trailing-lines@^1.0.0: resolved "https://registry.yarnpkg.com/trim-trailing-lines/-/trim-trailing-lines-1.1.3.tgz#7f0739881ff76657b7776e10874128004b625a94" integrity sha512-4ku0mmjXifQcTVfYDfR5lpgV7zVqPg6zV9rdZmwOPqq0+Zq19xDqEgagqVbc4pOOShbncuAOIs59R3+3gcF3ZA== +trim-trailing-lines@^1.1.0: + version "1.1.4" + resolved "https://registry.yarnpkg.com/trim-trailing-lines/-/trim-trailing-lines-1.1.4.tgz#bd4abbec7cc880462f10b2c8b5ce1d8d1ec7c2c0" + integrity sha512-rjUWSqnfTNrjbB9NQWfPMH/xRK1deHeGsHoVfpxJ++XeYXE0d6B1En37AHfw3jtfTU7dzMzZL2jjpe8Qb5gLIQ== + trim@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/trim/-/trim-0.0.1.tgz#5858547f6b290757ee95cccc666fb50084c460dd" @@ -9912,6 +9940,15 @@ unist-util-visit@^1.0.0, unist-util-visit@^1.0.1, unist-util-visit@^1.1.0, unist dependencies: unist-util-visit-parents "^2.0.0" +unist-util-visit@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-2.0.3.tgz#c3703893146df47203bb8a9795af47d7b971208c" + integrity sha512-iJ4/RczbJMkD0712mGktuGpm/U4By4FfDonL7N/9tATGIF4imikjOuagyMY53tnZq3NP6BcmlrHhEKAfGWjh7Q== + dependencies: + "@types/unist" "^2.0.0" + unist-util-is "^4.0.0" + unist-util-visit-parents "^3.0.0" + unist-util-visit@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-2.0.2.tgz#3843782a517de3d2357b4c193b24af2d9366afb7"