Socket
Socket
Sign inDemoInstall

metalsmith-tweet-embed

Package Overview
Dependencies
28
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    metalsmith-tweet-embed

Metalsmith plugin for converting twitter status URLS to an embedded tweet


Version published
Weekly downloads
5
Maintainers
1
Install size
2.00 MB
Created
Weekly downloads
 

Readme

Source

metalsmith-tweet-embed Build Status Coverage Status npm

Converts Twitter status URLS to embedded Twitter statuses

Installation

With npm:

npm install metalsmith-tweet-embed

With yarn:

yarn add metalsmith-tweet-embed

Usage

var metalsmith = require('metalsmith');
var tweetEmbed = require('metalsmith-tweet-embed');

metalsmith(__dirname)
  .use(tweetEmbed())
  .build();

Options

You can limit which status links get converted by passing in pattern as a param.

var metalsmith = require('metalsmith');
var tweetEmbed = require('metalsmith-tweet-embed');

metalsmith(__dirname)
  .use(tweetEmbed({ pattern: '**/*.md' }))
  .build();

You can also customize the options of the embed by using any options supported by the Twitter Status oEmbed API.

These options can be set directly from the plugin, or via frontmatter.

From Frontmatter

---
title: Look at this awesome page
twitter:
  omit_script: false
  align: center
---

This is my markdown content

https://twitter.com/BillGates/status/7957453193

From Plugin

var metalsmith = require('metalsmith');
var tweetEmbed = require('metalsmith-tweet-embed');

metalsmith(__dirname)
  .use(tweetEmbed({
    options: {
      omit_script: true,
      align: 'center'
    }
  }))
  .build();

Any embed options set via frontmatter will overwrite options set from the plugin options.

License

MIT

Keywords

FAQs

Last updated on 30 Nov 2018

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc