Update content categorization and handle hierarchical documentation
Enhancements were implemented to support hierarchical documentation. Local CMS now respects parent ID and order attributes of content items, and content can be categories as 'blog' or 'documentation'. Changes were also made to the wordpress integration supporting these new categorizations. Introduced working with nested documentation pages.
This commit is contained in:
@@ -19,11 +19,12 @@ async function DocsPage() {
|
||||
const { t } = await createI18nServerInstance();
|
||||
|
||||
const docs = await client.getContentItems({
|
||||
type: 'page',
|
||||
categories: ['documentation'],
|
||||
depth: 1,
|
||||
});
|
||||
|
||||
// Filter out any docs that have a parentId, as these are children of other docs
|
||||
const cards = docs.filter((item) => !item.parentId);
|
||||
|
||||
return (
|
||||
<div className={'my-8 flex flex-col space-y-16'}>
|
||||
<SitePageHeader
|
||||
@@ -32,7 +33,7 @@ async function DocsPage() {
|
||||
/>
|
||||
|
||||
<PageBody>
|
||||
<DocsCards pages={docs} />
|
||||
<DocsCards cards={cards} />
|
||||
</PageBody>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user