Skip to content
Rahul Kewat
Main Navigation Home
All free tools
Website Builder
Best ToolsFreelancing

Appearance

Sidebar Navigation

Services

Consulting

Workshops

On this page

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 ​

{
  "logo": "/rahulkewat_logo.png",
  "nav": [
    {
      "text": "Home",
      "link": "/"
    },
    {
      "text": "Free Tools",
      "items": [
        {
          "text": "All free tools",
          "link": "/free-tools/"
        },
        {
          "text": "Website Builder",
          "link": "/free-tools/website-builder"
        }
      ]
    },
    {
      "text": "Best Tools",
      "link": "/best-tools/"
    },
    {
      "text": "Freelancing",
      "link": "/freelancing/"
    }
  ],
  "sidebar": {
    "/freelancing/": [
      {
        "items": [
          {
            "text": "What is freelancing",
            "link": "/freelancing/what-is-freelancing"
          },
          {
            "text": "How top 3% are making it",
            "link": "/freelancing/how-top-3-percent-making-it"
          },
          {
            "text": "Rewarding career path",
            "link": "/freelancing/rewarding-career-path"
          }
        ]
      },
      {
        "text": "Introduction & Mindset",
        "collapsible": true,
        "collapsed": true,
        "items": [
          {
            "items": [
              {
                "text": "My Freelancing Journey - From $0 to $100k",
                "link": "/freelancing/my-freelancing-journey"
              },
              {
                "text": "The Mindset Shift - Thinking Like an Entrepreneur",
                "link": "/freelancing/the-mindset-shift"
              },
              {
                "text": "Setting Goals - The Roadmap to Success",
                "link": "/freelancing/setting-goals"
              },
              {
                "text": "Overcoming Self-Doubt - Your Biggest Barrier",
                "link": "/freelancing/overcoming-self-doubt"
              },
              {
                "text": "Building a Success Routine",
                "link": "/freelancing/building-a-success-routine"
              },
              {
                "text": "Embracing the Freelancing Lifestyle",
                "link": "/freelancing/embracing-the-freelancing-lifestyle"
              },
              {
                "text": "Summary of Week 1 - Laying the Foundation",
                "link": "/freelancing/laying-the-foundation"
              }
            ]
          }
        ]
      },
      {
        "text": "Setting Up for Success",
        "collapsible": true,
        "collapsed": true,
        "items": [
          {
            "items": [
              {
                "text": "Finding Your Niche - Why It Matters",
                "link": "/freelancing/finding-your-niche"
              },
              {
                "text": "Creating a Standout Profile - Your First Impression",
                "link": "/freelancing/creating-a-standout-profile"
              },
              {
                "text": "Crafting a Winning Portfolio",
                "link": "/freelancing/creating-a-winning-portfolio"
              },
              {
                "text": "The Art of Writing Proposals",
                "link": "/freelancing/art-of-writing-proposals"
              },
              {
                "text": "Pricing Your Services Right",
                "link": "/freelancing/pricing-your-services-right"
              },
              {
                "text": "Building Credibility with Testimonials",
                "link": "/freelancing/building-credibility-with-testimonials"
              },
              {
                "text": "Summary of Week 2 - Establishing Your Foundation",
                "link": "/freelancing/establishing-your-foundation"
              }
            ]
          }
        ]
      },
      {
        "text": "Getting Your First Clients",
        "collapsible": true,
        "collapsed": true,
        "items": [
          {
            "items": [
              {
                "text": "Where to Find High-Quality Clients",
                "link": "/freelancing/where-to-find-high-quality-clients"
              },
              {
                "text": "Networking Online - Building Relationships That Matter",
                "link": "/freelancing/building-relationship-that-matter"
              },
              {
                "text": "How to Get Your First Freelancing Gig",
                "link": "/freelancing/get-your-first-freelancing-gig"
              },
              {
                "text": "Leveraging Social Proof",
                "link": "/freelancing/leveraging-social-proof"
              },
              {
                "text": "Overcoming the “No Experience” Objection",
                "link": "/freelancing/overcoming-no-experience-objection"
              },
              {
                "text": "Closing Deals - The Follow-Up Strategy",
                "link": "/freelancing/closing-deals-the-followup-strategy"
              },
              {
                "text": "Summary of Week 3 - Securing Your First Clients",
                "link": "/freelancing/securing-your-first-clients"
              }
            ]
          }
        ]
      },
      {
        "text": "Scaling Your Freelancing Business",
        "collapsible": true,
        "collapsed": true,
        "items": [
          {
            "items": [
              {
                "text": "Scaling Your Freelancing Income",
                "link": "/freelancing/scailing-your-freelancing-income"
              },
              {
                "text": "Expanding Your Services",
                "link": "/freelancing/expanding-your-services"
              },
              {
                "text": "Managing Multiple Clients",
                "link": "/freelancing/managing-multiple-clients"
              },
              {
                "text": "Building a Personal Brand",
                "link": "/freelancing/building-a-personal-brand"
              },
              {
                "text": "Automation Tools to Streamline Your Business",
                "link": "/freelancing/automatin-tools-to-streamline-your-business"
              },
              {
                "text": "The Importance of Client Retention",
                "link": "/freelancing/the-importance-of-client-retention"
              },
              {
                "text": "Summary of Week 4 - Scaling Up",
                "link": "/freelancing/scaling-up"
              }
            ]
          }
        ]
      },
      {
        "text": "Advanced Strategies and Long-Term Growth",
        "collapsible": true,
        "collapsed": true,
        "items": [
          {
            "items": [
              {
                "text": "Diversifying Your Income Streams",
                "link": "/freelancing/diversifying-your-income-streams"
              },
              {
                "text": "Moving from Freelancing to Consulting",
                "link": "/freelancing/moving-from-freelancing-consulting"
              },
              {
                "text": "Creating Passive Income through Freelancing",
                "link": "/freelancing/creating-passive-income-through-freelancing"
              },
              {
                "text": "Building a Team to Expand Your Business",
                "link": "/freelancing/building-a-team-to-expand-your-business"
              },
              {
                "text": "Positioning Yourself as an Expert",
                "link": "/freelancing/positioning-yourself-as-an-expert"
              },
              {
                "text": "Collaborating with Other Freelancers",
                "link": "/freelancing/collaborating-with-other-freelancers"
              },
              {
                "text": "Summary of Week 5 - Long-Term Growth Strategies",
                "link": "/freelancing/long-term-growth-startegies"
              }
            ]
          }
        ]
      },
      {
        "text": "The Freelancing Lifestyle",
        "collapsible": true,
        "collapsed": true,
        "items": [
          {
            "items": [
              {
                "text": "Maintaining Work-Life Balance",
                "link": "/freelancing/maintaining-work-life-balance"
              },
              {
                "text": "Avoiding Burnout",
                "link": "/freelancing/avoiding-burnout"
              },
              {
                "text": "The Freedom of Freelancing",
                "link": "/freelancing/the-freedom-of-freelancing"
              },
              {
                "text": "Traveling as a Freelancer",
                "link": "/freelancing/travelling-as-a-freelancer"
              },
              {
                "text": "Staying Motivated for the Long Haul",
                "link": "/freelancing/statying-motivated-for-the-long-haul"
              },
              {
                "text": "Freelancing and Family Life",
                "link": "/freelancing/freelancing-and-family-life"
              },
              {
                "text": "Summary of Week 6 - Embracing the Lifestyle",
                "link": "/freelancing/embracing-the-lifestyle"
              }
            ]
          }
        ]
      },
      {
        "text": "Challenges and How to Overcome Them",
        "collapsible": true,
        "collapsed": true,
        "items": [
          {
            "items": [
              {
                "text": "Dealing with Difficult Clients",
                "link": "/freelancing/dealing-with-difficult-clients"
              },
              {
                "text": "Managing Financial Uncertainty",
                "link": "/freelancing/managing-financial-uncertainty"
              },
              {
                "text": "Legal Considerations for Freelancers",
                "link": "/freelancing/legal-consideration-for-freelancers"
              },
              {
                "text": "Overcoming Freelancing Loneliness",
                "link": "/freelancing/overcoming-freelancing-loneliness"
              },
              {
                "text": "Handling Rejections and Setbacks",
                "link": "/freelancing/handling-rejections-and-setbacks"
              },
              {
                "text": "The Importance of Continuous Learning",
                "link": "/freelancing/the-importance-of-continuous-learning"
              },
              {
                "text": "Building Resilience in Freelancing",
                "link": "/freelancing/building-resilience-in-freelancing"
              },
              {
                "text": "Summary of Week 7 - Overcoming Challenges",
                "link": "/freelancing/overcoming-challenges"
              }
            ]
          }
        ]
      },
      {
        "text": "Looking Ahead - Future-Proofing Your Career",
        "collapsible": true,
        "collapsed": true,
        "items": [
          {
            "items": [
              {
                "text": "Future Trends in Freelancing",
                "link": "/freelancing/future-trends-in-freelancing"
              },
              {
                "text": "The Importance of Networking",
                "link": "/freelancing/importance-of-networking"
              },
              {
                "text": "Personal Growth as a Freelancer",
                "link": "/freelancing/personal-growth-as-a-freelancer"
              },
              {
                "text": "Giving Back - Helping Others in the Freelancing Community",
                "link": "/freelancing/giving-back-helping-others"
              },
              {
                "text": "Preparing for the Next Level",
                "link": "/freelancing/preparing-for-the-next-level"
              },
              {
                "text": "Creating a Legacy through Freelancing",
                "link": "/freelancing/creating-a-legacy-through-freelancing"
              },
              {
                "text": "Reflection - Lessons Learned on My Journey",
                "link": "/freelancing/reflection-lessons-learned"
              },
              {
                "text": "Encouraging Others to Take the Leap",
                "link": "/freelancing/encourgaing-others-to-take-the-leap"
              },
              {
                "text": "The Power of Persistence",
                "link": "/freelancing/the-power-of-persistence"
              },
              {
                "text": "Conclusion and Next Steps",
                "link": "/freelancing/conclustion-and-the-next-step"
              }
            ]
          }
        ]
      }
    ],
    "/best-tools/": [
      {
        "items": [
          {
            "text": "Project Management",
            "link": "/best-tools/project-management"
          },
          {
            "text": "Time Tracking",
            "link": "/best-tools/time-tracking"
          },
          {
            "text": "Invoicing & Payments",
            "link": "/best-tools/invoicing-payments"
          },
          {
            "text": "Design Tools",
            "link": "/best-tools/design-tools"
          },
          {
            "text": "Communication & Collaboration",
            "link": "/best-tools/communication-collaboration"
          },
          {
            "text": "File Sharing & Storage",
            "link": "/best-tools/file-sharing-storage"
          },
          {
            "text": "Content Creation & Writing",
            "link": "/best-tools/content-creation-writing"
          },
          {
            "text": "Coding & Development",
            "link": "/best-tools/coding-development"
          },
          {
            "text": "Marketing & SEO",
            "link": "/best-tools/marketing-seo"
          },
          {
            "text": "Social Media Management",
            "link": "/best-tools/social-media-management"
          },
          {
            "text": "Customer Relationship Management (CRM)",
            "link": "/best-tools/crm-tools"
          },
          {
            "text": "Freelance Platforms",
            "link": "/best-tools/freelance-platforms"
          },
          {
            "text": "File Compression & Conversion",
            "link": "/best-tools/file-compression-conversion"
          },
          {
            "text": "Prototyping & Wireframing",
            "link": "/best-tools/prototyping-wireframing"
          },
          {
            "text": "Virtual Private Network (VPN)",
            "link": "/best-tools/vpns-tools"
          },
          {
            "text": "Graphic Design Marketplaces",
            "link": "/best-tools/graphic-design-marketplaces"
          },
          {
            "text": "Learning & Skill Development",
            "link": "/best-tools/learning-skill-development"
          },
          {
            "text": "Email Marketing",
            "link": "/best-tools/email-marketing"
          },
          {
            "text": "Website Building",
            "link": "/best-tools/website-building"
          },
          {
            "text": "Legal & Contracts",
            "link": "/best-tools/legal-contracts"
          }
        ]
      }
    ],
    "/services/": [
      {
        "text": "Services",
        "collapsible": true,
        "collapsed": false,
        "items": [
          {
            "text": "Consulting",
            "link": "/services/services/consulting"
          },
          {
            "text": "Workshops",
            "link": "/services/services/workshops"
          }
        ]
      }
    ],
    "/free-tools/": [
      {
        "text": "Free tools",
        "items": [
          {
            "text": "All free tools",
            "link": "/free-tools/"
          },
          {
            "text": "Website Builder",
            "link": "/free-tools/website-builder"
          }
        ]
      }
    ]
  },
  "socialLinks": [
    {
      "icon": {
        "svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" enable-background=\"new 0 0 24 24\" viewBox=\"0 0 24 24\" id=\"Upwork\"> <path fill=\"#42ff1b\" d=\"M18.561,5.025c-2.539,0-4.51,1.647-5.31,4.362c-1.22-1.832-2.148-4.032-2.687-5.886H7.828v7.105c-0.002,1.404-1.141,2.543-2.547,2.545c-1.406-0.002-2.543-1.142-2.545-2.545V3.5H0v7.105c0,2.911,2.371,5.298,5.282,5.298c2.913,0,5.283-2.387,5.283-5.298V9.416c0.529,1.106,1.182,2.228,1.974,3.219L10.865,20.5h2.797l1.213-5.705c1.063,0.679,2.285,1.109,3.686,1.109c3,0,5.439-2.45,5.439-5.445C24,7.461,21.561,5.025,18.561,5.025L18.561,5.025z M18.561,13.157c-1.102,0-2.135-0.467-3.074-1.227l0.228-1.074l0.008-0.042c0.207-1.143,0.849-3.058,2.839-3.058c1.492,0,2.703,1.211,2.703,2.7C21.264,11.945,20.053,13.157,18.561,13.157L18.561,13.157z\" class=\"color6cd441 svgShape\"></path><path fill=\"#4fb939\" d=\"M12,15.165L10.865,20.5H12V15.165L12,15.165z M10.564,3.5H7.828v7.105c-0.002,1.404-1.141,2.543-2.547,2.545c-1.406-0.002-2.543-1.142-2.545-2.545V3.5H0v7.105c0,2.911,2.371,5.298,5.282,5.298c2.913,0,5.283-2.387,5.283-5.298V9.416c0.404,0.845,0.88,1.699,1.436,2.497V7.194C11.386,5.943,10.9,4.655,10.564,3.5L10.564,3.5z\" class=\"color5eb939 svgShape\"></path></svg>"
      },
      "link": "https://www.upwork.com/freelancers/~017e44b615de910457"
    },
    {
      "icon": "youtube",
      "link": "https://www.youtube.com/@iamrahulkewat"
    },
    {
      "icon": "instagram",
      "link": "https://www.instagram.com/rahulkewat_/"
    },
    {
      "icon": "linkedin",
      "link": "https://www.linkedin.com/in/rahulkewat/"
    },
    {
      "icon": "github",
      "link": "https://github.com/rahul-kewat"
    }
  ],
  "search": {
    "provider": "local"
  }
}

Page Data ​

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

Page Frontmatter ​

{
  "outline": "deep"
}

More ​

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

Last updated:

Pager
Next pageConsulting
Rahul Kewat logoRahul Kewat

Helping freelancers, founders, and creators build a craft-led business they're proud of.

Explore

  • Home
  • Free tools
  • Freelancing playbook
  • Best tools

Work with me

  • Book a 1:1 call
  • Consulting
  • Workshops

Connect

  • LinkedIn
  • YouTube
  • Instagram
  • GitHub
© 2026 Rahul Kewat. Built with VitePress & Vue 3.Crafted with ♥ in India