Skip to content

Commit

Permalink
Updated Katex to use linked stylesheet
Browse files Browse the repository at this point in the history
  • Loading branch information
Gravydigger committed Oct 17, 2024
1 parent 6c3ce71 commit f80f8e4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 6 additions & 1 deletion src/layouts/BlogPost.astro
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import type { CollectionEntry } from "astro:content";
import BlogHero from "@/components/blog/Hero.astro";
import TOC from "@/components/blog/TOC.astro";
import WebMentions from "@/components/blog/webmentions/index.astro";
import "@/katex"; // Katex css file
import BaseLayout from "./Base.astro";
Expand All @@ -30,6 +29,12 @@ const { headings } = await post.render();
<div
class="prose prose-sm prose-cactus mt-12 prose-headings:font-semibold prose-headings:text-accent-2 prose-headings:before:absolute prose-headings:before:-ms-4 prose-headings:before:text-accent sm:prose-headings:before:content-['#'] sm:prose-th:before:content-none"
>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/katex@0.16.11/dist/katex.min.css"
integrity="sha384-nB0miv6/jRmo5UMMR1wu3Gz6NLsoTkbqJghGIsx//Rlm+ZU03BU6SQNC66uf4l5+"
crossorigin="anonymous"
/>
<slot />
<WebMentions />
</div>
Expand Down
3 changes: 1 addition & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
"@/layouts/*": ["src/layouts/*"],
"@/utils": ["src/utils/index.ts"],
"@/types": ["src/types.ts"],
"@/site-config": ["src/site.config.ts"],
"@/katex": ["node_modules/.pnpm/rehype-katex@7.0.0/node_modules/katex/dist/katex.min.css"]
"@/site-config": ["src/site.config.ts"]
}
},
"include": ["./.eslintrc.cjs", "**/*"],
Expand Down

0 comments on commit f80f8e4

Please sign in to comment.