Skip to content

Commit e9ffc3d

Browse files
authored
Document API doc generator plugins
1 parent 3e1940d commit e9ffc3d

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

tests/dummy/app/pods/docs/quickstart/template.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,18 @@ marketing/demo page you can use to promote your addon.
1010
```
1111
ember install ember-cli-addon-docs
1212
```
13+
14+
2. **Install an API doc plugin.** API docs are autogenerated from comments in your source code. Depending on which style you'll be using ([ESDoc](https://esdoc.org/) or [YUIDoc](http://yui.github.io/yuidoc/)), install the corresponding addon-docs plugin.
1315

14-
2. **Add the docs routes.** Open `tests/dummy/app/router.js` and replace the
16+
```
17+
# ESDoc
18+
ember install ember-cli-addon-docs-esdoc
19+
20+
# YUIDoc
21+
ember install ember-cli-addon-docs-yuidoc
22+
```
23+
24+
3. **Add the docs routes.** Open `tests/dummy/app/router.js` and replace the
1525
standard EmberRouter with the AddonDocsRouter:
1626

1727
{{#docs-snippet name='quickstart-router.js' title='tests/dummy/app/router.js'}}
@@ -30,7 +40,7 @@ standard EmberRouter with the AddonDocsRouter:
3040
export default Router;
3141
{{/docs-snippet}}
3242

33-
3. **Create your docs skeleton.** Create a new template for the `docs` route
43+
4. **Create your docs skeleton.** Create a new template for the `docs` route
3444
and make sure it contains the `DocsViewer` component and navigation items for
3545
all docs pages in your site.
3646

@@ -53,7 +63,7 @@ all docs pages in your site.
5363
{{/docs-viewer}}
5464
{{/docs-snippet}}
5565

56-
4. **Create your Markdown templates.** Markdown templates contain the actual
66+
5. **Create your Markdown templates.** Markdown templates contain the actual
5767
documentation for your addon and live in the folder
5868
`tests/dummy/app/templates/docs`. Since Addon Docs supports Markdown out
5969
of the box we will create two `.md` files (one for your docs `index` and one
@@ -71,7 +81,7 @@ for the `usage` page).
7181
So easy to use, sweet!
7282
{{/docs-snippet}}
7383

74-
5. **Create your marketing homepage**. Addon Docs comes with a set of
84+
6. **Create your marketing homepage**. Addon Docs comes with a set of
7585
components that take out all the hard work normally required for creating
7686
good looking marketing/demo pages. Creating a template with the following
7787
components will instantly give your main page a header, a nice hero
@@ -93,7 +103,7 @@ and a snippet-ready demo container.
93103
{{/docs-demo}}
94104
{{/docs-snippet}}
95105

96-
6. **Add a 404 route.** Add the following route to the end of your router and
106+
7. **Add a 404 route.** Add the following route to the end of your router and
97107
create the associated template.
98108

99109
{{#docs-snippet name='quickstart-404.js' title='tests/dummy/app/router.js'}}
@@ -107,17 +117,17 @@ create the associated template.
107117
</div>
108118
{{/docs-snippet}}
109119

110-
7. **Launch your docs site**. Run `ember serve` and browse to
120+
8. **Launch your docs site**. Run `ember serve` and browse to
111121
`localhost:4200/docs` to enjoy your brand new documentation website.
112122

113-
8. **Create more pages.** To add more doc pages simply follow the same steps as
123+
9. **Create more pages.** To add more doc pages simply follow the same steps as
114124
used for the `Usage page in above examples`:
115125

116126
- create a docs subroute
117127
- add a corresponding navigation item to the `docs` template
118128
- create a corresponding Markdown template
119129

120-
## Optional
130+
## Optional steps
121131

122132
1. **Keyboard navigation.** You may want to enable keyboard navigation for your
123133
docs site by adding the `DocsKeyboardShortcuts` component to your dummy

0 commit comments

Comments
 (0)