Skip to content

Commit 7434d2f

Browse files
committed
feat: 🎸 Gatsby MDX support, code block highlight, dark mode
1 parent 2de5543 commit 7434d2f

23 files changed

+22676
-12005
lines changed

‎blog/another-blog.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: "Another Post"
3+
queryId: "another-post"
4+
date: "2021-07-24"
5+
description: "Another blog test test test"
6+
---
7+
8+
Here's another post! It's even better than the first one!

‎blog/my-first-blog.mdx

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
title: "My First Post"
3+
queryId: "my-first-post"
4+
date: "2021-07-23"
5+
description: "This is my first blog post!"
6+
---
7+
8+
This is my first blog post! Isn't it *great*?
9+
10+
Some of my **favorite** things are:
11+
12+
- Petting dogs
13+
- Singing
14+
- Eating potato-based foods
15+
16+
17+
```javascript
18+
alert('how cool is this!');
19+
20+
print("abc")
21+
```

‎gatsby-browser.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
import "./src/styles/global.css"
2+
require("prismjs/themes/prism-solarizedlight.css")

‎gatsby-config.ts

Lines changed: 52 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,57 @@
1-
import type { GatsbyConfig } from "gatsby";
1+
import type {GatsbyConfig} from "gatsby";
22

33
const config: GatsbyConfig = {
4-
siteMetadata: {
5-
title: `PPX Gatsby Blog`,
6-
siteUrl: `https://www.yourdomain.tld`
7-
},
8-
// More easily incorporate content into your pages through automatic TypeScript type generation and better GraphQL IntelliSense.
9-
// If you use VSCode you can also use the GraphQL plugin
10-
// Learn more at: https://gatsby.dev/graphql-typegen
11-
graphqlTypegen: true,
12-
plugins: ["gatsby-plugin-postcss"]
4+
siteMetadata: {
5+
title: `PPX Blog`,
6+
siteUrl: `https://blog.ppxa.link`
7+
},
8+
// More easily incorporate content into your pages through automatic TypeScript type generation and better GraphQL IntelliSense.
9+
// If you use VSCode you can also use the GraphQL plugin
10+
// Learn more at: https://gatsby.dev/graphql-typegen
11+
graphqlTypegen: true,
12+
plugins: ["gatsby-plugin-postcss", "gatsby-plugin-dark-mode","gatsby-plugin-image", "gatsby-plugin-sharp",
13+
{
14+
resolve: `gatsby-plugin-alias-imports`,
15+
options: {
16+
alias: {
17+
"@src": "src",
18+
},
19+
extensions: [
20+
"js", "jsx", "ts", "tsx"
21+
],
22+
}
23+
},
24+
{
25+
resolve: "gatsby-source-filesystem",
26+
options: {
27+
name: `blog`,
28+
path: `${__dirname}/blog`,
29+
}
30+
},
31+
"gatsby-plugin-mdx",
32+
{
33+
resolve: `gatsby-transformer-remark`,
34+
options: {
35+
plugins: [
36+
{
37+
resolve: `gatsby-remark-images`,
38+
options: {
39+
maxWidth: 590,
40+
},
41+
},
42+
{
43+
resolve: `gatsby-remark-responsive-iframe`,
44+
options: {
45+
wrapperStyle: `margin-bottom: 1.0725rem`,
46+
},
47+
},
48+
`gatsby-remark-prismjs`,
49+
`gatsby-remark-copy-linked-files`,
50+
`gatsby-remark-smartypants`,
51+
],
52+
},
53+
},
54+
]
1355
};
1456

1557
export default config;

0 commit comments

Comments
 (0)