The Book Marks widget is an exciting new way to share our aggregated book reviews content on your own site.
Over the last few years, we have been collecting reviews on thousands of books to generate aggregate scores for each title but, up until now, you had to visit the Book Marks site in order to see them. Now, we’re making our huge database available to everyone to display on your own sites.
It’s a simple piece of HTML that you can insert into the content of your page or embed into your own theme templates. Anyone who has ever embedded a Twitter timeline or Facebook Like widget onto their pages will be familiar with how to use ours.
The code can be as simple as:
<script src="//lithub.com/b/v1/bookmarks.js?ver=1.3"></script>
<div
class="bm-reviews"
data-isbn="9781594204876"
data-width="auto"
data-link="true">
</div>
If that ISBN exists within our database, then the widget will render:
If we don’t have a record of a particular ISBN, then our tiny JavaScript library will remove any trace of itself from your webpage.
The widget is also responsive, so if your page adjusts to display in optimized forms on people’s phones and tablets, the widget will adjust with it. We have designed three different formats so that the widget will always look its best, regardless of how much or how little space you give it.
The absolute easiest way to set up the widget on your page is to locate the title you want to display and copy the pre-generated code directly from the page itself. You can then paste that within the HTML of your web page or, if you’re using a content management system like WordPress, paste it directly into the body of your content. When the page next loads, the widget will be there!
But if you’re a tad bit more technical minded, you can enter the following parameters:
Parameter | Required | |
---|---|---|
data-isbn | Yes | The ISBN is absolutely required so we know which book you would like to display the widget for. This ISBN can be for any format or edition of the title since our database is constantly growing. However, if it will not render for a particular edition or format but you see the title on Book Marks try the hard cover first as later editions follow as they’re released. |
data-width | No | Leaving out this parameter will default to “auto” which will allow the widget to define its size based on the amount of space available within its container. This will ensure that the widget is always responsive on any device. Alternatively, you may use percentages or pixels for the widths by putting “80%” or “250px” as the value. Using raw pixel values unless strictly defining the most narrow size will not be responsive on larger or smaller devices. |
data-count | No | We default to showing just the top three representative reviews related to the book but you can set this to any number. If you set it to more reviews than we have for the title in question, it will show as many reviews as we have but no more than the number you set. And if you set it to “0”, then we will always display all of the reviews in the order our editors believe are most representative of the title. |
data-link | No | We have provided the widget, will you link back to us? Leaving this out will omit a link back to the page on Book Marks for the title in question. But if you set this to “true” then it will link back to us and visitors to your site might discover ours and find out the ratings of other books they could be interested in. |
data-border | No | The designer of Book Marks has determined that this widget always looks best with a 5px border and leaving out this parameter will render the widget with that. But if you’d like a larger or smaller one, you can change the size by entering the thickness in pixel form. Example: “10px”. |
There is no limit as to the number of widgets you can put on your site though we think every page looks better with one. And we see no difference between commercial and non-commercial uses. The only limitation is that a single ISBN can only be used once per page. With that one proviso, we look forward to seeing our widget pop up across the Internet and even more people finding good books to read.
– Book Marks