https://docusaurus.io/zh-CN/docs
https://github.com/cmfcmf/docusaurus-search-local
https://docusaurus.io/zh-CN/docs/markdown-features/react#importing-code-snippets
cnpm install --save @docusaurus/theme-live-codeblock
cnpm install --save raw-loader
// docusaurus.config.js
module.exports = {
// ...
themes: ['@docusaurus/theme-live-codeblock'],
// ...
};
use
import CodeBlock from '@theme/CodeBlock';
import mycode from '!!raw-loader!./mycode.go';// 下面必须空一行
<CodeBlock language="go">
{mycode}
</CodeBlock>
npm install --registry https://registry.npmmirror.com
https://tencent.github.io/cherry-markdown/examples/index.html