gatsby-remark-external-links icon indicating copy to clipboard operation
gatsby-remark-external-links copied to clipboard

Use remark-external-links as dependency

Open cedricdelpoux opened this issue 7 years ago • 6 comments

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

cedricdelpoux avatar Aug 09 '18 08:08 cedricdelpoux

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

zslabs avatar Oct 26 '18 19:10 zslabs

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

zslabs avatar Nov 29 '18 23:11 zslabs

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

karlhorky avatar Apr 29 '20 10:04 karlhorky

@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

zslabs avatar Apr 29 '20 12:04 zslabs

@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 avatar Apr 30 '20 09:04 karlhorky

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

karlhorky avatar May 06 '20 12:05 karlhorky