You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/dummy/app/templates/docs/quickstart.md
+25-14Lines changed: 25 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,10 +2,16 @@
2
2
3
3
## 1. Install AddonDocs
4
4
5
-
```
5
+
```sh
6
6
ember install ember-cli-addon-docs
7
7
```
8
8
9
+
[Ember Data](https://github.com/emberjs/data) is a required peer dependency, so if you're not already using it in your addon, you'll need to install it.
10
+
11
+
```sh
12
+
ember install ember-data
13
+
```
14
+
9
15
## 2. Install ember-cli-addon-docs-yuidoc
10
16
11
17
API docs are autogenerated from comments in your source code, and require an additional plugin to be installed.
@@ -23,8 +29,8 @@ You can see an example of <DocsLink @route="sandbox.api.item" @model="components
23
29
Open `tests/dummy/app/router.js` and replace the standard EmberRouter with the AddonDocsRouter:
`<DocsHeader />` is an AddonDocs component that renders a header using data from your addon's `package.json`. It renders a homepage link, documentation link, version selector, search bar, and link to your GitHub repository. Check out <DocsLink @route="docs.components.docs-header">the guide</DocsLink> for more on the header.
@@ -59,7 +67,7 @@ At this point, fire up `ember s` and you should see your new docs site & header
59
67
AddonDocs comes with some components to help you showcase your addon. Let's add them to your dummy app's index template:
@@ -80,16 +88,17 @@ AddonDocs is unopinionated about how you style your application, so you can use
80
88
The `docs` route is the entry point for your guides and API docs. Create a new `docs.hbs` file for the `docs` route and add the `<DocsViewer />` component:
If you visit `/docs` or click the Documentation link in the header, you should see the viewer's nav on the left-hand side and an area in the center where your guides content will go.
@@ -125,6 +134,7 @@ This will generate and modify the files for your `usage` docs page.
125
134
# Usage
126
135
127
136
Usage content
137
+
128
138
</DocsSnippet>
129
139
130
140
Remember, the dummy site is a full Ember application and these components are just here to help you get going. Feel free to make other components to help you best document your library!
@@ -142,14 +152,15 @@ Just as with any Ember app, it's a good idea to add a 404 route for unmatched UR
142
152
Add the following route to the end of your router and create the associated template.
0 commit comments