Lightweight Client Documentation

Learn how to integrate Lightweight Client into your blog to fetch and display articles
by using our npm package, which works for all frameworks, but implementation is slightly different.

!

Prerequisites

Before you begin, make sure you have completed the following:

  • 1

    Create a Lightweight Account

    Sign up at lightweight.so to access the portal

  • 2

    Set Up Your Project

    Create a new project in the portal and configure your blog settings

  • 3

    Generate an API Key

    Navigate to → API Keys in your project dashboard to find your unique API key

Note: You can use the demo key 963c9083-8ae0-4db6-af39-7b745890aff4 for testing. Add it to your .env.local file.

1

Install Lightweight Client

First, install the lightweight-client package in your project.

npm install lightweight-client

Choose Your Framework

Choose your framework to get a detailed implementation guide with full examples.

Next.js

Next.js

Full-stack React framework with App Router support

React

React

Coming Soon

Build dynamic UIs with hooks and components

Vue

Vue

Coming Soon

Progressive framework with Composition API

Svelte

Svelte

Coming Soon

Compile-time optimized reactive framework

Environment Variables

Add your API key to your environment variables file:

Next.js (.env.local)

LIGHTWEIGHT_API_KEY=your-api-key-here

React (.env)

REACT_APP_LIGHTWEIGHT_API_KEY=your-api-key-here

Vue/Vite (.env)

VITE_LIGHTWEIGHT_API_KEY=your-api-key-here