Building a tutorial viewer app
Since tutorials can be distributed as Meteor packages, it is possible to create a wide variety of tutorial viewing and reading apps with different styles, features, and layouts. Some ideas:
- Single page print layout
- Speed reading layout
- Gamified tutorial system with badges and points
Example app
For a quick example of a simple tutorial viewer app, check out the tutorial-viewer
example app: XXX
Step-by-step guide
When someone publishes a tutorial as a Meteor package, they will depend on the mdg:tutorial-registry
package. This package provides a standard API for a tutorial to provide its content to an enclosing app. It's up to you to convert that metadata and content into routes, layouts, sidebars, and whatever other chrome your app needs.
1. Add the tutorial registry package
meteor add mdg:tutorial-registry
2. Add the desired tutorial as a package
Here is how you would add a tutorial package to your tutorial viewer app:
meteor add mdg:simple-todos-tutorial
This will include all of the content for the standard Meteor simple-todos tutorial from meteor.com.
2. Access the metadata
If you run your app, you should be able to access the TutorialRegistry.tutorials
object from the console. At this point, it should have one key: "simple-todos", which contains all of the metadata for that tutorial.
3. Convert the metadata into routes
// XXX should this be a tutorial???? is this self-hosting yet..