Skip to content

Commit

Permalink
Add Prismjs for syntax highlighting.
Browse files Browse the repository at this point in the history
  • Loading branch information
jgaehring committed May 5, 2021
1 parent 239b411 commit 6dd6f7c
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ module.exports = {
prefix: "/farmos/docs",
},
},
'gatsby-remark-autolink-headers',
'gatsby-remark-autolink-headers', // must precede prismjs!
'gatsby-remark-prismjs',
],
},
},
Expand Down
61 changes: 61 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@
"gatsby-plugin-react-helmet": "^4.4.0",
"gatsby-plugin-sharp": "^3.4.1",
"gatsby-remark-autolink-headers": "^4.1.0",
"gatsby-remark-prismjs": "^5.1.0",
"gatsby-source-filesystem": "^3.4.0",
"gatsby-source-git": "^1.1.0",
"gatsby-theme-material-ui": "^1.0.13",
"gatsby-transformer-remark": "^3.2.0",
"gatsby-transformer-sharp": "^3.4.0",
"prismjs": "^1.23.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"react-helmet": "^6.1.0"
Expand Down
1 change: 1 addition & 0 deletions src/templates/docs-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { graphql } from "gatsby"
import { ThemeProvider } from '@material-ui/styles'
import { makeStyles } from '@material-ui/core/styles'
import Typography from '@material-ui/core/Typography'
import 'prismjs/themes/prism.css'
import markdownStyles from './docs-markdown.css'
import Layout from "../components/layout"
import theme from '../theme'
Expand Down

0 comments on commit 6dd6f7c

Please sign in to comment.