Skip to content

精华对照表

This page demonstrates usage of some of the runtime APIs provided by VitePress.

The main useData() API can be used to access site, theme, and page data for the current page. It works in both .md and .vue files:

md
<script setup>
import { useData } from 'vitepress'

const { theme, page, frontmatter } = useData()
</script>

## Results

### Theme Data
<pre>{{ theme }}</pre>

### Page Data
<pre>{{ page }}</pre>

### Page Frontmatter
<pre>{{ frontmatter }}</pre>

Results

Theme Data

{
  "lastUpdated": {
    "text": "最后更新于",
    "formatOptions": {
      "dateStyle": "short",
      "timeStyle": "medium"
    }
  },
  "docFooter": {
    "prev": "上一页",
    "next": "下一页"
  },
  "sidebarMenuLabel": "目录",
  "returnToTopLabel": "返回顶部",
  "outlineTitle": "大纲",
  "search": {
    "provider": "local"
  },
  "logo": "/logo.ico",
  "nav": [
    {
      "text": "Home",
      "link": "/main_page"
    },
    {
      "text": "参数调整清单",
      "link": "/attribute_list"
    }
  ],
  "sidebar": [
    {
      "text": "主要内容",
      "items": [
        {
          "text": "前言",
          "link": "/main_page"
        },
        {
          "text": "参数调整清单",
          "link": "/attribute_list"
        },
        {
          "text": "精华对照表",
          "link": "/essence_list"
        },
        {
          "text": "记忆对照表",
          "link": "/memories_list"
        },
        {
          "text": "禁用精华/记忆表",
          "link": "/disable_list"
        },
        {
          "text": "初始添加表",
          "link": "/initial_add_list"
        }
      ]
    },
    {
      "text": "测试内容",
      "items": [
        {
          "text": "简单自定义",
          "link": "/mod_customize"
        },
        {
          "text": "更新日志",
          "link": "/update_log"
        },
        {
          "text": "时间线",
          "link": "/timeline"
        }
      ]
    },
    {
      "text": "Examples",
      "items": [
        {
          "text": "Markdown Examples",
          "link": "/markdown-examples"
        },
        {
          "text": "Runtime API Examples",
          "link": "/api-examples"
        }
      ]
    }
  ],
  "socialLinks": [
    {
      "icon": "github",
      "link": "https://github.com/a190141074/Shape_of_Dreams_Mod_Library"
    }
  ]
}

Page Data

{
  "title": "精华对照表",
  "description": "",
  "frontmatter": {
    "outline": "deep"
  },
  "headers": [],
  "relativePath": "api-examples.md",
  "filePath": "api-examples.md",
  "lastUpdated": null
}

Page Frontmatter

{
  "outline": "deep"
}

More

Check out the documentation for the full list of runtime APIs.