From 439fdddc934c880377525474569f6b5f74001a30 Mon Sep 17 00:00:00 2001 From: moparisthebest Date: Tue, 23 Apr 2013 18:50:11 -0400 Subject: [PATCH] Abstracted out the google adsense code --- _config.yml | 11 +++++++++++ source/_includes/article.html | 23 ++++++++++++----------- source/_includes/asides/sidead.html | 23 ++++++++++++----------- source/_layouts/page.html | 25 ++++++++++++++----------- 4 files changed, 49 insertions(+), 33 deletions(-) diff --git a/_config.yml b/_config.yml index 2dce5f0..1b531d2 100644 --- a/_config.yml +++ b/_config.yml @@ -91,5 +91,16 @@ disqus_show_comment_count: true # Google Analytics google_analytics_tracking_id: UA-6877554-1 +# Google Adsense +google_ad_client: ca-pub-3055920918910714 + +google_sidead_slot: 8451358572 +google_sidead_width: 160 +google_sidead_height: 600 + +google_bannerad_slot: 4021158971 +google_bannerad_width: 468 +google_bannerad_height: 60 + # Facebook Like facebook_like: true diff --git a/source/_includes/article.html b/source/_includes/article.html index 2cd4c0d..95ed19d 100644 --- a/source/_includes/article.html +++ b/source/_includes/article.html @@ -16,17 +16,18 @@ {% endunless %} - - +{% if site.google_bannerad_slot %} + + +{% endif %} {% if index %}
{{ content | excerpt }}
diff --git a/source/_includes/asides/sidead.html b/source/_includes/asides/sidead.html index 024eed1..9851eb7 100644 --- a/source/_includes/asides/sidead.html +++ b/source/_includes/asides/sidead.html @@ -1,13 +1,14 @@ +{% if site.google_sidead_slot %}
- - + +
+{% endif %} diff --git a/source/_layouts/page.html b/source/_layouts/page.html index 239a734..56a0c39 100644 --- a/source/_layouts/page.html +++ b/source/_layouts/page.html @@ -10,17 +10,20 @@ layout: default {% if page.date %}

{% include post/date.html %}{{ time }}

{% endif %} {% endif %} - - + +{% if site.google_bannerad_slot %} + + +{% endif %} + {{ content }} {% unless page.footer == false %}