Skip to content

Commit

Permalink
chore(docs): fix gen icon rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonkuhrt committed Sep 17, 2024
1 parent 05cc798 commit 4375b22
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions website/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ const fixLinks = (sidebarMulti: SidebarMulti) => {

const fixTitles = (sidebarMulti: SidebarMulti) => {
return sidebarMultiVisitItems(sidebarMulti, (sidebarItem) => {
const [title, maybeHtml] = sidebarItem.text?.split('<') as [string, string | undefined]
if (sidebarItem.text) {
sidebarItem.text = capitalize(sidebarItem.text.replaceAll(/-/g, ' '))
sidebarItem.text = capitalize(title.replaceAll(/-/g, ' ')) + (maybeHtml ? `<${maybeHtml}` : '')
}
})
}
Expand All @@ -41,13 +42,14 @@ const sidebars = fixTitles(fixLinks(generateSidebar([
removePrefixAfterOrdering: true,
useTitleFromFrontmatter: true,
useTitleFromFileHeading: true,
hyphenToSpace: true,
capitalizeEachWords: true,
// https://github.com/jooy2/vitepress-sidebar/issues/176
// hyphenToSpace: true,
// capitalizeEachWords: true,
keepMarkdownSyntaxFromTitle: true,
},
{
hyphenToSpace: true,
capitalizeEachWords: true,
// hyphenToSpace: true,
// capitalizeEachWords: true,
scanStartPath: 'content/examples',
resolvePath: '/examples/',
prefixSeparator: '_',
Expand Down

0 comments on commit 4375b22

Please sign in to comment.