rehype-figure-for-img

rehype plugin to wrap img tags inside figure tag

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
rehype-figure-for-img
210.0.69 months agoa year agoMinified + gzip package size for rehype-figure-for-img in KB

Readme

rehype-figure-for-img
npm i rehype-figure-for-img
What is this?
rehpye plugin replace rehype-figure plugin.
because it don't work at lest with me.
How to use it with astro?
  1. run npm install rehype-figure-for-img

  1. go to astro.config.mjs

  1. edit javascript object and add
...
markdownOptions: {
    render: [
	    '@astrojs/markdown-remark',
		    {
            rehypePlugins: [
                ...
                // add this
                ['rehype-figure-for-img'],
            ]
		    },
	],
	}
...