Miles to go ...

Pagd: Social interfaces within pagd

Read this article to know how to set up your blog site with pagd and host it using github. Continue reading if you want to know how to add social features like tweet-buttons, facebook-likes or commenting system to your site.

Comments and social sharing with disqus

Normally it is better to encourage discussions through open networks like mailing-list, IRC, twitter etc… If in case you want your readers to discuss your topic on the same page, you can do so by including the disqus plugin. But please note that comments will be saved on disqus server and are subjected to their policies.

To enable disqus plugin for all your pages, change disqus attribute in your layout’s config.json file,

{ "disqus" : true }

You should also sign-up with disqus and copy the html snippet that they generate for you into the template file, _templates/_social/disqus.html, under your site-layout.

When you regenerate the site after this, you will find disqus commenting system added to your pages.

Easy sharing with social network

All most every social network site come with a share-button that you can integrate in your pages. This is quite helpful because there is a good chance that your readers are active in one of them and can share your page with his/her network at the click of a button.

First add a list of share buttons (or interfaces provided by the social network) in your config.json file

{ "social_sharing" : "twitter,fb,hn,linkedin,gplus" }

Above example adds, Twitter, FaceBook, HackerNews, LinkedIn, Google+ social buttons to my blog-pages. Note that the comma separated names mentioned above, like hn, fg etc must correspond to a file-name under your site’s template sub-directory. Before we get into that, first obtain the HTML snippet that will integrate your pages with a social network, say for instance Twitter network. Once you have them just save them under the file _templates/_social/twitter.html. Likewise repeat this exercise for all the networks listed under social_sharing.

When you regenerate the site after this, you will find find social buttons at the bottom of every blog article.

Sometimes social buttons generated by social-networking sites will have styling attributes that don’t blend with rest of the page. In such cases you can manually change the container styling for these button using media/myblog.css file under your site-layout.

To keep a tab on pagd - follow [project at github][pagd-gh-link] and post your queries to their mailing-list.