Skip to content

Commit

Permalink
Merge pull request #1814 from starknet-io/dev
Browse files Browse the repository at this point in the history
Merge dev into production
nuno-aac authored Dec 11, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents 9577096 + af607e5 commit 8aa8bc7
Showing 4 changed files with 15 additions and 25 deletions.
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
@@ -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",
1 change: 1 addition & 0 deletions workspaces/cms-data/src/pages.ts
Original file line number Diff line number Diff line change
@@ -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;
6 changes: 6 additions & 0 deletions workspaces/website/src/pages/(components)/CMSPage.tsx
Original file line number Diff line number Diff line change
@@ -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 <NotFound type="page" />;
}

return (
<Box>
<PageLayout

0 comments on commit 8aa8bc7

Please sign in to comment.