diff --git a/gatsby-config.js b/gatsby-config.js index d7349279..2c0964e1 100644 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -34,7 +34,34 @@ module.exports = { wrapperStyle: `left:0; width: 100%;`, }, }, - "gatsby-remark-prismjs", + { + resolve: "gatsby-remark-prismjs", + options: { + additionalStyles: { + ".gatsby-highlight": { + fontSize: "50px", // Set the desired font size + }, + }, + // Customize Prism options here + classPrefix: "language-", // Prefix for CSS classes added to code blocks + inlineCodeMarker: "`", // Marker for inline code snippets + showLineNumbers: true, // Whether to show line numbers + languageExtensions: [ + { + language: "superscript", + extend: "javascript", + definition: { + superscript_types: /(SuperType)/, + }, + insertBefore: { + function: { + superscript_keywords: /(superif|superelse)/, + }, + }, + }, + ], + }, + }, "gatsby-remark-copy-linked-files", "gatsby-remark-autolink-headers", ], diff --git a/package.json b/package.json index b46c7a63..4eea0b34 100644 --- a/package.json +++ b/package.json @@ -98,4 +98,4 @@ "remark-preset-lint-recommended" ] } -} +} \ No newline at end of file diff --git a/src/components/modules/ModuleCard.jsx b/src/components/modules/ModuleCard.jsx index 09142c43..90a57414 100644 --- a/src/components/modules/ModuleCard.jsx +++ b/src/components/modules/ModuleCard.jsx @@ -10,6 +10,7 @@ import { } from "reactstrap"; import { GatsbyImage, getImage } from "gatsby-plugin-image"; import Tags from "../common/Tags"; +import "prismjs/themes/prism.css"; function ModuleCard({ title, cover, tags, description, url }) { return ( diff --git a/src/templates/Blog.jsx b/src/templates/Blog.jsx index 07d03dd0..c259f6cc 100644 --- a/src/templates/Blog.jsx +++ b/src/templates/Blog.jsx @@ -22,6 +22,12 @@ export default class Blog extends React.Component { const { date } = postNode.fields; return ( +