Mdx-deck: Internal Links

Created on 1 Aug 2018  Â·  5Comments  Â·  Source: jxnblk/mdx-deck

Not sure if this an issue. But how would internal linking between slides function?
An initial try via [Go to](#3) or [Go to](/#3) would open the slide in a new tab, not navigate to the selected slide. Is there a different way to navigate between slides?

All 5 comments

Current there's a default prop for target: '_blank' on the link component, which should probably be removed. I briefly looked into this but didn't get it in https://github.com/remarkjs/remark-external-links

Where would the change have to take place? Where does remark come into play?

Currently the webpack config is set in the CLI here and remark plugins are passed to the custom loader as options: https://github.com/jxnblk/mdx-deck/blob/master/cli.js#L48-L50

It would be great to enable user land to define if the link should be external (or maybe external is default) can be set to internal f.e. If we know we're dealing with an internal link than we could also navigate to the selected slide.

Yeah, we could detect via the href prop whether it starts with a hash or not – the link can be completely customized with the components object, but I think it's good to have smart defaults built in. But, the simplest solution is probably to remove the default prop for now

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DSchau picture DSchau  Â·  5Comments

QuentinRoy picture QuentinRoy  Â·  5Comments

trevordmiller picture trevordmiller  Â·  3Comments

Irev-Dev picture Irev-Dev  Â·  4Comments

jxnblk picture jxnblk  Â·  4Comments