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

✨ Privacy Policy front-matter #4584

Merged
merged 3 commits into from
Feb 21, 2025
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
5 changes: 5 additions & 0 deletions packages/@ourworldindata/types/src/gdocTypes/Gdoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,11 @@ export interface OwidGdocAboutContent {
excerpt?: string
"featured-image"?: string
authors: string[]
"hide-nav"?: boolean
// By default, all about pages render with the title "About" even if they have a title set
// (which we use in the gdocs index page in the admin)
// This boolean makes it so that the title is used in *both* locations
"override-title"?: boolean
body: OwidEnrichedGdocBlock[]
refs?: { definitions: RefDictionary; errors: OwidGdocErrorMessage[] }
}
Expand Down
5 changes: 3 additions & 2 deletions site/gdocs/pages/AboutPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ import { ArticleBlocks } from "../components/ArticleBlocks.js"
import Footnotes from "../components/Footnotes.js"

export default function AboutPage({ content, slug }: OwidGdocAboutInterface) {
const shouldOverrideTitle = content["override-title"]
return (
<main className="about-page centered-article-container grid grid-cols-12-full-width">
<h1 className="about-header col-start-2 col-end-limit display-2-semibold">
About
{(shouldOverrideTitle && content.title) || "About"}
</h1>
<AboutNav slug={slug} />
{!content["hide-nav"] && <AboutNav slug={slug} />}
<div className="about-body grid grid-cols-12-full-width col-start-1 col-end-limit">
<ArticleBlocks
containerType="about-page"
Expand Down