Skip to content

Latest commit

 

History

History
57 lines (39 loc) · 2.06 KB

README.md

File metadata and controls

57 lines (39 loc) · 2.06 KB

DEV Social Badge

GitHub package.json version Contributions to DEV Widget are welcomed

Unofficial Social Badge for DEV.to

A social badge that pulls your reaction count for an article that’s been shared on DEV


CDNJS

Help me get this hosted on CDNJS by giving the repository a star. I require at least 800 stars to submit to CDNJS.


Installation and Usage

Adding the script tag to the HEAD

    <!-- Place script tag before the end of the head tag -->
    <script src="https://unpkg.com/[email protected]/dist/dev-social-badge.min.js"></script>

Adding the devbadge and script tags to the BODY

If you're using a template for your blog posts, I suggest adding this to the template file for your blog posts - not your main site layout. This will help to reduce unnecessary API calls to DEV.to.

    <!-- Place devbadge tag wherever you'd like the badge to appear -->
    <devbadge />
    <!-- Place script tag before the end of the body tag -->
    <script>window.onload = function(){typeof findOnDev !== "undefined" && findOnDev()}</script>

Meta Tag Guide

attributes description default required
dev:username Your DEV.to Username N/A true

Example of a meta tag:

<meta name="dev:username" content="benjaminjprice" />

Changelog

RELEASES


Contributing

I'm still getting things started. As such, there aren't any/many issues created yet. But, you can always checkout CONTRIBUTING.md for Contribution guidelines.