Skip to content

Commit 58d311d

Browse files
authored
fix: fs sidebar title case (#139)
1 parent 649b06b commit 58d311d

3 files changed

Lines changed: 7 additions & 9 deletions

File tree

docs/src/routes/reference/preview-directive.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Preview Directive
33
badges:
44
- icon: npm
5-
label: since v0.5.1
5+
label: since v0.6.0
66
- icon: source
77
label: Source
88
url: https://github.com/kobaltedev/solidbase/blob/main/src/config/remark-plugins/preview.ts

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@kobalte/solidbase",
3-
"version": "0.5.1-dev",
3+
"version": "0.6.1-dev",
44
"description": "Fully featured, fully customisable static site generation for SolidStart",
55
"type": "module",
66
"sideEffects": true,

src/config/sidebar.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,11 @@ function getMatterData(filePath: string): { title?: string } & {} {
124124
}
125125

126126
function formatTitle(filePath: string): string {
127-
return removeParenthesesGroups(
128-
stripExtension(filePath)
129-
.substring(1)
130-
.split("-")
131-
.map((s) => s.charAt(0).toUpperCase() + s.slice(1))
132-
.join(" "),
133-
);
127+
return removeParenthesesGroups(stripExtension(filePath))
128+
.substring(1)
129+
.split("-")
130+
.map((s) => s.charAt(0).toUpperCase() + s.slice(1))
131+
.join(" ");
134132
}
135133

136134
function removeParenthesesGroups(s: string) {

0 commit comments

Comments
 (0)