Skip to content

How to simply import and use custom global components in mdx? #1500

Closed Answered by SoonIter
ayangweb asked this question in Q&A
Discussion options

You must be logged in to vote

这个问题是把
全局UI组件和 mdx 自定义组件混淆了
你这篇文档说的是每个页面都会有的组件,比如 ScrollToTop

mdx的配置里有一个globalUIComponent,声明后是可以在mdx中直接使用

https://rspress.dev/zh/api/config/config-build#markdownglobalcomponents

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@SoonIter
Comment options

Answer selected by Timeless0911
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants