Files
next-static-site/pages/open-source/[[...slug]].js
Brandon Lee Kitajchuk e3cd0edeb6 Initial refactor of jambonz-ui package library (#39)
* Initial refactor of jambonz-ui package library

* Delete public/fonts directory

* Jambonz UI test-app and some refinements

* next lint

* working on jambonz ui docs

* Update package.json

* Update package.json

* Update package.json

* Create package.json

* typescript

* Update components.tsx

* Update components.tsx

* Update utils.ts

* Update icons.ts

* Update components.tsx

* Update components.tsx

* Update icons.ts

* Update components.tsx

* Update _icons.scss

* Update components.tsx

* Update components.tsx

* fix some thangs and compile all

* wrap up the docs

* Update tsconfig.json

* icons refactor

* refine docs

* update readmes

* update readme

* fix props interfaces and test in TS app

* Update components.tsx

* button up some things

* change package name...

* include readme in pkg dist

* use published package
2022-07-01 10:57:32 -07:00

40 lines
876 B
JavaScript

import Prism from 'prismjs';
import { useEffect } from 'react';
import Layout from '../../src/components/layout';
import Markdown from '../../src/components/markdown';
import { getData, getMarkdown, getMarkdownPaths } from '../../src/lib/data';
export default function OpenSource({ data, docs }) {
useEffect(() => {
setTimeout(() => Prism.highlightAll(), 0);
});
return (
<Layout siteData={data.site}>
<Markdown scope="open-source" data={data['open-source']} docs={docs} />
</Layout>
);
}
export async function getStaticPaths() {
const paths = getMarkdownPaths('open-source');
return {
paths,
fallback: false,
};
}
export async function getStaticProps({ params }) {
const data = getData('open-source');
const docs = await getMarkdown('open-source', params.slug);
return {
props: {
data,
docs,
},
};
}