Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

docpad-plugin-services

docpad11MIT2.12.0

Adds super simple support for many 3rd party services to DocPad

analytics, coffeescript, docpad, docpad-plugin, esnext, facebook-follow, facebook-like, ga, gaug.es, gauges, github-follow, google analytics, hacker-news-submit, mixpanel, node, quora-follow, reddit-submit, reinvigorate, shields.io, travis, travis-ci, travisci, twitter-follow, twitter-tweet, zopim

readme

Services Plugin for DocPad

Travis CI Build Status NPM version NPM downloads Dependency Status Dev Dependency Status
GitHub Sponsors donate button Patreon donate button Flattr donate button Liberapay donate button Buy Me A Coffee donate button Open Collective donate button crypto donate button PayPal donate button Wishlist browse button

Adds super simple support to DocPad for many 3rd party services, buttons and badges.

Supports

These 3rd party services:

These social buttons:

  • Google Plus One
  • Reddit Submit
  • Hacker News Submit
  • Facebook Like
  • Facebook Follow
  • Twitter Tweet
  • Twitter Follow
  • Github Follow
  • Github Star
  • Quora Follow

These service badges:

  • Travis CI
  • Fury.io
  • Gittip
  • Flattr
  • Paypal

Install

Install the Plugin

docpad install services

Add the Script Block for most services

Ensure your layout includes the scripts block. With eco, it will look something like this:

<%- @getBlock('scripts').toHTML() %>

This is used for the Gauges, Google Analytics, Mixpanel, Reinvigorate, and Zopim services.

Add Template Helpers for special services

  • Disqus: <%- @getDisqus() %>
  • Service Buttons: <%- @getServiceButtons() %>

Configure

Add the following to your docpad configuration file:

# ...
templateData:
    site:
        url: 'http://my-production-website.com'
        services:
            buttons: ['FacebookLike']  # used to customise the order of the buttons

            facebookLikeButton:
                applicationId: '266367676718271'
            facebookFollowButton:
                applicationId: '266367676718271'
                username: 'balupton'
            twitterTweetButton: 'balupton'
            twitterFollowButton: 'balupton'
            githubFollowButton: 'balupton'
            githubStarButton: 'docpad/docpad'
            quoraFollowButton: 'Benjamin-Lupton'
            travisStatusButton: 'docpad/docpad'
            furyButton: 'docpad'
            gittipButton: 'docpad'
            flattrButton: '344188/balupton-on-Flattr'
            paypalButton: 'QB8GQPZAH84N6'  # paypal button email id

            disqus: 'disqus-id'
            gauges: 'gauges-id'
            googleAnalytics: 'googleAnalytics-id'
            inspectlet: 'inspectlet-id'
            mixpanel: 'mixpanel-id'
            reinvigorate: 'reinvigorate-id'
            zopim: 'zopim-id'
# ..

If you would also like to disable a service inside the development environment, add the following as well:

# ...
environments:
    development:
        templateData:
            site:
                services:
                    serviceToDisable: false
# ...

History

Discover the release history by heading on over to the HISTORY.md file.

Contribute

Discover how you can contribute by heading on over to the CONTRIBUTING.md file.

Backers

Maintainers

These amazing people are maintaining this project:

Sponsors

No sponsors yet! Will you be the first?

GitHub Sponsors donate button Patreon donate button Flattr donate button Liberapay donate button Buy Me A Coffee donate button Open Collective donate button crypto donate button PayPal donate button Wishlist browse button

Contributors

These amazing people have contributed code to this project:

Discover how you can contribute by heading on over to the CONTRIBUTING.md file.

License

Unless stated otherwise all works are:

and licensed under:

changelog

History

v2.12.0 2020 October 29

v2.11.0 2020 September 8

v2.10.0 2020 September 8

v2.9.0 2020 August 6

  • Updated dependencies, base files, and editions using boundation
  • Minimum required node version changed from node: >=0.12 to node: >=10 to keep up with mandatory ecosystem changes

v2.8.0 2018 July 11

  • Updated base files using boundation
  • Compiled with CoffeeScript v2
  • Removed unused extendr dependency

v2.7.0 2017 April 18

v2.6.0 2014 May 17

  • Better reddit button that now uses the page url
  • Better hacker news button (new ideal width is 100px)

v2.5.0 2013 December 10

v2.4.6 2013 October 31

  • Use shields.io for flattr as well

v2.4.5 2013 October 31

  • Use shields.io for badges

v2.4.4 2013 October 5

  • Fixed inspectlet error for everyone not using it (regression from v2.3.0)

v2.4.3 2013 October 4

  • Fixed inspectlet service (regression from v2.3.0)

v2.4.2 2013 September 30

  • Fixed inspectlet service (regression from v2.3.0)

v2.4.1 2013 September 30

  • Fixed github star error (regression from v2.4.0)

v2.4.0 2013 September 30

  • Added buttons: - Github Star

v2.3.0 2013 September 17

  • Renamed social buttons to service buttons - getSocialButtons to getServiceButtons - social-button to service-button
  • Most of the template helpers now can have the services object swapped out by passing it as the first object
  • Added services: - Inspectlet
  • Added buttons: - Travis Status Button - Fury Button - Gittip Button - Flattr Button - Paypal Button

v2.2.6 2013 May 30

  • Can now disable the facebook buttons by setting their applicationId property to false

v2.2.5 2013 May 30

  • Fix facebook like button on home page
  • Mild performance improvement
  • Updated for latest DocPad conventions

v2.2.4 2013 March 15

  • Added the ability to specify which social buttons you want outputted on the getSocialButtons method

v2.2.3 2013 March 7

  • Repackaged

v2.2.2 2013 February 11

  • Like/submit urls are now clean
  • Added buttons: - Reddit Submit - Hacker News Submit

v2.2.1 2013 February 10

  • Fixed break when Quora follow button is not configured

v2.2.0 2013 February 10

  • Added buttons: - Google Plus One - Facebook Like - Facebook Follow - Twitter Tweet - Twitter Follow - Github Follow - Quora Follow

v2.1.0 2013 February 3

  • Added support for Disqus via @getDisqus() template helper
  • Added template helpers for all supported services
  • Fixed reinvigorate service not injecting when socket.io is used

v2.0.0 2012 December 29

  • Initital working release