Skip to content

Conversation

@Jinjiang
Copy link
Member

No description provided.

@Jinjiang Jinjiang requested a review from sdras March 19, 2018 06:31
}
}
</script>
Display the result
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The text "Display the result" seems meaningless so I removed it.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed

Then create `components/BlogHome.vue` which will be your blog homepage that lists your most recent posts.

```javascript
```html
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code snippet seems should be used with Vue syntax, not JavaScript. And as the vue syntax is not supported in Hexo, so I changed it into html as a downgrade syntax.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh, interesting

page: 1,
page_size: 10
}).then((res) => {
// console.log(res.data)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessary because it has a real job to do below, so removed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea.

order: 5
---

# Create a CMS-Powered Blog Using Vue.js
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicated with the title in the metadata. So removed.

<div id="blog-home">
<h1>{{ page_title }}</h1>
<!-- Create v-for and apply a key for Vue. Example is using a combination of the slug and index -->
<!-- Create `v-for` and apply a `key` for Vue. Here is using a combination of the slug and index. -->
Copy link
Member

@sdras sdras Mar 19, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Here is using" isn't grammatically correct. It should either be "This example is..." or "Here we are using"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done for this. 👌

One thing to note when using routes with params is that when the user navigates from `/blog/foo` to `/blog/bar`, the same component instance will be reused. Since both routes render the same component, this is more efficient than destroying the old instance and then creating a new one.

<p class="tip">Be aware, that using the component this way will mean that the lifecycle hooks of the component will not be called. Visit the Vue.js docs to learn more about [Dynamic Route Matching](https://router.vuejs.org/en/essentials/dynamic-matching.html)</p>
<p class="tip">Be aware, that using the component this way will mean that the lifecycle hooks of the component will not be called. Visit the Vue Router's docs to learn more about [Dynamic Route Matching](https://router.vuejs.org/en/essentials/dynamic-matching.html)</p>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch.

@sdras
Copy link
Member

sdras commented Mar 19, 2018

There's only one change needed, otherwise, all great changes, thank you!

@sdras
Copy link
Member

sdras commented Mar 19, 2018

Perfect, thanks!

@sdras sdras merged commit 89bd092 into vuejs:master Mar 19, 2018
@Jinjiang Jinjiang deleted the typo branch March 19, 2018 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants