mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-13 17:17:28 +02:00
feat(v2): headings anchors (#1385)
* feat(v2): headings anchors * misc: make hash link appear on hover * misc: convert to rem
This commit is contained in:
parent
82ded54b1a
commit
93894e7bdc
4 changed files with 93 additions and 1 deletions
|
@ -9,10 +9,11 @@ const mdx = require('@mdx-js/mdx');
|
|||
const rehypePrism = require('@mapbox/rehype-prism');
|
||||
const emoji = require('remark-emoji');
|
||||
const slug = require('rehype-slug');
|
||||
const linkHeadings = require('./linkHeadings');
|
||||
const rightToc = require('./rightToc');
|
||||
|
||||
const DEFAULT_OPTIONS = {
|
||||
rehypePlugins: [[rehypePrism, {ignoreMissing: true}], slug],
|
||||
rehypePlugins: [[rehypePrism, {ignoreMissing: true}], slug, linkHeadings],
|
||||
remarkPlugins: [emoji, rightToc],
|
||||
prismTheme: 'prism-themes/themes/prism-atom-dark.css',
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue