Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
use title from toc root node
  • Loading branch information
seungpark authored Feb 21, 2023
1 parent f86ac1f commit a47b0f3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/Sidenav/Sidenav.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,9 @@ const Sidenav = ({ chapters, guides, page, pageTitle, repoBranches, siteTitle, s
return <Toctree handleClick={() => hideMobileSidenav()} slug={slug} toctree={toctree} />;
}, [chapters, guides, hideMobileSidenav, isGuidesLanding, isGuidesTemplate, page, slug, toctree, activeToc]);

const navTitle = isGuidesTemplate ? guides?.[slug]?.['chapter_name'] : siteTitle;
const navTitle = isGuidesTemplate
? guides?.[slug]?.['chapter_name']
: formatText(process.env.GATSBY_TEST_EMBED_VERSIONS === 'true' ? activeToc.title : toctree.title);

const guidesChapterNumber = useMemo(() => {
if (!isGuidesTemplate) {
Expand Down

0 comments on commit a47b0f3

Please sign in to comment.