diff --git a/site/gdocs/components/ResearchAndWriting.tsx b/site/gdocs/components/ResearchAndWriting.tsx index b486ec95df2..75fafb0a9e6 100644 --- a/site/gdocs/components/ResearchAndWriting.tsx +++ b/site/gdocs/components/ResearchAndWriting.tsx @@ -4,11 +4,13 @@ import { EnrichedBlockResearchAndWriting, EnrichedBlockResearchAndWritingLink, RESEARCH_AND_WRITING_ID, + slugify, } from "@ourworldindata/utils" import { useLinkedDocument } from "../utils.js" import { formatAuthors } from "../../clientFormatting.js" import Image from "./Image.js" import { DocumentContext } from "../OwidGdoc.js" +import { RESEARCH_AND_WRITING_DEFAULT_HEADING } from "@ourworldindata/types" type ResearchAndWritingProps = { className?: string @@ -89,15 +91,18 @@ function ResearchAndWritingLinkContainer( } export function ResearchAndWriting(props: ResearchAndWritingProps) { - const { primary, secondary, more, rows, className } = props + const { heading, primary, secondary, more, rows, className } = props + + const slug = heading ? slugify(heading) : RESEARCH_AND_WRITING_ID + return (