Skip to content

ランタイム API の例

このページでは、VitePress が提供するランタイム API の一部の使い方を紹介します。

メインの useData() API を使うと、現在のページのサイト・テーマ・ページデータにアクセスできます。.md ファイルと .vue ファイルの両方で動作します:

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

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

## 結果

### テーマデータ
<pre>{{ theme }}</pre>

### ページデータ
<pre>{{ page }}</pre>

### ページのフロントマター
<pre>{{ frontmatter }}</pre>

結果

テーマデータ

{
  "teekTheme": true,
  "teekHome": false,
  "topArticle": {
    "enabled": false
  },
  "category": {
    "enabled": false
  },
  "tag": {
    "enabled": false
  },
  "friendLink": {
    "enabled": false
  },
  "docAnalysis": {
    "enabled": false
  },
  "footerInfo": {
    "topMessage": [
      ""
    ],
    "bottomMessage": [
      ""
    ],
    "theme": {
      "show": true,
      "name": "卡哇伊姆姆",
      "link": "https://muloli.cn"
    },
    "copyright": {
      "show": true,
      "createYear": 2026,
      "suffix": "可能过分"
    },
    "icpRecord": {
      "name": "皖ICP备2026008715号",
      "link": "http://beian.miit.gov.cn/"
    },
    "securityRecord": {
      "name": "",
      "link": ""
    }
  },
  "socialLinks": [
    {
      "icon": "github",
      "link": "https://github.com/vuejs/vitepress"
    }
  ],
  "locales": {
    "root": {
      "nav": [
        {
          "text": "首页",
          "link": "/"
        },
        {
          "text": "示例",
          "link": "/markdown-examples"
        }
      ],
      "sidebar": [
        {
          "text": "示例",
          "items": [
            {
              "text": "Markdown 示例",
              "link": "/markdown-examples"
            },
            {
              "text": "API 示例",
              "link": "/api-examples"
            }
          ]
        }
      ]
    },
    "en": {
      "nav": [
        {
          "text": "Home",
          "link": "/en/"
        },
        {
          "text": "Examples",
          "link": "/en/markdown-examples"
        }
      ],
      "sidebar": [
        {
          "text": "Examples",
          "items": [
            {
              "text": "Markdown Examples",
              "link": "/en/markdown-examples"
            },
            {
              "text": "Runtime API Examples",
              "link": "/en/api-examples"
            }
          ]
        }
      ]
    },
    "ja": {
      "nav": [
        {
          "text": "ホーム",
          "link": "/ja/"
        },
        {
          "text": "例",
          "link": "/ja/markdown-examples"
        }
      ],
      "sidebar": [
        {
          "text": "例",
          "items": [
            {
              "text": "Markdown の例",
              "link": "/ja/markdown-examples"
            },
            {
              "text": "API ランタイムの例",
              "link": "/ja/api-examples"
            }
          ]
        }
      ]
    }
  },
  "permalinks": {
    "map": {},
    "inv": {}
  },
  "catalogues": {
    "arr": [],
    "map": {},
    "inv": {}
  },
  "posts": {
    "allPosts": [
      {
        "url": "/api-examples.html",
        "relativePath": "/api-examples.html",
        "frontmatter": {
          "outline": "deep"
        },
        "title": "这是一个标题",
        "date": "2026-08-24 20:26:48",
        "capture": "这是一个标题\n这里什么都没有"
      },
      {
        "url": "/en/api-examples.html",
        "relativePath": "/en/api-examples.html",
        "frontmatter": {
          "outline": "deep"
        },
        "title": "Runtime API Examples",
        "date": "2026-08-24 20:26:56",
        "capture": "Runtime API Examples\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe 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:\n```md\n&lt;script setup\nimport { useData } from 'vitepress'\ncon"
      },
      {
        "url": "/en/",
        "relativePath": "/en/",
        "frontmatter": {
          "layout": "home",
          "hero": {
            "name": "Kawaii Mumu",
            "text": "A cozy nest to showcase and share",
            "tagline": "Welcome to Mumu's home — a warm, fluffy place full of everyday moments.",
            "actions": [
              {
                "theme": "brand",
                "text": "Markdown Examples",
                "link": "/en/markdown-examples"
              },
              {
                "theme": "alt",
                "text": "API Examples",
                "link": "/en/api-examples"
              }
            ]
          },
          "features": [
            {
              "title": "Adorable Photos",
              "details": "Share Mumu's everyday photos and heartwarming moments."
            },
            {
              "title": "Careful Records",
              "details": "Document the cat's growth, habits, and fun little stories."
            },
            {
              "title": "Warm Community",
              "details": "Connect with fellow cat lovers and share simple joys."
            }
          ]
        },
        "title": "en",
        "date": "2026-08-24 20:26:53",
        "capture": ""
      },
      {
        "url": "/en/markdown-examples.html",
        "relativePath": "/en/markdown-examples.html",
        "frontmatter": {},
        "title": "Markdown Extension Examples",
        "date": "2026-08-24 20:26:55",
        "capture": "This page demonstrates some of the built-in markdown extensions provided by VitePress.\n Syntax Highlighting\nVitePress provides Syntax Highlighting powered by Shiki, with additional features like line-highlighting:\nInput\n````md\n```js{4}\nexport default {\n  data () {\n    return {\n      msg: 'Highlighte"
      },
      {
        "url": "/",
        "relativePath": "/",
        "frontmatter": {
          "layout": "home",
          "hero": {
            "name": "卡哇伊姆姆",
            "text": "一个展示和分享的猫窝",
            "tagline": null,
            "actions": [
              {
                "theme": "brand",
                "text": "测试",
                "link": "/markdown-examples"
              },
              {
                "theme": "alt",
                "text": "测试",
                "link": "/api-examples"
              }
            ]
          },
          "features": [
            {
              "title": null,
              "details": null
            }
          ]
        },
        "title": "",
        "date": "2026-08-24 20:26:46",
        "capture": ""
      },
      {
        "url": "/ja/api-examples.html",
        "relativePath": "/ja/api-examples.html",
        "frontmatter": {
          "outline": "deep"
        },
        "title": "ランタイム API の例",
        "date": "2026-08-24 20:27:04",
        "capture": "ランタイム API の例\nこのページでは、VitePress が提供するランタイム API の一部の使い方を紹介します。\nメインの `useData()` API を使うと、現在のページのサイト・テーマ・ページデータにアクセスできます。`.md` ファイルと `.vue` ファイルの両方で動作します:\n```md\n&lt;script setup\nimport { useData } from 'vitepress'\nconst { theme, page, frontmatter } = useData()\n&lt;/script&gt;\n 結果\n テーマデータ\n&lt;pre&gt;{{ "
      },
      {
        "url": "/ja/",
        "relativePath": "/ja/",
        "frontmatter": {
          "layout": "home",
          "hero": {
            "name": "カワイイムム",
            "text": "展示と共有のための猫の巣",
            "tagline": "ムムの家へようこそ。温かくてふわふわの日常をここに集めています。",
            "actions": [
              {
                "theme": "brand",
                "text": "Markdown の例",
                "link": "/ja/markdown-examples"
              },
              {
                "theme": "alt",
                "text": "API の例",
                "link": "/ja/api-examples"
              }
            ]
          },
          "features": [
            {
              "title": "可愛い写真",
              "details": "ムムの日常の写真と心温まる瞬間を共有します。"
            },
            {
              "title": "丁寧な記録",
              "details": "猫の成長・癖・楽しいエピソードを記録します。"
            },
            {
              "title": "温かいコミュニティ",
              "details": "猫好きの仲間と交流し、ささやかな喜びを分かち合いましょう。"
            }
          ]
        },
        "title": "ja",
        "date": "2026-08-24 20:27:01",
        "capture": ""
      },
      {
        "url": "/ja/markdown-examples.html",
        "relativePath": "/ja/markdown-examples.html",
        "frontmatter": {},
        "title": "Markdown 拡張の例",
        "date": "2026-08-24 20:27:03",
        "capture": "このページでは、VitePress が提供する組み込みの Markdown 拡張機能の一部を紹介します。\n シンタックスハイライト\nVitePress は Shiki によるシンタックスハイライトを提供し、行ハイライトなどの追加機能を備えています:\n入力\n````md\n```js{4}\nexport default {\n  data () {\n    return {\n      msg: 'Highlighted!'\n    }\n  }\n}\n```\n````\n出力\n```js{4}\nexport default {\n  data () {\n    return {\n      msg: 'H"
      },
      {
        "url": "/markdown-examples.html",
        "relativePath": "/markdown-examples.html",
        "frontmatter": {},
        "title": "喵喵喵",
        "date": "2026-08-24 20:26:47",
        "capture": ""
      }
    ],
    "originPosts": [
      {
        "url": "/api-examples.html",
        "relativePath": "/api-examples.html",
        "frontmatter": {
          "outline": "deep"
        },
        "title": "这是一个标题",
        "date": "2026-08-24 20:26:48",
        "capture": "这是一个标题\n这里什么都没有"
      },
      {
        "url": "/en/api-examples.html",
        "relativePath": "/en/api-examples.html",
        "frontmatter": {
          "outline": "deep"
        },
        "title": "Runtime API Examples",
        "date": "2026-08-24 20:26:56",
        "capture": "Runtime API Examples\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe 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:\n```md\n&lt;script setup\nimport { useData } from 'vitepress'\ncon"
      },
      {
        "url": "/en/markdown-examples.html",
        "relativePath": "/en/markdown-examples.html",
        "frontmatter": {},
        "title": "Markdown Extension Examples",
        "date": "2026-08-24 20:26:55",
        "capture": "This page demonstrates some of the built-in markdown extensions provided by VitePress.\n Syntax Highlighting\nVitePress provides Syntax Highlighting powered by Shiki, with additional features like line-highlighting:\nInput\n````md\n```js{4}\nexport default {\n  data () {\n    return {\n      msg: 'Highlighte"
      },
      {
        "url": "/ja/api-examples.html",
        "relativePath": "/ja/api-examples.html",
        "frontmatter": {
          "outline": "deep"
        },
        "title": "ランタイム API の例",
        "date": "2026-08-24 20:27:04",
        "capture": "ランタイム API の例\nこのページでは、VitePress が提供するランタイム API の一部の使い方を紹介します。\nメインの `useData()` API を使うと、現在のページのサイト・テーマ・ページデータにアクセスできます。`.md` ファイルと `.vue` ファイルの両方で動作します:\n```md\n&lt;script setup\nimport { useData } from 'vitepress'\nconst { theme, page, frontmatter } = useData()\n&lt;/script&gt;\n 結果\n テーマデータ\n&lt;pre&gt;{{ "
      },
      {
        "url": "/ja/markdown-examples.html",
        "relativePath": "/ja/markdown-examples.html",
        "frontmatter": {},
        "title": "Markdown 拡張の例",
        "date": "2026-08-24 20:27:03",
        "capture": "このページでは、VitePress が提供する組み込みの Markdown 拡張機能の一部を紹介します。\n シンタックスハイライト\nVitePress は Shiki によるシンタックスハイライトを提供し、行ハイライトなどの追加機能を備えています:\n入力\n````md\n```js{4}\nexport default {\n  data () {\n    return {\n      msg: 'Highlighted!'\n    }\n  }\n}\n```\n````\n出力\n```js{4}\nexport default {\n  data () {\n    return {\n      msg: 'H"
      },
      {
        "url": "/markdown-examples.html",
        "relativePath": "/markdown-examples.html",
        "frontmatter": {},
        "title": "喵喵喵",
        "date": "2026-08-24 20:26:47",
        "capture": ""
      }
    ],
    "sortPostsByDateAndSticky": [
      {
        "url": "/ja/api-examples.html",
        "relativePath": "/ja/api-examples.html",
        "frontmatter": {
          "outline": "deep"
        },
        "title": "ランタイム API の例",
        "date": "2026-08-24 20:27:04",
        "capture": "ランタイム API の例\nこのページでは、VitePress が提供するランタイム API の一部の使い方を紹介します。\nメインの `useData()` API を使うと、現在のページのサイト・テーマ・ページデータにアクセスできます。`.md` ファイルと `.vue` ファイルの両方で動作します:\n```md\n&lt;script setup\nimport { useData } from 'vitepress'\nconst { theme, page, frontmatter } = useData()\n&lt;/script&gt;\n 結果\n テーマデータ\n&lt;pre&gt;{{ "
      },
      {
        "url": "/ja/markdown-examples.html",
        "relativePath": "/ja/markdown-examples.html",
        "frontmatter": {},
        "title": "Markdown 拡張の例",
        "date": "2026-08-24 20:27:03",
        "capture": "このページでは、VitePress が提供する組み込みの Markdown 拡張機能の一部を紹介します。\n シンタックスハイライト\nVitePress は Shiki によるシンタックスハイライトを提供し、行ハイライトなどの追加機能を備えています:\n入力\n````md\n```js{4}\nexport default {\n  data () {\n    return {\n      msg: 'Highlighted!'\n    }\n  }\n}\n```\n````\n出力\n```js{4}\nexport default {\n  data () {\n    return {\n      msg: 'H"
      },
      {
        "url": "/en/api-examples.html",
        "relativePath": "/en/api-examples.html",
        "frontmatter": {
          "outline": "deep"
        },
        "title": "Runtime API Examples",
        "date": "2026-08-24 20:26:56",
        "capture": "Runtime API Examples\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe 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:\n```md\n&lt;script setup\nimport { useData } from 'vitepress'\ncon"
      },
      {
        "url": "/en/markdown-examples.html",
        "relativePath": "/en/markdown-examples.html",
        "frontmatter": {},
        "title": "Markdown Extension Examples",
        "date": "2026-08-24 20:26:55",
        "capture": "This page demonstrates some of the built-in markdown extensions provided by VitePress.\n Syntax Highlighting\nVitePress provides Syntax Highlighting powered by Shiki, with additional features like line-highlighting:\nInput\n````md\n```js{4}\nexport default {\n  data () {\n    return {\n      msg: 'Highlighte"
      },
      {
        "url": "/api-examples.html",
        "relativePath": "/api-examples.html",
        "frontmatter": {
          "outline": "deep"
        },
        "title": "这是一个标题",
        "date": "2026-08-24 20:26:48",
        "capture": "这是一个标题\n这里什么都没有"
      },
      {
        "url": "/markdown-examples.html",
        "relativePath": "/markdown-examples.html",
        "frontmatter": {},
        "title": "喵喵喵",
        "date": "2026-08-24 20:26:47",
        "capture": ""
      }
    ],
    "sortPostsByDate": [
      {
        "url": "/ja/api-examples.html",
        "relativePath": "/ja/api-examples.html",
        "frontmatter": {
          "outline": "deep"
        },
        "title": "ランタイム API の例",
        "date": "2026-08-24 20:27:04",
        "capture": "ランタイム API の例\nこのページでは、VitePress が提供するランタイム API の一部の使い方を紹介します。\nメインの `useData()` API を使うと、現在のページのサイト・テーマ・ページデータにアクセスできます。`.md` ファイルと `.vue` ファイルの両方で動作します:\n```md\n&lt;script setup\nimport { useData } from 'vitepress'\nconst { theme, page, frontmatter } = useData()\n&lt;/script&gt;\n 結果\n テーマデータ\n&lt;pre&gt;{{ "
      },
      {
        "url": "/ja/markdown-examples.html",
        "relativePath": "/ja/markdown-examples.html",
        "frontmatter": {},
        "title": "Markdown 拡張の例",
        "date": "2026-08-24 20:27:03",
        "capture": "このページでは、VitePress が提供する組み込みの Markdown 拡張機能の一部を紹介します。\n シンタックスハイライト\nVitePress は Shiki によるシンタックスハイライトを提供し、行ハイライトなどの追加機能を備えています:\n入力\n````md\n```js{4}\nexport default {\n  data () {\n    return {\n      msg: 'Highlighted!'\n    }\n  }\n}\n```\n````\n出力\n```js{4}\nexport default {\n  data () {\n    return {\n      msg: 'H"
      },
      {
        "url": "/en/api-examples.html",
        "relativePath": "/en/api-examples.html",
        "frontmatter": {
          "outline": "deep"
        },
        "title": "Runtime API Examples",
        "date": "2026-08-24 20:26:56",
        "capture": "Runtime API Examples\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe 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:\n```md\n&lt;script setup\nimport { useData } from 'vitepress'\ncon"
      },
      {
        "url": "/en/markdown-examples.html",
        "relativePath": "/en/markdown-examples.html",
        "frontmatter": {},
        "title": "Markdown Extension Examples",
        "date": "2026-08-24 20:26:55",
        "capture": "This page demonstrates some of the built-in markdown extensions provided by VitePress.\n Syntax Highlighting\nVitePress provides Syntax Highlighting powered by Shiki, with additional features like line-highlighting:\nInput\n````md\n```js{4}\nexport default {\n  data () {\n    return {\n      msg: 'Highlighte"
      },
      {
        "url": "/api-examples.html",
        "relativePath": "/api-examples.html",
        "frontmatter": {
          "outline": "deep"
        },
        "title": "这是一个标题",
        "date": "2026-08-24 20:26:48",
        "capture": "这是一个标题\n这里什么都没有"
      },
      {
        "url": "/markdown-examples.html",
        "relativePath": "/markdown-examples.html",
        "frontmatter": {},
        "title": "喵喵喵",
        "date": "2026-08-24 20:26:47",
        "capture": ""
      }
    ],
    "groupPostsByYear": {
      "2026 ": [
        {
          "url": "/ja/api-examples.html",
          "relativePath": "/ja/api-examples.html",
          "frontmatter": {
            "outline": "deep"
          },
          "title": "ランタイム API の例",
          "date": "2026-08-24 20:27:04",
          "capture": "ランタイム API の例\nこのページでは、VitePress が提供するランタイム API の一部の使い方を紹介します。\nメインの `useData()` API を使うと、現在のページのサイト・テーマ・ページデータにアクセスできます。`.md` ファイルと `.vue` ファイルの両方で動作します:\n```md\n&lt;script setup\nimport { useData } from 'vitepress'\nconst { theme, page, frontmatter } = useData()\n&lt;/script&gt;\n 結果\n テーマデータ\n&lt;pre&gt;{{ "
        },
        {
          "url": "/ja/markdown-examples.html",
          "relativePath": "/ja/markdown-examples.html",
          "frontmatter": {},
          "title": "Markdown 拡張の例",
          "date": "2026-08-24 20:27:03",
          "capture": "このページでは、VitePress が提供する組み込みの Markdown 拡張機能の一部を紹介します。\n シンタックスハイライト\nVitePress は Shiki によるシンタックスハイライトを提供し、行ハイライトなどの追加機能を備えています:\n入力\n````md\n```js{4}\nexport default {\n  data () {\n    return {\n      msg: 'Highlighted!'\n    }\n  }\n}\n```\n````\n出力\n```js{4}\nexport default {\n  data () {\n    return {\n      msg: 'H"
        },
        {
          "url": "/en/api-examples.html",
          "relativePath": "/en/api-examples.html",
          "frontmatter": {
            "outline": "deep"
          },
          "title": "Runtime API Examples",
          "date": "2026-08-24 20:26:56",
          "capture": "Runtime API Examples\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe 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:\n```md\n&lt;script setup\nimport { useData } from 'vitepress'\ncon"
        },
        {
          "url": "/en/markdown-examples.html",
          "relativePath": "/en/markdown-examples.html",
          "frontmatter": {},
          "title": "Markdown Extension Examples",
          "date": "2026-08-24 20:26:55",
          "capture": "This page demonstrates some of the built-in markdown extensions provided by VitePress.\n Syntax Highlighting\nVitePress provides Syntax Highlighting powered by Shiki, with additional features like line-highlighting:\nInput\n````md\n```js{4}\nexport default {\n  data () {\n    return {\n      msg: 'Highlighte"
        },
        {
          "url": "/api-examples.html",
          "relativePath": "/api-examples.html",
          "frontmatter": {
            "outline": "deep"
          },
          "title": "这是一个标题",
          "date": "2026-08-24 20:26:48",
          "capture": "这是一个标题\n这里什么都没有"
        },
        {
          "url": "/markdown-examples.html",
          "relativePath": "/markdown-examples.html",
          "frontmatter": {},
          "title": "喵喵喵",
          "date": "2026-08-24 20:26:47",
          "capture": ""
        }
      ]
    },
    "groupPostsByYearMonth": {
      "2026 ": {
        "08": [
          {
            "url": "/ja/api-examples.html",
            "relativePath": "/ja/api-examples.html",
            "frontmatter": {
              "outline": "deep"
            },
            "title": "ランタイム API の例",
            "date": "2026-08-24 20:27:04",
            "capture": "ランタイム API の例\nこのページでは、VitePress が提供するランタイム API の一部の使い方を紹介します。\nメインの `useData()` API を使うと、現在のページのサイト・テーマ・ページデータにアクセスできます。`.md` ファイルと `.vue` ファイルの両方で動作します:\n```md\n&lt;script setup\nimport { useData } from 'vitepress'\nconst { theme, page, frontmatter } = useData()\n&lt;/script&gt;\n 結果\n テーマデータ\n&lt;pre&gt;{{ "
          },
          {
            "url": "/ja/markdown-examples.html",
            "relativePath": "/ja/markdown-examples.html",
            "frontmatter": {},
            "title": "Markdown 拡張の例",
            "date": "2026-08-24 20:27:03",
            "capture": "このページでは、VitePress が提供する組み込みの Markdown 拡張機能の一部を紹介します。\n シンタックスハイライト\nVitePress は Shiki によるシンタックスハイライトを提供し、行ハイライトなどの追加機能を備えています:\n入力\n````md\n```js{4}\nexport default {\n  data () {\n    return {\n      msg: 'Highlighted!'\n    }\n  }\n}\n```\n````\n出力\n```js{4}\nexport default {\n  data () {\n    return {\n      msg: 'H"
          },
          {
            "url": "/en/api-examples.html",
            "relativePath": "/en/api-examples.html",
            "frontmatter": {
              "outline": "deep"
            },
            "title": "Runtime API Examples",
            "date": "2026-08-24 20:26:56",
            "capture": "Runtime API Examples\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe 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:\n```md\n&lt;script setup\nimport { useData } from 'vitepress'\ncon"
          },
          {
            "url": "/en/markdown-examples.html",
            "relativePath": "/en/markdown-examples.html",
            "frontmatter": {},
            "title": "Markdown Extension Examples",
            "date": "2026-08-24 20:26:55",
            "capture": "This page demonstrates some of the built-in markdown extensions provided by VitePress.\n Syntax Highlighting\nVitePress provides Syntax Highlighting powered by Shiki, with additional features like line-highlighting:\nInput\n````md\n```js{4}\nexport default {\n  data () {\n    return {\n      msg: 'Highlighte"
          },
          {
            "url": "/api-examples.html",
            "relativePath": "/api-examples.html",
            "frontmatter": {
              "outline": "deep"
            },
            "title": "这是一个标题",
            "date": "2026-08-24 20:26:48",
            "capture": "这是一个标题\n这里什么都没有"
          },
          {
            "url": "/markdown-examples.html",
            "relativePath": "/markdown-examples.html",
            "frontmatter": {},
            "title": "喵喵喵",
            "date": "2026-08-24 20:26:47",
            "capture": ""
          }
        ]
      }
    },
    "groupPosts": {
      "categories": {},
      "tags": {}
    },
    "groupCards": {
      "categories": [],
      "tags": []
    },
    "locales": {
      "en": {
        "allPosts": [
          {
            "url": "/en/api-examples.html",
            "relativePath": "/en/api-examples.html",
            "frontmatter": {
              "outline": "deep"
            },
            "title": "Runtime API Examples",
            "date": "2026-08-24 20:26:56",
            "capture": "Runtime API Examples\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe 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:\n```md\n&lt;script setup\nimport { useData } from 'vitepress'\ncon"
          },
          {
            "url": "/en/",
            "relativePath": "/en/",
            "frontmatter": {
              "layout": "home",
              "hero": {
                "name": "Kawaii Mumu",
                "text": "A cozy nest to showcase and share",
                "tagline": "Welcome to Mumu's home — a warm, fluffy place full of everyday moments.",
                "actions": [
                  {
                    "theme": "brand",
                    "text": "Markdown Examples",
                    "link": "/en/markdown-examples"
                  },
                  {
                    "theme": "alt",
                    "text": "API Examples",
                    "link": "/en/api-examples"
                  }
                ]
              },
              "features": [
                {
                  "title": "Adorable Photos",
                  "details": "Share Mumu's everyday photos and heartwarming moments."
                },
                {
                  "title": "Careful Records",
                  "details": "Document the cat's growth, habits, and fun little stories."
                },
                {
                  "title": "Warm Community",
                  "details": "Connect with fellow cat lovers and share simple joys."
                }
              ]
            },
            "title": "en",
            "date": "2026-08-24 20:26:53",
            "capture": ""
          },
          {
            "url": "/en/markdown-examples.html",
            "relativePath": "/en/markdown-examples.html",
            "frontmatter": {},
            "title": "Markdown Extension Examples",
            "date": "2026-08-24 20:26:55",
            "capture": "This page demonstrates some of the built-in markdown extensions provided by VitePress.\n Syntax Highlighting\nVitePress provides Syntax Highlighting powered by Shiki, with additional features like line-highlighting:\nInput\n````md\n```js{4}\nexport default {\n  data () {\n    return {\n      msg: 'Highlighte"
          }
        ],
        "originPosts": [
          {
            "url": "/en/api-examples.html",
            "relativePath": "/en/api-examples.html",
            "frontmatter": {
              "outline": "deep"
            },
            "title": "Runtime API Examples",
            "date": "2026-08-24 20:26:56",
            "capture": "Runtime API Examples\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe 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:\n```md\n&lt;script setup\nimport { useData } from 'vitepress'\ncon"
          },
          {
            "url": "/en/markdown-examples.html",
            "relativePath": "/en/markdown-examples.html",
            "frontmatter": {},
            "title": "Markdown Extension Examples",
            "date": "2026-08-24 20:26:55",
            "capture": "This page demonstrates some of the built-in markdown extensions provided by VitePress.\n Syntax Highlighting\nVitePress provides Syntax Highlighting powered by Shiki, with additional features like line-highlighting:\nInput\n````md\n```js{4}\nexport default {\n  data () {\n    return {\n      msg: 'Highlighte"
          }
        ],
        "sortPostsByDateAndSticky": [
          {
            "url": "/en/api-examples.html",
            "relativePath": "/en/api-examples.html",
            "frontmatter": {
              "outline": "deep"
            },
            "title": "Runtime API Examples",
            "date": "2026-08-24 20:26:56",
            "capture": "Runtime API Examples\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe 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:\n```md\n&lt;script setup\nimport { useData } from 'vitepress'\ncon"
          },
          {
            "url": "/en/markdown-examples.html",
            "relativePath": "/en/markdown-examples.html",
            "frontmatter": {},
            "title": "Markdown Extension Examples",
            "date": "2026-08-24 20:26:55",
            "capture": "This page demonstrates some of the built-in markdown extensions provided by VitePress.\n Syntax Highlighting\nVitePress provides Syntax Highlighting powered by Shiki, with additional features like line-highlighting:\nInput\n````md\n```js{4}\nexport default {\n  data () {\n    return {\n      msg: 'Highlighte"
          }
        ],
        "sortPostsByDate": [
          {
            "url": "/en/api-examples.html",
            "relativePath": "/en/api-examples.html",
            "frontmatter": {
              "outline": "deep"
            },
            "title": "Runtime API Examples",
            "date": "2026-08-24 20:26:56",
            "capture": "Runtime API Examples\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe 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:\n```md\n&lt;script setup\nimport { useData } from 'vitepress'\ncon"
          },
          {
            "url": "/en/markdown-examples.html",
            "relativePath": "/en/markdown-examples.html",
            "frontmatter": {},
            "title": "Markdown Extension Examples",
            "date": "2026-08-24 20:26:55",
            "capture": "This page demonstrates some of the built-in markdown extensions provided by VitePress.\n Syntax Highlighting\nVitePress provides Syntax Highlighting powered by Shiki, with additional features like line-highlighting:\nInput\n````md\n```js{4}\nexport default {\n  data () {\n    return {\n      msg: 'Highlighte"
          }
        ],
        "groupPostsByYear": {
          "2026 ": [
            {
              "url": "/en/api-examples.html",
              "relativePath": "/en/api-examples.html",
              "frontmatter": {
                "outline": "deep"
              },
              "title": "Runtime API Examples",
              "date": "2026-08-24 20:26:56",
              "capture": "Runtime API Examples\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe 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:\n```md\n&lt;script setup\nimport { useData } from 'vitepress'\ncon"
            },
            {
              "url": "/en/markdown-examples.html",
              "relativePath": "/en/markdown-examples.html",
              "frontmatter": {},
              "title": "Markdown Extension Examples",
              "date": "2026-08-24 20:26:55",
              "capture": "This page demonstrates some of the built-in markdown extensions provided by VitePress.\n Syntax Highlighting\nVitePress provides Syntax Highlighting powered by Shiki, with additional features like line-highlighting:\nInput\n````md\n```js{4}\nexport default {\n  data () {\n    return {\n      msg: 'Highlighte"
            }
          ]
        },
        "groupPostsByYearMonth": {
          "2026 ": {
            "08": [
              {
                "url": "/en/api-examples.html",
                "relativePath": "/en/api-examples.html",
                "frontmatter": {
                  "outline": "deep"
                },
                "title": "Runtime API Examples",
                "date": "2026-08-24 20:26:56",
                "capture": "Runtime API Examples\nThis page demonstrates usage of some of the runtime APIs provided by VitePress.\nThe 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:\n```md\n&lt;script setup\nimport { useData } from 'vitepress'\ncon"
              },
              {
                "url": "/en/markdown-examples.html",
                "relativePath": "/en/markdown-examples.html",
                "frontmatter": {},
                "title": "Markdown Extension Examples",
                "date": "2026-08-24 20:26:55",
                "capture": "This page demonstrates some of the built-in markdown extensions provided by VitePress.\n Syntax Highlighting\nVitePress provides Syntax Highlighting powered by Shiki, with additional features like line-highlighting:\nInput\n````md\n```js{4}\nexport default {\n  data () {\n    return {\n      msg: 'Highlighte"
              }
            ]
          }
        },
        "groupPosts": {
          "categories": {},
          "tags": {}
        },
        "groupCards": {
          "categories": [],
          "tags": []
        }
      },
      "ja": {
        "allPosts": [
          {
            "url": "/ja/api-examples.html",
            "relativePath": "/ja/api-examples.html",
            "frontmatter": {
              "outline": "deep"
            },
            "title": "ランタイム API の例",
            "date": "2026-08-24 20:27:04",
            "capture": "ランタイム API の例\nこのページでは、VitePress が提供するランタイム API の一部の使い方を紹介します。\nメインの `useData()` API を使うと、現在のページのサイト・テーマ・ページデータにアクセスできます。`.md` ファイルと `.vue` ファイルの両方で動作します:\n```md\n&lt;script setup\nimport { useData } from 'vitepress'\nconst { theme, page, frontmatter } = useData()\n&lt;/script&gt;\n 結果\n テーマデータ\n&lt;pre&gt;{{ "
          },
          {
            "url": "/ja/",
            "relativePath": "/ja/",
            "frontmatter": {
              "layout": "home",
              "hero": {
                "name": "カワイイムム",
                "text": "展示と共有のための猫の巣",
                "tagline": "ムムの家へようこそ。温かくてふわふわの日常をここに集めています。",
                "actions": [
                  {
                    "theme": "brand",
                    "text": "Markdown の例",
                    "link": "/ja/markdown-examples"
                  },
                  {
                    "theme": "alt",
                    "text": "API の例",
                    "link": "/ja/api-examples"
                  }
                ]
              },
              "features": [
                {
                  "title": "可愛い写真",
                  "details": "ムムの日常の写真と心温まる瞬間を共有します。"
                },
                {
                  "title": "丁寧な記録",
                  "details": "猫の成長・癖・楽しいエピソードを記録します。"
                },
                {
                  "title": "温かいコミュニティ",
                  "details": "猫好きの仲間と交流し、ささやかな喜びを分かち合いましょう。"
                }
              ]
            },
            "title": "ja",
            "date": "2026-08-24 20:27:01",
            "capture": ""
          },
          {
            "url": "/ja/markdown-examples.html",
            "relativePath": "/ja/markdown-examples.html",
            "frontmatter": {},
            "title": "Markdown 拡張の例",
            "date": "2026-08-24 20:27:03",
            "capture": "このページでは、VitePress が提供する組み込みの Markdown 拡張機能の一部を紹介します。\n シンタックスハイライト\nVitePress は Shiki によるシンタックスハイライトを提供し、行ハイライトなどの追加機能を備えています:\n入力\n````md\n```js{4}\nexport default {\n  data () {\n    return {\n      msg: 'Highlighted!'\n    }\n  }\n}\n```\n````\n出力\n```js{4}\nexport default {\n  data () {\n    return {\n      msg: 'H"
          }
        ],
        "originPosts": [
          {
            "url": "/ja/api-examples.html",
            "relativePath": "/ja/api-examples.html",
            "frontmatter": {
              "outline": "deep"
            },
            "title": "ランタイム API の例",
            "date": "2026-08-24 20:27:04",
            "capture": "ランタイム API の例\nこのページでは、VitePress が提供するランタイム API の一部の使い方を紹介します。\nメインの `useData()` API を使うと、現在のページのサイト・テーマ・ページデータにアクセスできます。`.md` ファイルと `.vue` ファイルの両方で動作します:\n```md\n&lt;script setup\nimport { useData } from 'vitepress'\nconst { theme, page, frontmatter } = useData()\n&lt;/script&gt;\n 結果\n テーマデータ\n&lt;pre&gt;{{ "
          },
          {
            "url": "/ja/markdown-examples.html",
            "relativePath": "/ja/markdown-examples.html",
            "frontmatter": {},
            "title": "Markdown 拡張の例",
            "date": "2026-08-24 20:27:03",
            "capture": "このページでは、VitePress が提供する組み込みの Markdown 拡張機能の一部を紹介します。\n シンタックスハイライト\nVitePress は Shiki によるシンタックスハイライトを提供し、行ハイライトなどの追加機能を備えています:\n入力\n````md\n```js{4}\nexport default {\n  data () {\n    return {\n      msg: 'Highlighted!'\n    }\n  }\n}\n```\n````\n出力\n```js{4}\nexport default {\n  data () {\n    return {\n      msg: 'H"
          }
        ],
        "sortPostsByDateAndSticky": [
          {
            "url": "/ja/api-examples.html",
            "relativePath": "/ja/api-examples.html",
            "frontmatter": {
              "outline": "deep"
            },
            "title": "ランタイム API の例",
            "date": "2026-08-24 20:27:04",
            "capture": "ランタイム API の例\nこのページでは、VitePress が提供するランタイム API の一部の使い方を紹介します。\nメインの `useData()` API を使うと、現在のページのサイト・テーマ・ページデータにアクセスできます。`.md` ファイルと `.vue` ファイルの両方で動作します:\n```md\n&lt;script setup\nimport { useData } from 'vitepress'\nconst { theme, page, frontmatter } = useData()\n&lt;/script&gt;\n 結果\n テーマデータ\n&lt;pre&gt;{{ "
          },
          {
            "url": "/ja/markdown-examples.html",
            "relativePath": "/ja/markdown-examples.html",
            "frontmatter": {},
            "title": "Markdown 拡張の例",
            "date": "2026-08-24 20:27:03",
            "capture": "このページでは、VitePress が提供する組み込みの Markdown 拡張機能の一部を紹介します。\n シンタックスハイライト\nVitePress は Shiki によるシンタックスハイライトを提供し、行ハイライトなどの追加機能を備えています:\n入力\n````md\n```js{4}\nexport default {\n  data () {\n    return {\n      msg: 'Highlighted!'\n    }\n  }\n}\n```\n````\n出力\n```js{4}\nexport default {\n  data () {\n    return {\n      msg: 'H"
          }
        ],
        "sortPostsByDate": [
          {
            "url": "/ja/api-examples.html",
            "relativePath": "/ja/api-examples.html",
            "frontmatter": {
              "outline": "deep"
            },
            "title": "ランタイム API の例",
            "date": "2026-08-24 20:27:04",
            "capture": "ランタイム API の例\nこのページでは、VitePress が提供するランタイム API の一部の使い方を紹介します。\nメインの `useData()` API を使うと、現在のページのサイト・テーマ・ページデータにアクセスできます。`.md` ファイルと `.vue` ファイルの両方で動作します:\n```md\n&lt;script setup\nimport { useData } from 'vitepress'\nconst { theme, page, frontmatter } = useData()\n&lt;/script&gt;\n 結果\n テーマデータ\n&lt;pre&gt;{{ "
          },
          {
            "url": "/ja/markdown-examples.html",
            "relativePath": "/ja/markdown-examples.html",
            "frontmatter": {},
            "title": "Markdown 拡張の例",
            "date": "2026-08-24 20:27:03",
            "capture": "このページでは、VitePress が提供する組み込みの Markdown 拡張機能の一部を紹介します。\n シンタックスハイライト\nVitePress は Shiki によるシンタックスハイライトを提供し、行ハイライトなどの追加機能を備えています:\n入力\n````md\n```js{4}\nexport default {\n  data () {\n    return {\n      msg: 'Highlighted!'\n    }\n  }\n}\n```\n````\n出力\n```js{4}\nexport default {\n  data () {\n    return {\n      msg: 'H"
          }
        ],
        "groupPostsByYear": {
          "2026 ": [
            {
              "url": "/ja/api-examples.html",
              "relativePath": "/ja/api-examples.html",
              "frontmatter": {
                "outline": "deep"
              },
              "title": "ランタイム API の例",
              "date": "2026-08-24 20:27:04",
              "capture": "ランタイム API の例\nこのページでは、VitePress が提供するランタイム API の一部の使い方を紹介します。\nメインの `useData()` API を使うと、現在のページのサイト・テーマ・ページデータにアクセスできます。`.md` ファイルと `.vue` ファイルの両方で動作します:\n```md\n&lt;script setup\nimport { useData } from 'vitepress'\nconst { theme, page, frontmatter } = useData()\n&lt;/script&gt;\n 結果\n テーマデータ\n&lt;pre&gt;{{ "
            },
            {
              "url": "/ja/markdown-examples.html",
              "relativePath": "/ja/markdown-examples.html",
              "frontmatter": {},
              "title": "Markdown 拡張の例",
              "date": "2026-08-24 20:27:03",
              "capture": "このページでは、VitePress が提供する組み込みの Markdown 拡張機能の一部を紹介します。\n シンタックスハイライト\nVitePress は Shiki によるシンタックスハイライトを提供し、行ハイライトなどの追加機能を備えています:\n入力\n````md\n```js{4}\nexport default {\n  data () {\n    return {\n      msg: 'Highlighted!'\n    }\n  }\n}\n```\n````\n出力\n```js{4}\nexport default {\n  data () {\n    return {\n      msg: 'H"
            }
          ]
        },
        "groupPostsByYearMonth": {
          "2026 ": {
            "08": [
              {
                "url": "/ja/api-examples.html",
                "relativePath": "/ja/api-examples.html",
                "frontmatter": {
                  "outline": "deep"
                },
                "title": "ランタイム API の例",
                "date": "2026-08-24 20:27:04",
                "capture": "ランタイム API の例\nこのページでは、VitePress が提供するランタイム API の一部の使い方を紹介します。\nメインの `useData()` API を使うと、現在のページのサイト・テーマ・ページデータにアクセスできます。`.md` ファイルと `.vue` ファイルの両方で動作します:\n```md\n&lt;script setup\nimport { useData } from 'vitepress'\nconst { theme, page, frontmatter } = useData()\n&lt;/script&gt;\n 結果\n テーマデータ\n&lt;pre&gt;{{ "
              },
              {
                "url": "/ja/markdown-examples.html",
                "relativePath": "/ja/markdown-examples.html",
                "frontmatter": {},
                "title": "Markdown 拡張の例",
                "date": "2026-08-24 20:27:03",
                "capture": "このページでは、VitePress が提供する組み込みの Markdown 拡張機能の一部を紹介します。\n シンタックスハイライト\nVitePress は Shiki によるシンタックスハイライトを提供し、行ハイライトなどの追加機能を備えています:\n入力\n````md\n```js{4}\nexport default {\n  data () {\n    return {\n      msg: 'Highlighted!'\n    }\n  }\n}\n```\n````\n出力\n```js{4}\nexport default {\n  data () {\n    return {\n      msg: 'H"
              }
            ]
          }
        },
        "groupPosts": {
          "categories": {},
          "tags": {}
        },
        "groupCards": {
          "categories": [],
          "tags": []
        }
      },
      "root": {
        "allPosts": [
          {
            "url": "/api-examples.html",
            "relativePath": "/api-examples.html",
            "frontmatter": {
              "outline": "deep"
            },
            "title": "这是一个标题",
            "date": "2026-08-24 20:26:48",
            "capture": "这是一个标题\n这里什么都没有"
          },
          {
            "url": "/",
            "relativePath": "/",
            "frontmatter": {
              "layout": "home",
              "hero": {
                "name": "卡哇伊姆姆",
                "text": "一个展示和分享的猫窝",
                "tagline": null,
                "actions": [
                  {
                    "theme": "brand",
                    "text": "测试",
                    "link": "/markdown-examples"
                  },
                  {
                    "theme": "alt",
                    "text": "测试",
                    "link": "/api-examples"
                  }
                ]
              },
              "features": [
                {
                  "title": null,
                  "details": null
                }
              ]
            },
            "title": "",
            "date": "2026-08-24 20:26:46",
            "capture": ""
          },
          {
            "url": "/markdown-examples.html",
            "relativePath": "/markdown-examples.html",
            "frontmatter": {},
            "title": "喵喵喵",
            "date": "2026-08-24 20:26:47",
            "capture": ""
          }
        ],
        "originPosts": [
          {
            "url": "/api-examples.html",
            "relativePath": "/api-examples.html",
            "frontmatter": {
              "outline": "deep"
            },
            "title": "这是一个标题",
            "date": "2026-08-24 20:26:48",
            "capture": "这是一个标题\n这里什么都没有"
          },
          {
            "url": "/markdown-examples.html",
            "relativePath": "/markdown-examples.html",
            "frontmatter": {},
            "title": "喵喵喵",
            "date": "2026-08-24 20:26:47",
            "capture": ""
          }
        ],
        "sortPostsByDateAndSticky": [
          {
            "url": "/api-examples.html",
            "relativePath": "/api-examples.html",
            "frontmatter": {
              "outline": "deep"
            },
            "title": "这是一个标题",
            "date": "2026-08-24 20:26:48",
            "capture": "这是一个标题\n这里什么都没有"
          },
          {
            "url": "/markdown-examples.html",
            "relativePath": "/markdown-examples.html",
            "frontmatter": {},
            "title": "喵喵喵",
            "date": "2026-08-24 20:26:47",
            "capture": ""
          }
        ],
        "sortPostsByDate": [
          {
            "url": "/api-examples.html",
            "relativePath": "/api-examples.html",
            "frontmatter": {
              "outline": "deep"
            },
            "title": "这是一个标题",
            "date": "2026-08-24 20:26:48",
            "capture": "这是一个标题\n这里什么都没有"
          },
          {
            "url": "/markdown-examples.html",
            "relativePath": "/markdown-examples.html",
            "frontmatter": {},
            "title": "喵喵喵",
            "date": "2026-08-24 20:26:47",
            "capture": ""
          }
        ],
        "groupPostsByYear": {
          "2026 ": [
            {
              "url": "/api-examples.html",
              "relativePath": "/api-examples.html",
              "frontmatter": {
                "outline": "deep"
              },
              "title": "这是一个标题",
              "date": "2026-08-24 20:26:48",
              "capture": "这是一个标题\n这里什么都没有"
            },
            {
              "url": "/markdown-examples.html",
              "relativePath": "/markdown-examples.html",
              "frontmatter": {},
              "title": "喵喵喵",
              "date": "2026-08-24 20:26:47",
              "capture": ""
            }
          ]
        },
        "groupPostsByYearMonth": {
          "2026 ": {
            "08": [
              {
                "url": "/api-examples.html",
                "relativePath": "/api-examples.html",
                "frontmatter": {
                  "outline": "deep"
                },
                "title": "这是一个标题",
                "date": "2026-08-24 20:26:48",
                "capture": "这是一个标题\n这里什么都没有"
              },
              {
                "url": "/markdown-examples.html",
                "relativePath": "/markdown-examples.html",
                "frontmatter": {},
                "title": "喵喵喵",
                "date": "2026-08-24 20:26:47",
                "capture": ""
              }
            ]
          }
        },
        "groupPosts": {
          "categories": {},
          "tags": {}
        },
        "groupCards": {
          "categories": [],
          "tags": []
        }
      }
    }
  }
}

ページデータ

{
  "title": "ランタイム API の例",
  "description": "",
  "frontmatter": {
    "outline": "deep"
  },
  "headers": [],
  "relativePath": "ja/api-examples.md",
  "filePath": "ja/api-examples.md"
}

ページのフロントマター

{
  "outline": "deep"
}

もっと見る

ランタイム API の完全なリスト のドキュメントを参照してください。

最近更新