Optionally generate document urls with trailing slashes

Github pages serves `beep/index.html` from `example.com/beep/`.  Links to `/beep` will make an extra redirect round trip.  Enabling `trailingSlashes` will set `document.url` to `/beep/`, making it easier to create the right links in templates and switch link schemes per environment.