Skip to content

My working copy of bespoke-hash: Hash Routing for Bespoke.js

License

Notifications You must be signed in to change notification settings

mojavelinux/bespoke-hash

 
 

Repository files navigation

Build Status Coverage Status

bespoke-hash

Hash Routing for Bespoke.js

Download

Download the production version or the development version, or use a package manager.

Usage

This plugin is shipped in a UMD format, meaning that it is available as a CommonJS/AMD module or browser global.

For example, when using CommonJS modules:

var bespoke = require('bespoke'),
  hash = require('bespoke-hash');

bespoke.from('article', [
  hash()
]);

When using browser globals:

bespoke.from('article', [
  bespoke.plugins.hash()
]);

Starting from #1, all routes are numbered by default.

Named Routes

If you'd like to use named hash routes instead, add data-bespoke-hash attributes to your slide markup.

<article>
  <section data-bespoke-hash="catchy-title"></section>
  <section data-bespoke-hash="shameless-plug"></section>
  <section data-bespoke-hash="controversial-statement"></section>
  <section data-bespoke-hash="explanation-of-controversial-statement"></section>
  <section data-bespoke-hash="shameless-self-promotion"></section>
</article>

Package managers

npm

$ npm install bespoke-hash

Bower

$ bower install bespoke-hash

Credits

This plugin was built with generator-bespokeplugin.

License

MIT License

About

My working copy of bespoke-hash: Hash Routing for Bespoke.js

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%