Page Migration Guide
Frontmatter
Obsolete
mark
time
as deprecated, usedate
insteadmark
categories
as deprecated, usecategory
insteadmark
tags
as deprecated, usetag
instead
Changes
change
author
type fromstring | undefined
toAuthorInfo[] | AuthorInfo | string[] | string | undefined
interface AuthorInfo { /** * Author name */ name: string; /** * Author website */ url?: string; /** * Author email */ email?: string; }
This change allows you to add multiple authors and set up sites for them.
date
only supports standard DateString mark with-
change
category
type fromstring | undefined
tostring[] | string | undefined
The theme supports multiple categories.
change
pageInfo
type fromPageInfo[] | false
toArticleInfo[] | false
.Available values change from
"author"
,"time"
,"category"
,"tag"
,"reading-time"
,"word"
,"visitor"
to"Author"
,"Date"
,"Original"
,"Category"
,"Tag"
,"ReadingTime"
,"Word"
,"Visitor"
rename
sidebarDepth
toheaderDepth
rename
copyrightText
tocopyright
rename
anchorDisplay
totoc
rename
updateTime
tolastUpdated
change
prev
andnext
types fromstring | false
toAutoLinkOptions | string | false
interface AutoLinkOptions { text: string; icon: string; link: string; }
Deletion
remove
password
For security reasons, V2 removes this method of encrypting the original text of the cipher.
remove
copyright
Related plugin is not yet compatible with V2.
remove
mediaLink
Footer no longer displays media links.
Markdown
Code demo syntax changed
Before:
::: demo Title <!-- demo content --> ::: ::: demo [vue] Title <!-- demo content --> ::: ::: demo [react] Title <!-- demo content --> :::
After:
::: normal-demo Title <!-- demo content --> ::: ::: vue-demo Title <!-- demo content --> ::: ::: react-demo Title <!-- demo content --> :::
Code Group changed to code tab
Before:
:::: code-group ::: code-group-item pnpm ```bash pnpm create vuepress-theme-hope [dir] ``` ::: ::: code-group-item npm:active ```bash npm init vuepress-theme-hope@latest [dir] ``` ::: ::::
After:
::: code-tabs @tab pnpm ```bash pnpm create vuepress-theme-hope [dir] ``` @tab:active npm ```bash npm init vuepress-theme-hope@latest [dir] ``` :::
Layout
Project HomePage
Project HomePage frontmatter options are change.
- rename
title
toheroText
- rename
darkHeroImage
toheroImageDark
- rename
action
toactions