From 5311b9d85a88f4650e3ca575fdbc28a6b0db77e4 Mon Sep 17 00:00:00 2001 From: Rowan Cockett Date: Thu, 9 Jan 2025 19:44:48 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=96=20`In=20this=20Article`=20-->=20`C?= =?UTF-8?q?ontents`=20(#519)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This also makes it a property of the component, allowing for customization in the future. Based on feedback from @dellaert and conforming to JupyterBook. --- .changeset/fifty-bikes-poke.md | 5 +++++ packages/site/src/components/DocumentOutline.tsx | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .changeset/fifty-bikes-poke.md diff --git a/.changeset/fifty-bikes-poke.md b/.changeset/fifty-bikes-poke.md new file mode 100644 index 00000000..f4dbefed --- /dev/null +++ b/.changeset/fifty-bikes-poke.md @@ -0,0 +1,5 @@ +--- +'@myst-theme/site': patch +--- + +In this article --> Contents diff --git a/packages/site/src/components/DocumentOutline.tsx b/packages/site/src/components/DocumentOutline.tsx index 2caaf8ca..0b0c4501 100644 --- a/packages/site/src/components/DocumentOutline.tsx +++ b/packages/site/src/components/DocumentOutline.tsx @@ -352,6 +352,7 @@ function useMarginOccluder() { export const DocumentOutline = ({ outlineRef, + title = 'Contents', top = 0, className, selector = SELECTOR, @@ -360,6 +361,7 @@ export const DocumentOutline = ({ isMargin, }: { outlineRef?: React.RefObject; + title?: React.ReactNode; top?: number; height?: number; className?: string; @@ -406,7 +408,7 @@ export const DocumentOutline = ({ }} >
- In this article + {title}