-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgatsby-config.js
98 lines (97 loc) · 2.63 KB
/
gatsby-config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
const _ = require("lodash")
module.exports = {
pathPrefix: "/course-notes",
siteMetadata: {
title: ``,
description: ``,
author: `@mattfeng`,
siteUrl: `https://mattfeng.tech/course-notes`,
},
plugins: [
`gatsby-plugin-sass`,
`gatsby-plugin-react-helmet`,
`gatsby-plugin-image`,
`gatsby-remark-images`,
`gatsby-transformer-sharp`,
`gatsby-plugin-sharp`,
{
resolve: `gatsby-source-filesystem`,
options: {
name: `images`,
path: `${__dirname}/src/images`,
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
name: `content`,
path: `${__dirname}/src/content`,
},
},
{
resolve: `gatsby-plugin-mdx`,
options: {
gatsbyRemarkPlugins: [
{
resolve: `gatsby-remark-images`,
options: {
maxWidth: 400,
showCaptions: true,
wrapperStyle: fluidResult =>
`flex:${_.round(fluidResult.aspectRatio, 2)};`,
},
},
`gatsby-remark-numbered-footnotes`,
`gatsby-remark-copy-linked-files`,
{
resolve: `gatsby-remark-highlight-code`,
options: {
theme: `solarized-light`,
},
},
],
remarkPlugins: [
[
require("remark-math"),
{
strict: `ignore`,
macros: {},
},
],
],
rehypePlugins: [
[
require(`rehype-katex`),
{
macros: {
// chemistry
"\\degC": "{^\\circ \\mathrm{C}}",
"\\veps": "\\varepsilon",
"\\to": "\\rightarrow",
"\\pI": "\\mathrm{pI}",
"\\pH": "\\mathrm{pH}",
"\\PH": "\\mathrm{pH}",
"\\PK": "\\mathrm{p}K_{#1}",
"\\ang": "\\pu{\\mathring{\\mathrm{A}}}",
// math
"\\P": "\\mathbb{P}(#1)",
"\\v": "\\mathbf{#1}",
"\\m": "\\mathbf{#1}",
"\\tr": "#1^\\intercal",
"\\hr": "#1^\\mathsf{H}",
"\\Q": "\\mathbb{Q}",
"\\Z": "\\mathbb{Z}",
"\\C": "\\mathbb{C}",
"\\L": "\\mathcal{L}",
"\\ip": "\\lang \\v{#1}, \\v{#2}\\rang",
"\\dot": "\\v{#1} \\cdot \\v{#2}",
"\\overbar":
"\\mkern 1.5mu\\overline{\\mkern-1.5mu#1\\mkern-1.5mu}\\mkern 1.5mu",
},
},
],
],
},
},
],
}