pomber / docusaurus-mdx-2 Goto Github PK
View Code? Open in Web Editor NEWA Docusaurus theme to add support for MDX v2
Home Page: docusaurus-mdx-2.vercel.app
A Docusaurus theme to add support for MDX v2
Home Page: docusaurus-mdx-2.vercel.app
For example:
## h2 1
<div>
## h2 2
### h3
</div>
TOC only shows "h2 1"
I have noticed that once activating the theme, the extension I have done through wrapping MDXComponents is not picked up anymore.
That is, the example in the original documentation of docusaurus that shows how to extend the component scope via MDXComponent.js
is not working correctly anymore.
import React from 'react';
// Import the original mapper
import MDXComponents from '@theme-original/MDXComponents';
import Highlight from '@site/src/components/Highlight';
export default {
// Re-use the default mapping
...MDXComponents,
// Map the "highlight" tag to our <Highlight /> component!
// `Highlight` will receive all props that were passed to `highlight` in MDX
highlight: Highlight,
};
I want to use the katex and math remark plugins for parsing formulas, but I am getting errors:
Could not parse expression with acorn: Unexpected character '@'
It seems this happens to other remark plugins as well, such as the admonitions plugin (as specified in this repo's readme). I'd also like to use the directives plugin for simpler syntax, but am running into the same issue.
Is there any workaround for this, so I can still use Code Hike and these plugins?
Thanks
When I change Shiki syntax highlighting themes, the syntax highlighting colors will change, but the codeblock background remains the same dark color. I suppose this can be changed with CSS, but It would be nice to have the background change with the theme rather than adding custom CSS.
If I change a scrollycode block to add code, the output will not show correctly. Often the codeblock output breaks or will not display the correct code.
In the following example, I would like to use this feature to introduce each command as a new line of code added to the Scrollycode block output:
<CH.Scrollycoding>
1. Make a new directory.
```sh focus=1:2
mkdir my-app
cd my-app
```
---
2. Set 'stable' as the default release channel.
```sh focus=4
mkdir my-app
cd my-app
rustup default stable
```
---
3. Add WASM as the compilation target.
```sh focus=6
mkdir my-app
cd my-app
rustup default stable
rustup target add wasm32-unknown-unknown
```
---
4. Install the following packages to generate the contract.
```sh focus=8:9
mkdir my-app
cd my-app
rustup default stable
rustup target add wasm32-unknown-unknown
cargo install cargo-generate --features vendored-openssl
cargo install cargo-run-script
```
</CH.Scrollycoding>
This occurs when testing locally with npm run start
using Safari or Chrome browser.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.