Skip to content

Commit ca71a6a

Browse files
authored
Move code snippets to markdown (#93)
* Add prismjs for highlighting * Update post template for in-markdown code * Move code snippets from frontmatter to markdown * Update theme for code snippets replace prismjs with gatsby-remark-vscode * Update frontmatter fields set * Update code snippets theme * Update mdx language property
1 parent 49eb24c commit ca71a6a

33 files changed

+2633
-247
lines changed

gatsby-config.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
const path = require("path");
2+
13
module.exports = {
24
siteMetadata: {
35
title: "useHooks",
@@ -25,6 +27,15 @@ module.exports = {
2527
resolve: `gatsby-transformer-remark`,
2628
options: {
2729
plugins: [
30+
{
31+
resolve: `gatsby-remark-vscode`,
32+
options: {
33+
theme: `Tomorrow Night Eighties`, // From package.json: contributes.themes[0].label
34+
extensions: [
35+
`${__dirname}/ms-vscode.Theme-TomorrowKit-0.1.4.vsix`
36+
]
37+
}
38+
},
2839
{
2940
resolve: "gatsby-remark-external-links",
3041
options: {

gatsby-node.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ exports.createPages = ({ actions, graphql }) => {
3030
name
3131
description
3232
}
33-
code
34-
tsCode
33+
isMultilingual
3534
ogImage
3635
}
3736
}
59 KB
Binary file not shown.

0 commit comments

Comments
 (0)