Skip to content

Commit

Permalink
Merge pull request #66 from directus/connorwinston/web-392-add-descri…
Browse files Browse the repository at this point in the history
…ption-field-to-backend-and-frontend

feat: Add Description from backend
  • Loading branch information
connorwinston authored Dec 2, 2024
2 parents 141118e + 837e630 commit 7ad4705
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default defineNuxtConfig({
},
},
navigation: {
fields: ['root', 'tags', 'additional_paths', 'expandable'],
fields: ['root', 'tags', 'additional_paths', 'expandable', 'description'],
},
},
runtimeConfig: {
Expand Down
2 changes: 2 additions & 0 deletions server/remoteContent/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export const docPages = async () => {
'id',
'slug',
'title',
'description',
'content',
'sort',
{ tags: [{ tag: ['id', 'icon', 'name'] }] },
Expand Down Expand Up @@ -140,6 +141,7 @@ export const buildPages = async (dir: string) => {
additional_paths: page.additional_paths?.map(path => path.path),
content: undefined,
authors: page.authors?.map(author => author.author),
...(page.description ? { description: page.description } : { description: undefined }),
},
page.content,
);
Expand Down
1 change: 1 addition & 0 deletions types/directus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ interface DocumentationPage {
additional_paths: DocumentationAdditionalPath[]; // Array of Documentation
authors: DocumentationPageAuthor[]; // Array of DocumentationPageAuthor
title: string; // String
description?: string; // String
content: string; // String
sort?: number; // Optional Integer
user_created?: string; // Optional UUID
Expand Down

0 comments on commit 7ad4705

Please sign in to comment.