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

{
  "footer": {
    "copyright": "Copyright © 2026 CloseX"
  },
  "nav": [
    {
      "text": "もっと",
      "items": [
        {
          "text": "プライバシーポリシー",
          "link": "/ja/privacy"
        },
        {
          "text": "リリースノート",
          "link": "/ja/release-note"
        },
        {
          "text": "ブログ",
          "link": "https://blog.closex.org"
        },
        {
          "text": "CloseX",
          "link": "https://closex.org"
        },
        {
          "text": "お問い合わせ",
          "link": "mailto:[email protected]"
        }
      ]
    }
  ],
  "search": {
    "provider": "local",
    "options": {
      "locales": {
        "zh": {
          "translations": {
            "button": {
              "buttonText": "搜索文档",
              "buttonAriaLabel": "搜索文档"
            },
            "modal": {
              "noResultsText": "无法找到相关结果",
              "resetButtonTitle": "清除查询条件",
              "footer": {
                "selectText": "选择",
                "navigateText": "切换",
                "closeText": "关闭"
              }
            }
          }
        },
        "ja": {
          "translations": {
            "button": {
              "buttonText": "文書の検索",
              "buttonAriaLabel": "文書の検索"
            },
            "modal": {
              "noResultsText": "関連する結果が見つかりませんでした",
              "resetButtonTitle": "クエリ条件をクリアする",
              "footer": {
                "selectText": "選ぶ",
                "navigateText": "スイッチ",
                "closeText": "閉鎖"
              }
            }
          }
        }
      }
    }
  },
  "logo": "/img/logo.webp",
  "sidebar": {
    "/ja/launchnext/": [
      {
        "text": "LaunchNext",
        "items": [
          {
            "text": "概要",
            "link": "/ja/launchnext/"
          },
          {
            "text": "はじめに",
            "link": "/ja/launchnext/getting-started"
          },
          {
            "text": "設定",
            "link": "/ja/launchnext/settings/"
          },
          {
            "text": "CLI と TUI",
            "link": "/ja/launchnext/cli-and-tui"
          },
          {
            "text": "更新とトラブルシューティング",
            "link": "/ja/launchnext/updates-and-troubleshooting"
          }
        ]
      },
      {
        "text": "設定タブ",
        "items": [
          {
            "text": "一般",
            "link": "/ja/launchnext/settings/general"
          },
          {
            "text": "外観",
            "link": "/ja/launchnext/settings/appearance"
          },
          {
            "text": "パフォーマンス",
            "link": "/ja/launchnext/settings/performance"
          },
          {
            "text": "タイトル",
            "link": "/ja/launchnext/settings/titles"
          },
          {
            "text": "アプリソース",
            "link": "/ja/launchnext/settings/app-sources"
          },
          {
            "text": "非表示アプリ",
            "link": "/ja/launchnext/settings/hidden-apps"
          },
          {
            "text": "アンインストール",
            "link": "/ja/launchnext/settings/uninstall"
          },
          {
            "text": "ショートカットとジェスチャ",
            "link": "/ja/launchnext/settings/shortcuts"
          },
          {
            "text": "バックアップ",
            "link": "/ja/launchnext/settings/backup"
          },
          {
            "text": "開発",
            "link": "/ja/launchnext/settings/development"
          },
          {
            "text": "サウンド",
            "link": "/ja/launchnext/settings/sound"
          },
          {
            "text": "ゲームコントローラー",
            "link": "/ja/launchnext/settings/game-controller"
          }
        ]
      }
    ],
    "/ja/": [
      {
        "text": "プロジェクト",
        "collapsed": true,
        "items": [
          {
            "text": "LaunchNext",
            "link": "/ja/launchnext/"
          },
          {
            "text": "TranslateNext",
            "link": "/ja/translatenext/"
          },
          {
            "text": "WhisperNext",
            "link": "/ja/whispernext/"
          },
          {
            "text": "SeeNext",
            "link": "/ja/seenext/"
          }
        ]
      },
      {
        "text": "LaunchNext 設定",
        "collapsed": true,
        "items": [
          {
            "text": "タイトル",
            "link": "/ja/launchnext/settings/titles"
          },
          {
            "text": "非表示アプリ",
            "link": "/ja/launchnext/settings/hidden-apps"
          },
          {
            "text": "アンインストール",
            "link": "/ja/launchnext/settings/uninstall"
          },
          {
            "text": "ショートカットとジェスチャ",
            "link": "/ja/launchnext/settings/shortcuts"
          },
          {
            "text": "サウンド",
            "link": "/ja/launchnext/settings/sound"
          },
          {
            "text": "ゲームコントローラー",
            "link": "/ja/launchnext/settings/game-controller"
          }
        ]
      },
      {
        "text": "LaunchNext 上級",
        "collapsed": true,
        "items": [
          {
            "text": "LaunchNext 概要",
            "link": "/ja/launchnext/"
          },
          {
            "text": "LaunchNext 設定",
            "link": "/ja/launchnext/settings-guide"
          },
          {
            "text": "LaunchNext 設定マップ",
            "link": "/ja/launchnext/settings-overview"
          },
          {
            "text": "LaunchNext バックアップと復元",
            "link": "/ja/launchnext/backup-and-restore"
          },
          {
            "text": "LaunchNext 更新",
            "link": "/ja/launchnext/updates-and-troubleshooting"
          },
          {
            "text": "LaunchNext 開発",
            "link": "/ja/launchnext/settings/development"
          }
        ]
      }
    ]
  },
  "outline": {
    "label": "ページナビゲーション"
  },
  "docFooter": {
    "prev": "前のページ",
    "next": "次のページ"
  },
  "lastUpdated": {
    "text": "最終更新",
    "formatOptions": {
      "dateStyle": "short",
      "timeStyle": "medium"
    }
  },
  "langMenuLabel": "言語",
  "returnToTopLabel": "トップに戻る",
  "sidebarMenuLabel": "メニュー",
  "darkModeSwitchLabel": "テーマ",
  "lightModeSwitchTitle": "ライトモードに切り替え",
  "darkModeSwitchTitle": "ダークモードに切り替え"
}

Page Data

{
  "title": "リソース",
  "description": "",
  "frontmatter": {
    "outline": false,
    "sidebar": false,
    "aside": false
  },
  "headers": [],
  "relativePath": "ja/resources.md",
  "filePath": "ja/resources.md"
}

Page Frontmatter

{
  "outline": false,
  "sidebar": false,
  "aside": false
}

More

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