Sunday, October 5, 2014 at 11:39 AM

The Hello World of rivers

Suppose you have River4 running, generating a few River.js files, and you want to include one in your news site or blog. That's why I put this simple example page together, to provide source code you can crib to do the job.

The source

Here's a gist that contains the source of an HTML page that you can crib from.

The code on the Hello River page is yours to do with as you please. But the files it includes are copyrighted and not at this time available under an open source license.

How to

Include river.js and river.css in your page. It automatically includes the files it needs.

The other files we include, the Lora font, menus.css, are just to make the sample app look good. They aren't required for your pages.

To load a river, call httpGetRiver with the url of the River.js file as its only parameter.

The commands in the Rivers menu loads a few of the rivers that my server maintains.

Update #1 -- Oct 12, 2014

I needed to remove the inclusion of jQuery and Bootstrap from river.js, so the river code could be included in Fargo's rendered pages. This means the Hello World app changed, and your code will have to change as well.

Just add the three lines in the <head> section of your page as the example does.

<script src="">

<link href="" rel="stylesheet">

<script src="">

Update #2 -- Oct 12, 2014

I removed the top and bottom margin from .divRiverContainer. It really should be up to the application that includes the river to determine what space is left above and below the river.

Last built: Mon, Jul 20, 2015 at 10:22 AM

By Dave Winer, Sunday, October 5, 2014 at 11:39 AM. Don't slam the door on the way out.