Embedding Knol Content into Other Websites

A design document for embeddable renderings of knol pages, to be used for hosting knol content on external websites.


Objective

The objective of this feature is to provide lightweight embeddable renderings of knol pages, to be included in external web sites.  These renderings provide a read-only view of the knol, with minimal JavaScript and CSS code needed to support the layout.

Here are some use cases for embedded knols:

  1. Using Knol as a platform for a help center.  As an example, a Help Forum team would like to be able to collaboratively edit help content on knol.google.com, but render the resulting documents using their own frontends and adding their own chrome and supporting content.
  2. Knol interface for mobile devices.  Since the editor and other complex JavaScript code don't run well on mobile browsers, embedded knol representation could be rendered by default for mobile clients.
  3. Sharing knol content.  Embedded knol renderings can be seen as a first step towards a read-only REST API allowing external developers to embed knol content in their own gadgets, badges etc.

Quick Start

For a customized quick overview of how to embed your knol, just click the "Embed knol into other websites" link at the bottom of the "Share and invite" list in your author toolbox of the knol you'd like to embed. 



If your knol does not have a "copyright" license, It will take you to a page that looks like this: http://knol.google.com/k/knol/system/knol/pages/EmbedKnol?knolId=si57lahl1w25.233 and contains easy instructions for copy/pasting HTML into your website to embed the knol. 


Design Highlights

Embedded Views

A new url parameter will be introduced to render a knol in one of several predefined embedded views.  Embedded views render simplified, public and read-only views of knols.  The markup is not interactive -- it lacks affordances to write, edit, manage, rate, review, comment, etc.  These affordances can be provided by consumers of embeddable knols, by linking back to the full knol representations on knol.google.com.  The url structure to link directly into write modes (e.g. edit, manage) will be documented together with the public documentation for embedding knols.

Embedded View Types

There are two predefined embedded views with different levels of details shown: content view and gadget view.

Content View

Content view is similar to the current knol view, but lacks all the sidebar information, chrome (logo, login bar and the bottom bar), search, write, edit, manage, rate affordances and comments.

An author byline is added below the title.  The information shown:
  • title
  • author byline (pointing to knol.google.com)
  • article rating (note: can also be omitted with a parameter)
  • subtitle and abstract
  • non-interactive table of contents (note: can also be omitted with a parameter)
  • full knol content

Recommended dimension: minimum 500px width, arbitrary height

Example:



This view also accepts additional parameters, embed.toc and embed.ratings, that can be used to exclude the respective UI components (table of contents and the article rating, see below for details).

Gadget View

Gadget view can be used for space-constrained renderings of knols, e.g. in a sidebar.  A similar view is currently used on our home page to represent featured knols.

Information shown:
  • author image
  • title, subtitle, byline
  • knol snippet
  • an image from the knol (NOTE: The image needs to be attached to that knol, not linked from a different domain).

Recommended dimension: 300x300px

Example:

Requesting and Embedding Knols

Embedded knols are retrieved by appending the embed url parameter with the corresponding view to a knol url.  The valid parameter values are content and gadget.  Example:
http://knol.google.com/k/jeffery-greenblatt/clean-energy-2030/15x31uzlqeo5n/1?embed=content

Example with parameters:
http://knol.google.com/k/jeffery-greenblatt/clean-energy-2030/15x31uzlqeo5n/1?embed=content&embed.toc=false&embed.ratings=false

The resulting HTML can either be included as an iframe or injected into a server-generated page.

Including Embedded Knol as an Iframe

This is the simplest method of including embedded knols.  Include an iframe tag pointing to the above url:

<iframe
  width="950" height="1000"
  src="
http://knol.google.com/k/jeffery-greenblatt/clean-energy-2030/15x31uzlqeo5n/1?embed=content">
</iframe>


If the knol content height exceeds the iframe's height, the iframe will automatically resize.  The iframe includes all the supporting CSS style and JavaScript code.

Pros:
  • Simplicity, requires little work on the consumer's side.
  • Since the iframe runs in a sandbox, there are no security risks involved
Cons:
  • Latency: since knol content is rendered in a separate request, users will see the surrounding chrome rendered before the iframe content is rendered.
  • As the iframe resizes to accommodate for knol content, the surround chrome might reflow, resulting in page flicker.
  • Iframes have usability issues with browser history tracking.

Including Embedded Knols on Server Side

In a server-generated page, knols can be embedded into the HTML directly:
  • Perform an HTTP GET request using the above url,
  • Using a DOM library, parse the resulting document and include the content of the body element directly into the page,
  • In the <head> of the page, include the supporting CSS style-sheet needed to style the embedded knol:
    <link rel="stylesheet" type="text/css"
      href="http://knol.google.com/k/knol/system/knol/css/knol.css"
      media="screen" />

  • Note: no additional JavaScript code is necessary.

Pros:
  • More control over how the page is rendered.
  • Improved latency.
Cons:
  • Requires more engineering work.

Authorization

Embedded knols will always show the public view and will not try to authenticate viewers.  If a knol is unpublished, flagged or removed, the corresponding error message will be served in place of the knol content.

Knol Links

Links contained within any embed view of a knol will be absolute and point to knol.google.com.  This differs from the relative links served as part of the standard Knol view (on knol.google.com). 

Localization

To embed localized versions of the knol user interface, pass in the hl url parameter with the ISO 639-2language code, e.g.:
http://knol.google.com/k/jeffery-greenblatt/clean-energy-2030/15x31uzlqeo5n/1?embed=content&hl=de

The list of supported languages will be included in the public documentation for embedding knols.  As of April 2009, the supported language codes are: en, pt, es, ko, fr, de, ar, it, ru, ja, nl, iw.

Embedding Specific Knol Revisions

By default, an embedded knol will show content from the latest published version.  To point to a specific revision of the knol, the version url parameter can be added.  To determine the proper version number, use the Revisions view in Knol.  Example:
http://knol.google.com/k/jeffery-greenblatt/clean-energy-2030/15x31uzlqeo5n/1?embed=content&version=42

Comments

Examples of Existing Sites with Knol embedded?

Do you know of any examples of existing sites with knol embedded?

I am trying to figure out if knol would be a good tool to use for embedding articles on an informational site that teaches kids about a sport, but I cannot quite conceptualize how this would look or feel.


Thanks,
-Jesse

Last edited Sep 13, 2009 11:15 PM
Report abusive comment

embed code

I want to get embed code for some of my knols but the link is gone. When I click on "share & invite" I only have 2 options: email & invite review - no option for embed.

Last edited Aug 28, 2009 12:27 AM
Report abusive comment

Knol in knol

If it was possible to embed a knol in another knol - I would definitely have a use for it.

I know - I know - we've got collections for that - but I still have uses not covered by collections.

Last edited Sep 5, 2009 2:26 PM
Report abusive comment

Embedable Knol list

It would be useful to have a gadget that I could add to websites, that listed all my knols (Title, author, link). Better still if I could configure it to list various subsets of my knols.

Last edited Jul 9, 2009 2:20 PM
Report abusive comment

Untitled

why my evaluating stars r not any more yellow???they was so!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Last edited Jun 4, 2009 10:38 PM
Report abusive comment

I do not have an option "Embed knol into other websites"

Thank you for your help
I must be missing something, I clicked on "Share and invite" and found I do not have an option "Embed knol into other websites" I only have the following...
Share and invite
* Share via email
* Invite authors or reviewers
* Set email notification preferences
* Join a moderated collection
My knol that I want to embed is in my first comment
Alex

Last edited Jun 1, 2009 11:34 PM
Report abusive comment

Please make this knol more user friendly

I would love to embed my knol into my website, but I'm not able to do it, from the instructions on this knol,
This is the knol I want to embed:
http://knol.google.com/k/alex-spence/buteyko-breathing-charts/202i29i90v7sn/22?domain=knol.google.com&locale=en#
This is the website page:
http://www.doctorbuteykodiscoverytrilogy.com/breathing-charts.cfm
I have access to the html on my website
I would like the "Content View" of my knol
Can you please talk me though the process step by step
Step 1: how do I get the Code to insert into my website?
Step 2: where in the code on my website do I insert the knol code?
I hope you can help

warm regards
Alex

Last edited May 30, 2009 12:15 PM
Report abusive comment
Knol Help
Knol Help
Helping authors since 2008 at Google
Mountain View, CA
Article rating:
Your rating:

Categories

Based on community consensus.

Activity for this knol

This week:

84pageviews

Totals:

3802pageviews
25comments