Skip to content

Runtime API Examples

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

{
  "siteTitle": "MOHANPATHI",
  "nav": [
    {
      "text": "Home",
      "link": "/"
    },
    {
      "text": "Projects",
      "items": [
        {
          "text": "🚀 QuickLinker-ZeroRPM",
          "link": "/docs/quicklinker-zeroRPM/"
        },
        {
          "text": "⚡ BrandPulse",
          "link": "/docs/brandpulse/"
        },
        {
          "text": "⚡ Chainly SDK",
          "link": "/docs/chainly-sdk/"
        },
        {
          "text": "📋 Template Generator",
          "link": "/docs/template-generator/"
        },
        {
          "text": "🛡️ Distributed Abuse Detection",
          "link": "/docs/distributed-abuse-detection/"
        },
        {
          "text": "🔐 Attestify",
          "link": "/docs/attestify/"
        }
      ]
    },
    {
      "text": "Resume",
      "link": "/resume"
    },
    {
      "text": "Contact",
      "link": "mailto:mohanpathi.dev@gmail.com"
    }
  ],
  "sidebar": {
    "/docs/quicklinker-zeroRPM/": [
      {
        "text": "QuickLinker-ZeroRPM",
        "link": "/docs/quicklinker-zeroRPM",
        "items": [
          {
            "text": "Overview",
            "link": "/docs/quicklinker-zeroRPM/overview.md"
          },
          {
            "text": "Project Details",
            "collapsed": false,
            "items": [
              {
                "text": "Introduction",
                "link": "/docs/quicklinker-zeroRPM/project-overview/introduction"
              },
              {
                "text": "Core Goals",
                "link": "/docs/quicklinker-zeroRPM/project-overview/core-goals"
              },
              {
                "text": "Roadmap",
                "link": "/docs/quicklinker-zeroRPM/project-overview/roadmap"
              }
            ]
          },
          {
            "text": "Technical Architecture",
            "collapsed": false,
            "items": [
              {
                "text": "Phase 1: Minimum Viable Scaling",
                "link": "/docs/quicklinker-zeroRPM/technical-architecture/phase-1"
              },
              {
                "text": "Phase 2: Analytics Pipeline",
                "link": "/docs/quicklinker-zeroRPM/technical-architecture/phase-2"
              },
              {
                "text": "Phase 3: Resilience Engineering",
                "link": "/docs/quicklinker-zeroRPM/technical-architecture/phase-3"
              },
              {
                "text": "Database Comparison",
                "link": "/docs/quicklinker-zeroRPM/technical-architecture/database-comparison"
              },
              {
                "text": "Hosting Options",
                "link": "/docs/quicklinker-zeroRPM/technical-architecture/hosting-options"
              }
            ]
          },
          {
            "text": "Findings",
            "collapsed": false,
            "items": [
              {
                "text": "Feasibility Analysis",
                "link": "/docs/quicklinker-zeroRPM/findings/feasibility"
              },
              {
                "text": "Cost Analysis",
                "link": "/docs/quicklinker-zeroRPM/findings/cost-analysis"
              },
              {
                "text": "SQLite & LiteFS Insights",
                "link": "/docs/quicklinker-zeroRPM/findings/sqlite-litefs"
              },
              {
                "text": "Free Hosting",
                "link": "/docs/quicklinker-zeroRPM/findings/free-hosting"
              }
            ]
          },
          {
            "text": "References",
            "link": "/docs/quicklinker-zeroRPM/references"
          }
        ]
      }
    ],
    "/docs/brandpulse/": [
      {
        "text": "BrandPulse",
        "items": [
          {
            "text": "Overview",
            "link": "/docs/brandpulse/"
          },
          {
            "text": "Problem Statement",
            "link": "/docs/brandpulse/problem-statement"
          },
          {
            "text": "Use Cases",
            "link": "/docs/brandpulse/use-cases"
          },
          {
            "text": "Technical Architecture",
            "link": "/docs/brandpulse/technical-arch"
          },
          {
            "text": "Implementation",
            "link": "/docs/brandpulse/implementation/",
            "collapsed": true,
            "items": [
              {
                "text": "Research Prototypes",
                "collapsed": true,
                "items": [
                  {
                    "text": "Data Generation",
                    "items": [
                      {
                        "text": "Overview",
                        "link": "/docs/brandpulse/implementation/research/data-generation/overview"
                      },
                      {
                        "text": "Version 1",
                        "link": "/docs/brandpulse/implementation/research/data-generation/v1"
                      },
                      {
                        "text": "Version 2",
                        "link": "/docs/brandpulse/implementation/research/data-generation/v2"
                      },
                      {
                        "text": "Version 3",
                        "link": "/docs/brandpulse/implementation/research/data-generation/v3"
                      },
                      {
                        "text": "Version 4",
                        "link": "/docs/brandpulse/implementation/research/data-generation/v4"
                      },
                      {
                        "text": "Version 5",
                        "link": "/docs/brandpulse/implementation/research/data-generation/v5"
                      }
                    ]
                  },
                  {
                    "text": "Data Ingestion",
                    "items": [
                      {
                        "text": "Overview",
                        "link": "/docs/brandpulse/implementation/research/data-ingestion/overview"
                      }
                    ]
                  }
                ]
              },
              {
                "text": "Producer",
                "link": "/docs/brandpulse/implementation/producer"
              },
              {
                "text": "Consumer",
                "link": "/docs/brandpulse/implementation/consumer"
              },
              {
                "text": "Sentiment Analysis",
                "link": "/docs/brandpulse/implementation/sentiment-analysis"
              },
              {
                "text": "InfluxDB Integration",
                "link": "/docs/brandpulse/implementation/influxdb"
              },
              {
                "text": "Performance Optimization",
                "link": "/docs/brandpulse/implementation/performance"
              },
              {
                "text": "Issues Faced",
                "link": "/docs/brandpulse/implementation/issues-faced"
              },
              {
                "text": "Lessons Learned",
                "link": "/docs/brandpulse/implementation/lessons-learned"
              }
            ]
          },
          {
            "text": "Value Proposition",
            "link": "/docs/brandpulse/value-prop"
          },
          {
            "text": "Future Enhancements",
            "link": "/docs/brandpulse/future-enhancements"
          },
          {
            "text": "Why It Rocks",
            "link": "/docs/brandpulse/why-it-rocks"
          },
          {
            "text": "Demo",
            "link": "/docs/brandpulse/demo"
          }
        ]
      }
    ],
    "/docs/chainly-sdk/": [
      {
        "text": "Chainly SDK",
        "items": [
          {
            "text": "Overview",
            "link": "/docs/chainly-sdk/"
          },
          {
            "text": "Technical Architecture",
            "link": "/docs/chainly-sdk/architecture"
          },
          {
            "text": "Implementation Guide",
            "link": "/docs/chainly-sdk/implementation"
          },
          {
            "text": "API Reference",
            "link": "/docs/chainly-sdk/api-reference"
          },
          {
            "text": "Examples & Tutorials",
            "link": "/docs/chainly-sdk/examples"
          }
        ]
      }
    ],
    "/docs/template-generator/": [
      {
        "text": "Template Generator",
        "items": [
          {
            "text": "Overview",
            "link": "/docs/template-generator/"
          },
          {
            "text": "Technical Architecture",
            "link": "/docs/template-generator/architecture"
          },
          {
            "text": "Implementation Guide",
            "link": "/docs/template-generator/implementation"
          },
          {
            "text": "Demo & Examples",
            "link": "/docs/template-generator/demo"
          }
        ]
      }
    ],
    "/docs/distributed-abuse-detection/": [
      {
        "text": "Abuse Detection System",
        "items": [
          {
            "text": "Overview",
            "link": "/docs/distributed-abuse-detection/"
          },
          {
            "text": "Technical Architecture",
            "link": "/docs/distributed-abuse-detection/architecture"
          },
          {
            "text": "Implementation Details",
            "link": "/docs/distributed-abuse-detection/implementation"
          },
          {
            "text": "Performance Analysis",
            "link": "/docs/distributed-abuse-detection/performance"
          },
          {
            "text": "Deployment Guide",
            "link": "/docs/distributed-abuse-detection/deployment"
          }
        ]
      }
    ],
    "/docs/attestify/": [
      {
        "text": "Attestation SDK",
        "items": [
          {
            "text": "Overview",
            "link": "/docs/attestify/"
          },
          {
            "text": "Technical Architecture",
            "link": "/docs/attestify/tech-architecture"
          },
          {
            "text": "Use Cases",
            "link": "/docs/attestify/usecases"
          },
          {
            "text": "Implementation",
            "link": "/docs/attestify/implementation"
          },
          {
            "text": "Demo",
            "link": "/docs/attestify/demo"
          }
        ]
      }
    ],
    "/": [
      {
        "text": "Welcome",
        "items": [
          {
            "text": "Home",
            "link": "/"
          },
          {
            "text": "Projects",
            "link": "/projects"
          }
        ]
      }
    ]
  },
  "footer": {
    "message": "Built with precision engineering and innovative solutions.",
    "copyright": "Copyright © 2025 Mohanpathi. All rights reserved."
  },
  "socialLinks": [
    {
      "icon": "github",
      "link": "https://github.com/STarLo-rd"
    },
    {
      "icon": "linkedin",
      "link": "https://linkedin.com/in/mohanpathi"
    },
    {
      "icon": "twitter",
      "link": "https://twitter.com/mohanpathi"
    }
  ],
  "search": {
    "provider": "local"
  },
  "lastUpdated": {
    "text": "Updated at",
    "formatOptions": {
      "dateStyle": "short",
      "timeStyle": "medium"
    }
  }
}

Page Data

{
  "title": "Runtime API Examples",
  "description": "",
  "frontmatter": {
    "outline": "deep"
  },
  "headers": [],
  "relativePath": "api-examples.md",
  "filePath": "api-examples.md",
  "lastUpdated": 1740768728000
}

Page Frontmatter

{
  "outline": "deep"
}

More

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

Built with precision engineering and innovative solutions.