feat(website): render syntax and mdx on the server (#9086)

This commit is contained in:
Suneet Tipirneni
2023-03-23 17:17:41 -04:00
committed by GitHub
parent bc641fa936
commit ee5169e0aa
91 changed files with 820 additions and 1688 deletions

View File

@@ -0,0 +1,19 @@
'use client';
import { usePathname } from 'next/navigation';
export function useCurrentPathMeta() {
const pathname = usePathname();
if (!pathname) {
return {};
}
const [, , , packageName, version, item] = pathname.split('/');
return {
packageName,
version,
item,
};
}