diff --git a/_data/pages/learn.yml b/_data/pages/learn.yml index 206f8c7551..6f07c8f6be 100644 --- a/_data/pages/learn.yml +++ b/_data/pages/learn.yml @@ -1,30 +1,7 @@ id: /learn/ title: Learn template: landing +hidden_page: true breadcrumbs: true page_last_updated: false -blocks: - - type: hero - variant: learn - title: "Learn " - description: An educational guide to Starknet, how it works and how to start using it. - - type: group - blocks: - - size: large - color: orange - variant: image_icon_link_card - orientation: left - withIllustration: false - title: Starknet 101 - icon: /assets/hero-1-.svg - type: image_icon_link_card - link: - custom_internal_link: /learn/ - custom_title: Learn - description: Starknet is a layer-2 network that uses math and cryptography to - securely scale Ethereum. It is known as a Validity-rollup (or - ZK-rollup); it ”rolls” many transactions up to send to Ethereum as a - single transaction. Read on to learn the fundamentals. - columns: "4" - - type: markdown - body: Learn! +blocks: [] diff --git a/workspaces/cms-config/src/collections/pages.ts b/workspaces/cms-config/src/collections/pages.ts index 3e555db414..7ff9fe67bc 100644 --- a/workspaces/cms-config/src/collections/pages.ts +++ b/workspaces/cms-config/src/collections/pages.ts @@ -85,6 +85,12 @@ export const pagesCollectionConfig = { value_field: "id", display_fields: ["title"], }, + { + name: "hidden_page", + label: "Omit page from navigation", + widget: "boolean", + default: false, + }, { name: "breadcrumbs", label: "Show breadcrumbs", diff --git a/workspaces/cms-data/src/pages.ts b/workspaces/cms-data/src/pages.ts index 2dd60c14a1..9119258e3f 100644 --- a/workspaces/cms-data/src/pages.ts +++ b/workspaces/cms-data/src/pages.ts @@ -221,6 +221,7 @@ export interface Page extends Meta { readonly toc?: boolean; readonly template: "landing" | "content" | "narrow content"; readonly tocCustomTitle?: string; + readonly hidden_page: boolean; readonly breadcrumbs: boolean; readonly breadcrumbs_data?: readonly Omit[]; readonly pageLastUpdated: boolean; diff --git a/workspaces/website/src/pages/(components)/CMSPage.tsx b/workspaces/website/src/pages/(components)/CMSPage.tsx index 48635175f4..ce156a1250 100644 --- a/workspaces/website/src/pages/(components)/CMSPage.tsx +++ b/workspaces/website/src/pages/(components)/CMSPage.tsx @@ -14,6 +14,7 @@ import { } from "@chakra-ui/react"; import '@ui/CodeHighlight/code-highlight-init' import { blocksToTOC } from "./TableOfContents/blocksToTOC"; +import NotFound from "@ui/NotFound/NotFound"; type CMSPageProps = { data: PageType; @@ -28,6 +29,11 @@ export default function CMSPage({ locale, }: CMSPageProps) { const date = data?.gitlog?.date; + + if (data?.hidden_page) { + return ; + } + return (