Getting started

Installation

Install the package into your Next.js project in two steps.

Install the package

Choose your package manager:

npm
npm install blogjs-space
yarn
yarn add blogjs-space
pnpm
pnpm add blogjs-space

Peer requirements

RequirementVersionNotes
Node.js>= 18Native fetch required
TypeScript>= 5.0Recommended over TS 6 alpha

Next.js configuration

To serve blog images through the Next.js Image component, add the S3 bucket to next.config.ts:

Code
import type { NextConfig } from "next";

const nextConfig: NextConfig = {
  images: {
    remotePatterns: [
      {
        protocol: "https",
        hostname: "*.s3.ap-south-1.amazonaws.com",
      },
    ],
  },
};

export default nextConfig;