Add docusaurus plugins for markdown math input
This commit is contained in:
@@ -4,6 +4,9 @@
|
||||
const lightCodeTheme = require('prism-react-renderer/themes/github');
|
||||
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
|
||||
|
||||
const math = require('remark-math');
|
||||
const katex = require('rehype-katex');
|
||||
|
||||
/** @type {import('@docusaurus/types').Config} */
|
||||
const config = {
|
||||
title: 'Mathematik, Informatik und Programmierung',
|
||||
@@ -35,6 +38,8 @@ const config = {
|
||||
// docs: false,
|
||||
docs: {
|
||||
sidebarPath: require.resolve('./sidebars.js'),
|
||||
remarkPlugins: [math],
|
||||
rehypePlugins: [katex],
|
||||
// // Please change this to your repo.
|
||||
// // Remove this to remove the "edit this page" links.
|
||||
// // editUrl:
|
||||
@@ -150,6 +155,16 @@ const config = {
|
||||
darkTheme: darkCodeTheme,
|
||||
},
|
||||
}),
|
||||
|
||||
stylesheets: [
|
||||
{
|
||||
href: 'https://cdn.jsdelivr.net/npm/katex@0.13.24/dist/katex.min.css',
|
||||
type: 'text/css',
|
||||
integrity:
|
||||
'sha384-odtC+0UGzzFL/6PNoE8rX/SPcQDXBJ+uRepguP4QkPCm2LBxH3FA3y+fKSiJ+AmM',
|
||||
crossorigin: 'anonymous',
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
module.exports = config;
|
||||
|
||||
Reference in New Issue
Block a user