Socket
Book a DemoInstallSign in
Socket

@umami/shiso

Package Overview
Dependencies
Maintainers
3
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@umami/shiso

A content layer for Next.js

latest
Source
npmnpm
Version
0.55.0
Version published
Maintainers
3
Created
Source

Shiso

A content layer for Next.js.

Learn more

Usage

1. Install the package

npm install @umami/shiso

2. Create page

In your app folder, create a folder for the content section you wish to add. In this case we are creating a section for docs.

src
├── app
│   └── docs
│       └── [[...slug]]
│           └── page.jsx

In the page.jsx file, add the following code:

import { Shiso } from '@umami/shiso';
import { getContent, getContentIds } from '@@umami/shiso/server';
import config from 'path/to/shiso.config.json';

export async function generateStaticParams() {
  const ids = await getContentIds('./src/content/docs');

  return ids.map((id: string) => ({
    id: id.split('/')
  }));
}

export default async function Page({ params }: { params: Promise<{ id: string[] }> }) {
  const content = await getContent(await params, './src/content/docs');

  return <Shiso type="docs" content={content} config={config} />;
}

3. Write content

In the folder you specified, start adding .mdx files.

License

MIT

FAQs

Package last updated on 01 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts