Skip to content

Latest commit

 

History

History
89 lines (66 loc) · 1.67 KB

add-comments-and-analytics.adoc

File metadata and controls

89 lines (66 loc) · 1.67 KB

Add Disqus Comments and Google Analytics

Previous: Using Images and Videos

Tutorial 12

This tutorial…​

Add Disqus comments

Add Disqus extension as last entry in _ext/pipeline.rb

extension Awestruct::Extensions::Disqus.new

Edit _config/site.yml to configure Disqus

disqus: writeadapt-%USERNAME%
disqus_generate_id: true
disqus_developer: true

Edit _partials/post.html.haml to add Disqus comments

  - if !page.listing
    %hr
    - if site.disqus && !site.disqus_developer
      #comments
        =page.post.disqus_comments

Add Google Analytics

Edit _ext/pipeline.rb

helper Awestruct::Extensions::GoogleAnalytics

Add analytics key to the configuration:

Edit _config/site.yml

google_analytics: UA-00000000-1

Clean and preview site to see changes

$ rake clean preview

Next: Chunked content