Skip to content

Commit 8edd101

Browse files
ogwataclaude
andcommitted
fix: address Copilot review on rename commit ad14943
- src/pages/{en,ja}/cookbook/[...slug].astro: pass lang prop to SidebarTocHeadings. The earlier Copilot fix (commit 5a9186c) wired lang through the cli/themes/vfm/viewer slug pages but missed the new-features slug page (now cookbook). Without lang, the toggle aria-label rendered as "Toggle subsections of <heading>" even on Japanese pages. - src/layouts/DocsLayout.astro: align global-nav Tutorials/FAQ URLs with the home sidebar. Both now use https://vivliostyle.org/en/... and https://vivliostyle.org/ja/... — the global nav was previously using the bare /tutorials/ and /faq/ paths for en pages, which required the marketing site to redirect. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 097c667 commit 8edd101

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/layouts/DocsLayout.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const navLinks = {
4848
],
4949
tutorial: {
5050
label: navLabels.tutorial,
51-
href: isJa ? 'https://vivliostyle.org/ja/tutorials/' : 'https://vivliostyle.org/tutorials/',
51+
href: isJa ? 'https://vivliostyle.org/ja/tutorials/' : 'https://vivliostyle.org/en/tutorials/',
5252
external: true,
5353
},
5454
cookbook: {
@@ -70,7 +70,7 @@ const navLinks = {
7070
},
7171
faq: {
7272
label: navLabels.faq,
73-
href: isJa ? 'https://vivliostyle.org/ja/faq/' : 'https://vivliostyle.org/faq/',
73+
href: isJa ? 'https://vivliostyle.org/ja/faq/' : 'https://vivliostyle.org/en/faq/',
7474
external: true,
7575
},
7676
};

src/pages/en/cookbook/[...slug].astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ const nextPage = currentIndex < sortedDocs.length - 1 ? sortedDocs[currentIndex
7575
<a href={itemPath} aria-current={isActive ? 'page' : undefined}>
7676
{item.data.title || item.id}
7777
</a>
78-
{isActive && <SidebarTocHeadings headings={headings} />}
78+
{isActive && <SidebarTocHeadings headings={headings} lang="en" />}
7979
</li>
8080
);
8181
})}

src/pages/ja/cookbook/[...slug].astro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ const nextPage = currentIndex < sortedDocs.length - 1 ? sortedDocs[currentIndex
7373
<a href={itemPath} aria-current={isActive ? 'page' : undefined}>
7474
{item.data.title || item.id}
7575
</a>
76-
{isActive && <SidebarTocHeadings headings={headings} />}
76+
{isActive && <SidebarTocHeadings headings={headings} lang="ja" />}
7777
</li>
7878
);
7979
})}

0 commit comments

Comments
 (0)