Embedding Hypothesis in Websites and Platforms

Embedding Hypothesis in Websites and Platforms2018-03-14T14:41:02+00:00
  1. Home
  2. Help
  3. Tutorials and How-Tos
  4. Embedding Hypothesis in Websites and Platforms

While individuals can annotate and discuss any page on the Web by equipping their browsers with extensions or bookmarklets, or by using our proxy (via.hypothes.is), publishers can make annotation easier for readers by embedding the Hypothesis client in their websites or platforms.

Embedding Hypothesis

To add Hypothesis to your website or platform, simply add the following line to the HTML source of your page:

<script src="https://hypothes.is/embed.js" async></script>

Configuration

You can configure Hypothesis by including a config tag before the the script tag.

For example, the following arrangement will ensure that our yellow highlights are hidden by default:

<script type="application/json" class="js-hypothesis-config">
{
"showHighlights": false
}
</script>
<script async src="https://hypothes.is/embed.js"></script>

You can find the full list of configuration options in our documentation.

Best practices to optimize your content for annotation

When publishing annotation-friendly documents, be sure to:

  • Include a <link rel="canonical" href="..." /> tag on pages that may be available at different URLs (and for which you want to share annotations).
  • Include Open Graph Protocol content in your metadata

More background on good practices and relating documents together can be found in our Guidance for Web Publishers.

Tools, plug-ins and integrations

The Hypothesis community has developed different tools to integrate annotation on websites and explore other functionality using the Hypothesis code and API. Explore all the different ways to include Hypothesis in websites that use WordPress, Drupal, and other platforms. If you’re working with a Content Management System or web site building software and would like to discuss integrating Hypothesis, we’d love to hear about it!

Was this article helpful?

Related Articles

Community, Privacy and Accessibility at Hypothesis