Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

gridsome-remark-unwrap-images

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gridsome-remark-unwrap-images

Unwrap transformed gridsome images from its paragraph tag.

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
9
Maintainers
1
Weekly downloads
 
Created
Source

gridsome-remark-unwrap-images

gridsome-remark-unwrap-images unwraps transformed gridsome images from its paragraph tag, allowing for advanced styling such as medium-width paragraphs and full-width images (Medium-style articles).

The plugin is a port of gatsby-remark-unwrap-images.

Install

npm install gridsome-remark-unwrap-images

Usage

Configure gridsome.config.js to use the plugin.

module.exports = {
	siteName: 'Gridsome Blog',
	siteDescription: 'A simple Gridsome blog',

	transformers: {
		remark: {
			plugins: [
				// Add remark-unwrap-images plugin
				'gridsome-remark-unwrap-images'
			]
		}
	}
}

:warning: Caveat

At the moment the image to be unwrapped must be in a separate line, otherwise the image will still be wrapped in a <p> tag.

:white_check_mark: Image gets unwrapped

Markdown

I'm a paragraph.

![I'm an image](image.jpg)

HTML output

<div>
	<p>I'm a paragraph.</p>
	<img alt="I'm an image" src="image.jpg" />
</div>

:x: Image stays wrapped

Markdown

I'm a paragraph.
![I'm an image](image.jpg)

HTML output

<div>
	<p>
		I'm a paragraph.
		<img alt="I'm an image" src="image.jpg" />
	</p>
</div>

License

See the LICENSE file for details.

Keywords

vue

FAQs

Package last updated on 03 Jul 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts