Skip to content

Commit

Permalink
fix (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
infwinston authored Nov 15, 2023
1 parent 4e38b32 commit a530d1f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
5 changes: 2 additions & 3 deletions src/pages/_document.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@ export default function Document() {
return (
<Html lang="en">
<Head>
<link rel="stylesheet" href="/fonts/load.css" />
<script src="/mathjax.js" async></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.2.0/es5/tex-mml-chtml.min.js" async></script>
<script src="/mathjax.js" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.2.0/es5/tex-mml-chtml.min.js" defer></script>
</Head>
<body>
<Main />
Expand Down
8 changes: 0 additions & 8 deletions src/pages/blog/[slug].js
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,8 @@ import md from "markdown-it";
import mdgh from "markdown-it-github-headings";
import Tags from "../../components/Tags";
import dateFormat from "dateformat";
import React, { useEffect } from 'react';

export default function Post({ frontmatter, content, slug }) {
useEffect(() => {
// Check if MathJax object is available
if (window.MathJax) {
// Typeset / reprocess the math content
window.MathJax.typesetPromise();
}
}, [content]);
return (
<div className="w-full flex justify-center py-5 pt-16 md:pt-5">
<Tags
Expand Down

0 comments on commit a530d1f

Please sign in to comment.