An open API service indexing awesome lists of open source software.

https://github.com/umami-software/shiso

A content layer for Next.js
https://github.com/umami-software/shiso

blog content documentation mdx

Last synced: 8 months ago
JSON representation

A content layer for Next.js

Awesome Lists containing this project

README

          

# Shiso

A content layer for [Next.js](https://nextjs.org/).

[Learn more](https://shiso.umami.is)

## Usage

## 1. Install the package

```shell
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`.

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

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

```js
import { Shiso, Docs } from '@umami/shiso';
import { next } from '@umami/shiso/server';
import config from 'path/to/shiso.config.json';

const { generateMetadata, generateStaticParams, renderPage } = next(config);

export { generateMetadata, generateStaticParams };

export default renderPage(props => {
return } />;
});
```

## 3. Write content

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

## License

MIT