How to Insert Ethical Ads into Your Slate API Docs

For those who don’t know Slate helps you create beautiful, intelligent, responsive API documentation. They were inspired by Stripe’s API Docs and are used by open source projects to large enterprise & government institutions. Let’s get started!

Setup Slate

They have great documentation on how to get up and running here: https://github.com/slatedocs/slate#getting-started-with-slate

Steps to integrate CodeFund

Login to your CodeFund account and create a new property and fill out the required fields. For the template, choose image-only. Once we have more templates we will update this post. ?

Afterwards, you must copy the embed code under the Instructions tab

Next, you can add the code to your website. For good web performance, it’s best to put your JavaScript at the bottom.

Open up source/layouts/layout.erb and right above </body> add the JavaScript snippet.

Now we will add the other snippet in source/index.html.md

Now refresh the page (http://localhost:4567) and you should see the CodeFund ad! ?

And there you have it. Your awesome API Docs rocking Ethical Ads ?

Photo by Mat Reding

Previous

Next

Share This