Skip to content

Commit 28cd562

Browse files
aaditgupta21klane
andauthored
Enable math equations in website (#114)
- enable math equations - show lastupdate author - fix linting issue Co-authored-by: Kevin Lane <[email protected]>
1 parent c834cad commit 28cd562

File tree

4 files changed

+242
-1
lines changed

4 files changed

+242
-1
lines changed

website/docs/classic-time-series-models/autoregressive-model.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ slug: /autoregressive
44
---
55
Assume we are given a time series $$x_1,\cdots, x_t$$, P-th order autoregressive (AR (P)) models the output as a linear function of the input series
66

7-
$x_t = \sum_{i=1}^P a_i x_{t-i} + e_t$
7+
$x_t = \sum_{i=1}^P a_i x_{t-i} + e_t$
88

99
where $\{a_i]}$ are the coefficients. The series $\{e_t\}$ can represent either a controlled external input or noise.
1010

website/docusaurus.config.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
const lightCodeTheme = require("prism-react-renderer/themes/github");
22
const darkCodeTheme = require("prism-react-renderer/themes/dracula");
3+
const math = require("remark-math");
4+
const katex = require("rehype-katex");
35

46
/** @type {import('@docusaurus/types').DocusaurusConfig} */
57
module.exports = {
@@ -16,6 +18,12 @@ module.exports = {
1618
],
1719
stylesheets: [
1820
"https://fonts.googleapis.com/css?family=IBM+Plex+Mono:500,700|Source+Code+Pro:500,700|Source+Sans+Pro:400,400i,700",
21+
{
22+
href: "https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css",
23+
integrity:
24+
"sha384-Um5gpz1odJg5Z4HAmzPtgZKdTBHZdw8S29IecapCSB31ligYPhHQZMIlWLYQGVoc",
25+
crossorigin: "anonymous",
26+
},
1927
],
2028

2129
organizationName: "Rose-STL-Lab", // Usually your GitHub org/user name.
@@ -122,6 +130,10 @@ module.exports = {
122130
{
123131
docs: {
124132
sidebarPath: require.resolve("./sidebars.js"),
133+
remarkPlugins: [math],
134+
showLastUpdateAuthor: true,
135+
showLastUpdateTime: true,
136+
rehypePlugins: [katex],
125137
// Please change this to your repo.
126138
editUrl: "https://github.com/Rose-STL-Lab/torchTS/edit/main/website/",
127139
},

website/package-lock.json

Lines changed: 226 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

website/package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,12 @@
2121
"classnames": "^2.3.1",
2222
"clsx": "^1.1.1",
2323
"file-loader": "^6.2.0",
24+
"hast-util-is-element": "^1.1.0",
2425
"prism-react-renderer": "^1.2.1",
2526
"react": "^17.0.1",
2627
"react-dom": "^17.0.1",
28+
"rehype-katex": "^4.0.0",
29+
"remark-math": "^3.0.1",
2730
"remarkable": "^2.0.1",
2831
"url-loader": "^4.1.1"
2932
},

0 commit comments

Comments
 (0)