Widget:Bookshop: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
<!-- Load the Bookshop.org widget asynchronously to prevent blocking --> | |||
<div class="bookshop-widget-container" id="bookshop-widget-<!--{$id|default:'default'|escape:'html'}-->"> | <div class="bookshop-widget-container" id="bookshop-widget-<!--{$id|default:'default'|escape:'html'}-->"> | ||
<script src="https://bookshop.org/widgets.js" | <script async src="https://bookshop.org/widgets.js" | ||
data-type="<!--{$type|default:'book'|escape:'html'}-->" | data-type="<!--{$type|default:'book'|escape:'html'}-->" | ||
data-affiliate-id="<!--{$affiliate|default:'111716'|escape:'html'}-->" | data-affiliate-id="<!--{$affiliate|default:'111716'|escape:'html'}-->" | ||
data-sku="<!--{$sku | data-sku="<!--{$sku|escape:'html'}-->"> | ||
</script> | </script> | ||
<noscript> | |||
<a href="https://bookshop.org/books/isbn/<!--{$sku|escape:'url'}-->" target="_blank"> | |||
View book on Bookshop.org | |||
</a> | |||
</noscript> | |||
</div> | </div> | ||
</includeonly> | </includeonly> |
Revision as of 16:23, 10 March 2025
Bookshop.org Widget
This widget embeds a Bookshop.org book widget on a wiki page.
Usage
{{#widget:Bookshop |id=unique-id |type=book |affiliate=111716 |sku=9780691162553 }}
Parameters
- id (optional): A unique identifier for this widget instance (default: "default")
- type (optional): The widget type (default: "book")
- affiliate (optional): Your Bookshop.org affiliate ID (default: 111716)
- sku (optional): The book's SKU number (default: 9780691162553)