0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-23 21:53:55 -05:00
astro/packages
Ben Holmes 40ef43a59b
[MDX] Add getHeadings + generate anchor links (#4095)
* deps: mdx github-slugger

* feat: add getHeadings via rehype plugin

* chore: stray console.log

* test: getHeadings w/ & w/0 JSX expressions

* docs: add generated exports

* refactor: pass headings using vfile.data

* deps: vfile

* test: heading anchor IDs

* docs: add collect-headings to default rehype plugins

* chore: changeset

* deps: estree-util-value-to-estree

* refactor: inject getHeadings export the right way!

* deps: switch to acorn

* refactor: just use acorn

* docs: `getHeadings` info structuring

Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>

* docs: clarify `url` example

Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>

* fix: move slugger inside plugin call

* refactor: cleanup code reassignment

* chore: lint

* deps: mdast-util-mdx, test utils

* refactor: add jsToTreeNode util

* feat: expose utils for lib authors

* test: rehype plugins w/ and w/o extends

* test: fixture

* refactor: remove utils from package exports

Co-authored-by: Chris Swithinbank <swithinbank@gmail.com>
2022-08-01 17:23:56 -04:00
..
astro [ci] format 2022-08-01 16:16:51 +00:00
astro-prism [ci] release (#3939) 2022-07-18 21:54:25 -07:00
astro-rss [ci] release (#3939) 2022-07-18 21:54:25 -07:00
create-astro [ci] release (#4081) 2022-07-28 15:53:57 -04:00
integrations [MDX] Add getHeadings + generate anchor links (#4095) 2022-08-01 17:23:56 -04:00
markdown [ci] release (#4086) 2022-07-30 00:29:04 -04:00
telemetry [ci] release (#3939) 2022-07-18 21:54:25 -07:00
webapi [ci] format 2022-07-25 04:20:38 +00:00