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
{{ message }}
This repository was archived by the owner on May 13, 2024. It is now read-only.
`DirectoryPagination / Layout` means that the layout component will Will be downgraded to `Layout` when `DirectoryPagination` layout doesn't exist.
185
+
:::
186
+
183
187
So how to get the matched pages in the layout component? In fact, it will be much simpler than you think.
184
188
185
189
If you visit `/`, current page leverages layout `IndexPost`, in this layout component, you just need to use `this
@@ -270,8 +274,8 @@ layout:
270
274
| url | layout |
271
275
|---|---|
272
276
|`/tag/`|`Tag`|
273
-
|`/tag/vue/`|`FrontmatterClassifier`|
274
-
|`/tag/js/`|`FrontmatterClassifier`|
277
+
|`/tag/vue/`|`FrontmatterPagination` / `Layout`|
278
+
|`/tag/js/`|`FrontmatterPagination` / `Layout`|
275
279
276
280
In `Tags` component, you can use `this.$tag.list` to get the tag list. the value would be like:
277
281
@@ -295,9 +299,8 @@ In `Tags` component, you can use `this.$tag.list` to get the tag list. the value
295
299
]
296
300
```
297
301
298
-
In `FrontmatterClassifier` component, you can use `this.$pagination.pages` to get the matched pages in current tag
299
-
classification. And what is wonderful is that a you don't nned to card about where you are, and you'll get a very
300
-
natural experiences:
302
+
In the `FrontmatterPagination` component, you can use `this.$pagination.pages` to get the matched pages in current tag
303
+
classification:
301
304
302
305
- If you visit `/tag/vue/`, the `this.$pagination.pages` will be:
303
306
@@ -319,8 +322,13 @@ natural experiences:
319
322
320
323
## Examples
321
324
322
-
Here is [live example](https://github.com/ulivz/70-lines-of-vuepress-blog-theme) that implements a VuePress theme in around 70 lines.
325
+
Actually, there are only 2 necessary layouts components to create a blog theme:
326
+
327
+
- Layout
328
+
- Post
329
+
- Tag (Only required when you set up a `tag` frontmatter classification.)
323
330
331
+
Here is [live example](https://github.com/ulivz/70-lines-of-vuepress-blog-theme) that implements a functionally qualified VuePress theme in around 70 lines.
0 commit comments