Skip to content

Commit

Permalink
feat: add mathjax support
Browse files Browse the repository at this point in the history
  • Loading branch information
Darkflame72 committed Mar 29, 2024
1 parent 804eaa3 commit 1f5d964
Show file tree
Hide file tree
Showing 3 changed files with 435 additions and 8 deletions.
6 changes: 6 additions & 0 deletions astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import starlight from '@astrojs/starlight';
import tailwind from '@astrojs/tailwind';
import { defineConfig } from 'astro/config';
import starlightLinksValidator from 'starlight-links-validator'
import remarkMath from 'remark-math';
import rehypeMathjax from 'rehype-mathjax';
export const locales = {
root: {
label: 'English',
Expand Down Expand Up @@ -127,6 +129,10 @@ export default defineConfig({
// Disable the default base styles:
applyBaseStyles: false
}),],
markdown: {
remarkPlugins: [remarkMath],
rehypePlugins: [rehypeMathjax],
},
image: {
service: {
entrypoint: 'astro/assets/services/sharp'
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
"@astrojs/starlight-tailwind": "^2.0.1",
"@astrojs/tailwind": "^5.1.0",
"astro": "^4.0.8",
"rehype-mathjax": "^6.0.0",
"remark-math": "^6.0.0",
"sharp": "^0.33.1",
"starlight-links-validator": "^0.6.0",
"tailwindcss": "^3.4.0"
Expand Down
Loading

0 comments on commit 1f5d964

Please sign in to comment.