mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-13 17:17:28 +02:00
feat(v2): support rightToc, emoji, slug for docs (#1382)
* add remark-slug and remark-emoji * implement right TOC remark plugin * use rehype-slug ecosystem instead of remark for perf * first rough implementation for right toc * nits * remove unwanted changes * fix left border styling * remove depths * inline snapshot
This commit is contained in:
parent
37897ffc96
commit
745f32b010
12 changed files with 570 additions and 53 deletions
|
@ -7,9 +7,13 @@
|
|||
const {getOptions} = require('loader-utils');
|
||||
const mdx = require('@mdx-js/mdx');
|
||||
const rehypePrism = require('@mapbox/rehype-prism');
|
||||
const emoji = require('remark-emoji');
|
||||
const slug = require('rehype-slug');
|
||||
const rightToc = require('./rightToc');
|
||||
|
||||
const DEFAULT_OPTIONS = {
|
||||
rehypePlugins: [[rehypePrism, {ignoreMissing: true}]],
|
||||
rehypePlugins: [slug, [(rehypePrism, {ignoreMissing: true})]],
|
||||
remarkPlugins: [emoji, rightToc],
|
||||
prismTheme: 'prism-themes/themes/prism-atom-dark.css',
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue