1.6.11 • Published 2 years ago
@kjam/next-ui v1.6.11
@kjam/next-ui
React components within the kjam tooling
for git (github) based headless CMS + next.js
projects.
Usage
In one of your pages, e.g. pages/[slug].ts
import { kjam, KjamProps } from "@kjam/next";
import { PageDebug } from "@kjam/next-ui";
import { serialize } from "next-mdx-remote/serialize";
// import { mdComponents } from "../md-components";
type Data = {
title: string;
};
type Params = {
slug: string[];
};
type Props = KjamProps<Data, Params> & {};
export default function PagesPage({
mdx,
entry,
}: PageStatic<typeof getStaticProps>) {
return (
<PageDebug
tpl="[slug]"
entry={entry}
mdx={mdx}
// mdComponents={mdComponents}
/>
);
}
export const getStaticPaths: DataStaticPaths<Params> = async (ctx) => {
return await kjam.getStaticPaths<Params>(ctx, "blocking", "pages");
};
export const getStaticProps: DataStatic<Props, Params> = async (ctx) => {
return await kjam.getStaticProps<Params, Data>(ctx, serialize, "");
};
This repo is automatically deployed by
@kjam
monorepo. Issues and development happen there.
1.6.11
2 years ago
1.6.10
2 years ago
1.6.9
2 years ago
1.6.8
2 years ago
1.6.7
2 years ago
1.6.6
2 years ago
1.6.4
3 years ago
1.6.3
3 years ago
1.6.2
3 years ago
1.6.1
3 years ago
1.6.0
3 years ago
1.6.5
3 years ago
1.5.2
3 years ago
1.5.1
3 years ago
1.5.0
3 years ago
1.4.26
3 years ago
1.4.24
3 years ago
1.4.23
3 years ago
1.4.21
3 years ago
1.4.19
3 years ago
1.4.18
3 years ago
1.4.17
3 years ago
1.4.16
3 years ago
1.4.15
3 years ago
1.4.14
3 years ago
1.4.13
3 years ago
1.4.12
3 years ago
1.4.11
3 years ago
1.4.10
3 years ago
1.4.9
3 years ago
1.4.8
3 years ago
1.4.7
3 years ago
1.4.6
3 years ago
1.4.5
3 years ago
1.4.4
3 years ago
1.4.3
3 years ago
1.4.2
3 years ago
1.4.1
3 years ago
1.4.0
3 years ago
1.3.0
3 years ago
1.2.2
3 years ago
1.2.1
3 years ago
1.2.0
3 years ago
1.1.1
3 years ago
1.0.0
3 years ago
1.0.7
3 years ago
1.0.6
3 years ago