sana137.in

Sana's gatsbyjs-based blog
git clone http://git.hanabi.in/repos/sana137.in.git
Log | Files | Refs | README | LICENSE

commit 326e061f123a3fe65ce83ad688c3ff4b300c8b4e
parent 11ce8294ccd2a0e599a308be8479c1a725957ca9
Author: Agastya Chandrakant <me@hanabi.in>
Date:   Fri, 13 Dec 2019 02:03:58 +0530

Add KaTeX support

Diffstat:
Mgatsby-config.js | 6++++++
Mpackage.json | 2++
Msrc/templates/blogPost.js | 1+
3 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/gatsby-config.js b/gatsby-config.js @@ -16,6 +16,12 @@ module.exports = { options: { plugins: [ { + resolve: `gatsby-remark-katex`, + options: { + strict: `ignore`, + }, + }, + { resolve: `gatsby-remark-prismjs`, options: { inlineCodeMarker: 'λ', diff --git a/package.json b/package.json @@ -11,10 +11,12 @@ "gatsby-plugin-offline": "^2.2.7", "gatsby-plugin-react-helmet": "^3.1.4", "gatsby-plugin-sharp": "^2.2.13", + "gatsby-remark-katex": "^3.1.20", "gatsby-remark-prismjs": "^3.3.13", "gatsby-source-filesystem": "^2.1.11", "gatsby-transformer-remark": "^2.6.19", "gatsby-transformer-sharp": "^2.2.7", + "katex": "^0.11.1", "moment": "^2.24.0", "prismjs": "^1.17.1", "prop-types": "^15.7.2", diff --git a/src/templates/blogPost.js b/src/templates/blogPost.js @@ -3,6 +3,7 @@ import { graphql, Link } from 'gatsby'; import Footer from '../components/footer'; import TinyHeader from '../components/tinyHeader'; import moment from 'moment'; +import 'katex/dist/katex.min.css'; class BlogPostTemplate extends React.Component { componentDidMount() {