Skip to content

Commit

Permalink
docs: update tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
egoist authored Sep 13, 2019
1 parent ad9ba95 commit befa85f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions website/pages/tutorial/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ In your `./pages/index.vue`:
</template>
<script>
export const attributes = {
export const data = {
layout: 'page'
}
Expand All @@ -196,7 +196,7 @@ layout: page
I'm a cool guy from the Mars, nice to meet you folks.
```

The front matter in Markdown page and the `export const attributes` part are so called page attributes, it is a mechanism for the page component to communicate with its layout component and the layout system.
The front matter in Markdown page and the `export const data` part in `.js` and `.vue` pages are used by the page component to communicate with its layout component and the layout system.

Nice, now you achieved the same thing without repeating yourself!

Expand Down Expand Up @@ -248,7 +248,7 @@ Then tell your homepage `pages/index.vue` that it wants the post list to be inje
</template>
<script>
export const attributes = {
export const data = {
layout: 'page',
injectAllPosts: true
}
Expand Down

0 comments on commit befa85f

Please sign in to comment.