Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge dev into production #1814

Merged
merged 2 commits into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 2 additions & 25 deletions _data/pages/learn.yml
Original file line number Diff line number Diff line change
@@ -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: []
6 changes: 6 additions & 0 deletions workspaces/cms-config/src/collections/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions workspaces/cms-data/src/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<Page, "blocks">[];
readonly pageLastUpdated: boolean;
Expand Down
6 changes: 6 additions & 0 deletions workspaces/website/src/pages/(components)/CMSPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -28,6 +29,11 @@ export default function CMSPage({
locale,
}: CMSPageProps) {
const date = data?.gitlog?.date;

if (data?.hidden_page) {
return <NotFound type="page" />;
}

return (
<Box>
<PageLayout
Expand Down
Loading