JLongley / gatsby-remark-external-links

Adds the target and rel attributes to external links in markdown.
MIT License
21 stars 8 forks source link

Use remark-external-links as dependency #3

Open cedricdelpoux opened 6 years ago

cedricdelpoux commented 6 years ago

Hello, I'm the creator of remark-external-links

Why not require the official plugin as a dependency and do not rewrite it ? There are some officials plugins using this feature: https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-remark-custom-blocks/src/index.js

zslabs commented 5 years ago

Opened up https://github.com/JLongley/gatsby-remark-external-links/pull/6 to resolve this.

zslabs commented 5 years ago

@JLongley Think we could tag 0.0.5 to release this to npm?

karlhorky commented 4 years ago

Interesting to see that #6 was never published to npm - wonder if that's why it still works.

remark-external-links by itself has issues with gatsby-plugin-mdx, as I've documented here: https://github.com/gatsbyjs/gatsby/issues/22719.

Maybe once #6 is published, it will break this too 🤔

cc @cedricdelpoux

zslabs commented 4 years ago

@karlhorky FWIW, I switched to MDX recently and wrote my own logic to handle both internal and external links https://github.com/zslabs/zslabs.com/blob/master/src/components/mdxShortcodes.js#L17

karlhorky commented 4 years ago

@zslabs Nice, having the full power of JSX is great, for sure :)

Still would be cool to have a hands-off plugin for those who don't want to roll their own though.

karlhorky commented 4 years ago

I guess this library isn't required at all anymore, you can just use remark-external-links by itself now:

https://github.com/JLongley/gatsby-remark-external-links/issues/22