Skip to content

Commit 765141a

Browse files
authored
Make "last updated" section optional (#3486)
1 parent eb1bd3a commit 765141a

File tree

1 file changed

+22
-13
lines changed

1 file changed

+22
-13
lines changed

packages/gitbook/src/components/PageBody/PageBody.tsx

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -93,19 +93,28 @@ export function PageBody(props: {
9393
<PageFooterNavigation context={context} page={page} />
9494
) : null}
9595

96-
<div className="mx-auto mt-6 page-api-block:ml-0 flex max-w-3xl page-full-width:max-w-screen-2xl flex-row flex-wrap items-center gap-4 text-tint contrast-more:text-tint-strong">
97-
{updatedAt ? (
98-
<p className="mr-auto text-sm">
99-
{t(language, 'page_last_modified', <DateRelative value={updatedAt} />)}
100-
</p>
101-
) : null}
102-
{withPageFeedback ? (
103-
<PageFeedbackForm
104-
className={page.layout.outline ? 'xl:hidden' : ''}
105-
pageId={page.id}
106-
/>
107-
) : null}
108-
</div>
96+
{
97+
// TODO: after 25/07/2025, we can chage it to a true check as the cache will be updated
98+
page.layout.metadata !== false ? (
99+
<div className="mx-auto mt-6 page-api-block:ml-0 flex max-w-3xl page-full-width:max-w-screen-2xl flex-row flex-wrap items-center gap-4 text-tint contrast-more:text-tint-strong">
100+
{updatedAt ? (
101+
<p className="mr-auto text-sm ">
102+
{t(
103+
language,
104+
'page_last_modified',
105+
<DateRelative value={updatedAt} />
106+
)}
107+
</p>
108+
) : null}
109+
{withPageFeedback ? (
110+
<PageFeedbackForm
111+
className={page.layout.outline ? 'xl:hidden' : ''}
112+
pageId={page.id}
113+
/>
114+
) : null}
115+
</div>
116+
) : null
117+
}
109118
</main>
110119

111120
<TrackPageViewEvent />

0 commit comments

Comments
 (0)