Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 9 additions & 15 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module.exports = {
plugins: [
{
resolve: "gatsby-plugin-sass",
sassOptions: { indentedSyntax: true },
options: { sassOptions: { indentedSyntax: true } },
},
{
resolve: "gatsby-source-filesystem",
Expand All @@ -22,7 +22,6 @@ module.exports = {
name: "images",
},
},
"react-copy-to-clipboard",
"gatsby-plugin-fontawesome-css",
"gatsby-plugin-image",
"gatsby-plugin-sharp",
Expand All @@ -31,18 +30,6 @@ module.exports = {
resolve: "gatsby-transformer-remark",
options: {
plugins: [
{
resolve: `gatsby-plugin-google-gtag`,
options: {
trackingIds: [
"G-SW2X6STFYY", // Google Analytics / GA
],
pluginConfig: {
// Puts tracking script in the head instead of the body
head: true
},
},
},
{
resolve: "gatsby-remark-autolink-headers",
options: {
Expand Down Expand Up @@ -91,6 +78,13 @@ module.exports = {
printRejected: true
},
}, // must be after other CSS plugins
"gatsby-adapter-netlify"
"gatsby-adapter-netlify",
{
resolve: "gatsby-plugin-google-gtag",
options: {
trackingIds: ["G-SW2X6STFYY"],
pluginConfig: { head: true },
},
},
],
};
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
command = "npm run build"
functions = "lambda"
[build.environment]
NODE_VERSION = "18"
NODE_VERSION = "20"
NPM_FLAGS = "--legacy-peer-deps"
YARN_VERSION = "1.22.4"
YARN_FLAGS = "--no-ignore-optional"
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"author": "M@TE team",
"dependencies": {
"@citation-js/plugin-csl": "^0.7.2",
"@citation-js/plugin-doi": "^0.7.2",
"@fortawesome/fontawesome-free": "^6.4.2",
"@fortawesome/fontawesome-svg-core": "^6.4.0",
"@fortawesome/free-solid-svg-icons": "^6.4.0",
Expand All @@ -15,7 +16,6 @@
"fast-xml-parser": "^4.4.0",
"gatsby": "^5.8.1",
"gatsby-adapter-netlify": "^1.1.3",
"gatsby-image": "^3.11.0",
"gatsby-plugin-fontawesome-css": "^1.2.0",
"gatsby-plugin-google-gtag": "^5.12.3",
"gatsby-plugin-image": "^3.8.0",
Expand All @@ -34,7 +34,6 @@
"js-search": "^2.0.1",
"lodash": "^4.17.21",
"lodash-webpack-plugin": "^0.11.6",
"node-sass": "^8.0.0",
"postcss": "^8.4.22",
"prop-types": "^15.8.1",
"react": "^18.2.0",
Expand All @@ -48,6 +47,7 @@
"react-tabs": "^6.0.2",
"rehype-mathjax": "^6.0.0",
"remark-math": "^6.0.0",
"sass": "^1.69.0",
"uuid": "^9.0.0"
},
"keywords": [
Expand All @@ -64,6 +64,6 @@
"test": "echo \"Error: no test specified\" && exit 1"
},
"devDependencies": {
"prettier": "^2.8.7"
"prettier": "^3.0.0"
}
}
11 changes: 6 additions & 5 deletions src/templates/model.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import Markdown from "react-markdown"
import remarkMath from "remark-math"
import rehypeMathjax from "rehype-mathjax/svg"

const rehypeMathjaxPlugins = rehypeMathjax ? [[rehypeMathjax, { svg: { scale: 1.0 } }]] : []

const ModelTemplate = ({
abstract,
Expand Down Expand Up @@ -163,7 +164,7 @@ const ModelTemplate = ({
<p className="cool-caption">
<Markdown
remarkPlugins={[remarkMath]}
rehypePlugins={[[rehypeMathjax, { svg: { scale: 1.0 } }]]}
rehypePlugins={rehypeMathjaxPlugins}
>
{animation.caption}
</Markdown>
Expand Down Expand Up @@ -217,7 +218,7 @@ const ModelTemplate = ({
<p className="cool-caption">
<Markdown
remarkPlugins={[remarkMath]}
rehypePlugins={[[rehypeMathjax, { svg: { scale: 1.0 } }]]}
rehypePlugins={rehypeMathjaxPlugins}
>
{graphic_abstract.caption}
</Markdown>
Expand Down Expand Up @@ -307,7 +308,7 @@ const ModelTemplate = ({
<p className="cool-caption">
<Markdown
remarkPlugins={[remarkMath]}
rehypePlugins={[[rehypeMathjax, { svg: { scale: 1.0 } }]]}
rehypePlugins={rehypeMathjaxPlugins}
>
{model_setup_info.summary && typeof model_setup_info.summary === 'string'
? `${model_setup.caption} ${model_setup_info.summary}`
Expand Down Expand Up @@ -368,7 +369,7 @@ const ModelTemplate = ({
<p className="cool-caption">
<Markdown
remarkPlugins={[remarkMath]}
rehypePlugins={[[rehypeMathjax, { svg: { scale: 1.0 } }]]}
rehypePlugins={rehypeMathjaxPlugins}
>
{model_files.notes}
</Markdown>
Expand All @@ -386,7 +387,7 @@ const ModelTemplate = ({
<p className="cool-caption">
<Markdown
remarkPlugins={[remarkMath]}
rehypePlugins={[[rehypeMathjax, { svg: { scale: 1.0 } }]]}
rehypePlugins={rehypeMathjaxPlugins}
>
{dataset.notes}
</Markdown>
Expand Down