0.50.0 • Published 1 year ago
@umami/shiso v0.50.0
Shiso
A content layer for Next.js.
Usage
1. Install the package
npm install @umami/shiso2. 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.jsxIn 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
0.43.0
1 year ago
0.48.0
1 year ago
0.46.0
1 year ago
0.44.0
1 year ago
0.50.0
1 year ago
0.49.0
1 year ago
0.47.0
1 year ago
0.45.0
1 year ago
0.42.0
1 year ago
0.41.0
1 year ago
0.40.0
1 year ago
0.39.0
1 year ago
0.38.0
1 year ago
0.37.0
1 year ago
0.36.0
1 year ago
0.35.0
1 year ago
0.34.0
1 year ago
0.33.0
1 year ago
0.32.0
1 year ago
0.31.0
1 year ago
0.30.0
1 year ago
0.21.0
1 year ago
0.20.0
1 year ago
0.19.0
1 year ago
0.18.0
1 year ago
0.29.0
1 year ago
0.28.0
1 year ago
0.27.0
1 year ago
0.26.0
1 year ago
0.25.0
1 year ago
0.24.0
1 year ago
0.22.0
1 year ago
0.10.0
1 year ago
0.11.0
1 year ago
0.9.0
1 year ago
0.12.0
1 year ago
0.8.0
1 year ago
0.13.0
1 year ago
0.14.0
1 year ago
0.15.0
1 year ago
0.16.0
1 year ago
0.17.0
1 year ago
0.7.0
1 year ago
0.6.0
1 year ago
0.5.0
1 year ago
0.4.0
1 year ago
0.3.0
1 year ago
0.2.0
1 year ago
0.1.0
1 year ago