To define a name, steps, and other metadata for a packaged tutorial, use the mdg:tutorial-registry
package.
1api.use("mdg:tutorial-registry");
Now, when the package is added to a tutorial registry compatible app, it will automatically integrate by generating routes, pages, etc. for your tutorial.
Usage for a tutorial author
- Make your tutorial package depend on
mdg:tutorial-registry
- In your package code, register a tutorial in the following way:
1TutorialRegistry.registerTutorial({ 2 title: "Simple Todos React", 3 subtitle: "Learn how to make a simple todo app using Meteor", 4 slug: "simple-todos-react", // must be unique, used in URLs 5 tutorialSourceLink: "github.com/meteor/tutorials/content/angular", 6 steps: [ 7 { 8 title: "Creating an app", 9 slug: "creating-an-app", // must be unique, used in URLs 10 template: "simple-todos-react-step01" 11 ] 12});
You can add additional fields, but the fields above are
Usage for tutorial app builder
If you want to build an app where people can submit tutorials in the form of packages, you should add the package to your app:
meteor add mdg:tutorial-registry
Access the dictionary of available tutorials on the TutorialRegistry.tutorials
object.