Skip to content
This repository was archived by the owner on Dec 13, 2021. It is now read-only.

Commit 7b21bc9

Browse files
committed
fix: route object properties
1 parent 995734a commit 7b21bc9

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
- [Features](#features)
99
- [Usage](#usage)
1010
- [Install](#install)
11+
- [⚠️Route object properties](#⚠️Route-object-properties)
1112
- [Use with Gitalk](#use-in-gitalk)
1213
- [Use with Valine](#use-in-valine)
1314
- [Hide comment](#how-to-hide-page-comment)
@@ -43,6 +44,13 @@ With `cnpm`:
4344
cnpm i --save vuepress-plugin-comment
4445
```
4546

47+
48+
### ⚠️Route object properties
49+
50+
**Don't use `window` object directly to get route information**.
51+
52+
Plugin has registered correct route information in `frontmatter.to` object and `frontmatter.from` object. Their properties are the same as [vue-router's route object](https://router.vuejs.org/api/#route-object-properties).
53+
4654
### Use in Gitalk
4755

4856
The `options` is exactly the same as `Gitalk` configuration.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vuepress-plugin-comment",
3-
"version": "0.7.0",
3+
"version": "0.7.1",
44
"description": "Support popluar comment plugins in Vuepress, sucn as Gitalk, Valine, Disqus.",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)