Socket
Socket
Sign inDemoInstall

marked-imgix

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

marked-imgix

marked renderer to generate imgix urls


Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

marked-imgix

nodei.co

npm

github-issues

stars

forks

marked / imgix renderer to generate imgix urls.

install

npm i --save marked-imgix

usage

import markedimgix from 'marked-imgix'
import marked from 'marked'

const renderer = new marked.Renderer()
renderer.image = markedImgix({
  host: 'my-namespace.imgix.net'
  secureURLToken: 'cU7USDTYcSYXm54wCAFP4CCeYGWERH4s'
})

marked(
  '![image alt](images/cat.jpg "image title { w: 400, h: 300, fit: \'crop\'}")',
  { renderer }
)
// <img src="https://my-namespace.imgix.net/images/cat.jpg?w=400&h=300&fit=crop&ixlib=js-1.0.6&s=bc64e917bf149a05f6924405c879487e0" alt="image alt"> "image title"

quotes

The example above shows a problem you run into if trying to declare strings in js. The escaped quotes will work fine in this case.

In a markdown file, you can just use single quotes for string parameters.

compatibility

dist/index.js should be fully compatible with node 6

Author

Levi Wheatcroft levi@wht.cr

Contributing

Contributions welcome; Please submit all pull requests against the master branch.

License

MIT

Keywords

FAQs

Package last updated on 16 Jul 2017

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc