New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

middleman-vcard

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

middleman-vcard

  • 0.9.10
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Middleman VCard

Gem Version Build Status Code Climate Test Coverage

Project informations

Description

A Middleman extension to generate VCards and useful helpers to work with.

Usage

Include the middleman-vcard gem in your Gemfile:

gem 'middleman-vcard'

Add the following code to your config.rb file:

require "middleman-vcard"
activate :vcard,
  name: data.site.vcard.name,
  emails: [{
    email:     data.site.vcard.email,
    preferred: true,
    location:  "work"
  }],
  phones: [{
    number:     data.site.vcard.phone,
    preferred:  true,
    location:   "work",
    capability: ["voice", "video", "msg"]
  }],
  addresses: [{
    preferred:  true,
    location:   "work",
    postalcode: data.site.vcard.postalcode.to_s,
    locality:   data.site.vcard.city,
    region:     data.site.vcard.province,
    country:    data.site.vcard.country
  }],
  photo: {
    path: File.join(root, config.source, config.images_dir, "logo-vcard.jpg"),
    type: "jpeg"
  }

Of course you can organize your data as you want and choose what to include in your data files or directly in your config file.

Also, you can pass multiple phones, addresses, emails.

Now the VCard file will be automatically generated :D

Helpers:

Usually you need to include your VCard in HTML, so there are some helpers already defined:

Generate a link tag that points to the VCard.

Details here.

vcard_path

Build the path that points to the VCard file.

Details here.

Contributors

Many thanks to Luca Molari (LMolr)!!

Install

$ gem install middleman-vcard

Copyright (c) 2015 Alessandro Molari

See LICENSE for details.

FAQs

Package last updated on 14 Feb 2018

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