ihashacks

i dunno

Stackad in Octopress

StackAd is most commonly known as a WordPress plugin developed by Quick Media Solutions. Thanks to a post on StackApps, setting this up on Octopress is pretty easy.

source/_includes/custom/head.html
1
2
3
4
5
6
7
8
9
--- /tmp/head.html.orig 2012-05-28 18:17:22.785629323 -0700
+++ source/_includes/custom/head.html   2012-05-27 22:54:26.441620000 -0700
@@ -4,3 +4,6 @@
 <link href="http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold,bolditalic" rel="stylesheet" type="text/css">
 -->
 <link href='http://fonts.googleapis.com/css?family=Ubuntu:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
+<script type='text/javascript'
+       src='http://files.quickmediasolutions.com/stackad/stackad.min.js'>
+</script>
source/_includes/custom/asides/stackad.html
1
2
3
<section>
  <div class='stackad' data-site='askubuntu.com'></div>
</section>

It is possible to change “data-site” to other Stack Exchange sites such as stackoverflow.com

_config.yml
1
2
3
4
5
6
7
8
9
10
11
--- /tmp/_config.yml.orig       2012-05-28 18:13:58.845629356 -0700
+++ _config.yml 2012-05-27 22:56:10.737620929 -0700
@@ -45,7 +45,7 @@

 # list each of the sidebar modules you want to include, in the order you want them to appear.
 # To add custom asides, create files in /source/_includes/custom/asides/ and add them to the list like 'custom/asides/custom_aside_name.html'
-default_asides: [asides/recent_posts.html, asides/github.html, asides/twitter.html, asides/delicious.html, asides/pinboard.html, asides/googleplus.html]
+default_asides: [asides/recent_posts.html, asides/github.html, asides/twitter.html, asides/delicious.html, asides/pinboard.html, asides/googleplus.html, custom/asides/stackad.html]

 # Each layout uses the default asides, but they can have their own asides instead. Simply uncomment the lines below
 # and add an array with the asides you want to use.

You won’t get any passive income with these ads, but for me that’s not the point.

Comments