From c8ba8c5d7a298a719c74a76ed9343dfd67f74335 Mon Sep 17 00:00:00 2001 From: nickfrosty Date: Thu, 30 Nov 2023 15:36:59 -0500 Subject: [PATCH] chore: catchup --- content/courses/README.md | 1 - contentlayer.config.ts | 46 +++++++++++++++++++++++++++------------ 2 files changed, 32 insertions(+), 15 deletions(-) delete mode 100644 content/courses/README.md diff --git a/content/courses/README.md b/content/courses/README.md deleted file mode 100644 index fe16977d8..000000000 --- a/content/courses/README.md +++ /dev/null @@ -1 +0,0 @@ -# Solana Courses diff --git a/contentlayer.config.ts b/contentlayer.config.ts index 48f9579b4..054cd070c 100644 --- a/contentlayer.config.ts +++ b/contentlayer.config.ts @@ -104,6 +104,25 @@ const basicContentFields: FieldDefs = { required: false, default: false, }, + + /** + * Custom fields that are used for the generated `nav.json` sidebar data + */ + sidebarLabel: { + type: "string", + description: "Custom sidebar label to use, instead of the document's title", + required: false, + }, + sidebarSortOrder: { + type: "number", + description: "Sort order of the doc, relative to its siblings", + required: false, + }, + hideTableOfContents: { + type: "boolean", + description: "Force hide the table of contents displayed on page", + required: false, + }, }; /** @@ -275,21 +294,18 @@ export const SolanaDoc = defineDocumentType(() => ({ * Custom fields for this specific content record type */ // none + }, +})); - /** - * Custom fields that are used for the generated `nav.json` sidebar data - */ - sidebarLabel: { - type: "string", - description: - "Custom sidebar label to use, instead of the document's title", - required: false, - }, - sidebarSortOrder: { - type: "number", - description: "Sort order of the doc, relative to its siblings", - required: false, - }, +/** + * Content record schema a single Solana RPC documentation record + */ +export const SolanaRPCDoc = defineDocumentType(() => ({ + name: "SolanaRPCDoc", + filePathPattern: "docs/rpc/**/*.mdx", + fields: { + // use the standard content fields + ...basicContentFields, }, })); @@ -313,6 +329,7 @@ export default makeSource({ // set the base content directories to search for content records contentDirPath: ".", contentDirInclude: [ + "docs/rpc/**", "docs/**", "content/guides/**", "content/courses/**", @@ -331,6 +348,7 @@ export default makeSource({ // developer specific content SolanaDoc, + SolanaRPCDoc, DeveloperGuide, DeveloperResource, DeveloperWorkshop,