Skip to content

Commit 5e00b13

Browse files
committed
fix: add frontmatter titles, fix hero image and sidebar links for starlight
1 parent 584d7e0 commit 5e00b13

29 files changed

Lines changed: 133 additions & 30 deletions

astro.config.mjs

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export default defineConfig({
1919
title: 'date-and-time',
2020
description: 'The simplest, most intuitive date and time library',
2121
logo: {
22-
src: './public/logo.png',
22+
src: './docs/assets/logo.png',
2323
alt: 'date-and-time',
2424
},
2525
social: [
@@ -30,51 +30,51 @@ export default defineConfig({
3030
{
3131
label: 'Getting Started',
3232
items: [
33-
{ label: 'Introduction', slug: 'guide/index' },
34-
{ label: 'Installation', slug: 'guide/installation' },
35-
{ label: 'Quick Start', slug: 'guide/quick-start' },
33+
{ label: 'Introduction', link: '/guide/' },
34+
{ label: 'Installation', link: '/guide/installation' },
35+
{ label: 'Quick Start', link: '/guide/quick-start' },
3636
],
3737
},
3838
{
3939
label: 'API Reference',
4040
collapsed: true,
4141
items: [
42-
{ label: 'Overview', slug: 'api/index' },
42+
{ label: 'Overview', link: '/api/' },
4343
{
4444
label: 'Core Functions',
4545
items: [
46-
{ label: 'format()', slug: 'api/format' },
47-
{ label: 'parse()', slug: 'api/parse' },
48-
{ label: 'compile()', slug: 'api/compile' },
49-
{ label: 'preparse()', slug: 'api/preparse' },
50-
{ label: 'isValid()', slug: 'api/isValid' },
51-
{ label: 'transform()', slug: 'api/transform' },
52-
{ label: 'addYears()', slug: 'api/addYears' },
53-
{ label: 'addMonths()', slug: 'api/addMonths' },
54-
{ label: 'addDays()', slug: 'api/addDays' },
55-
{ label: 'addHours()', slug: 'api/addHours' },
56-
{ label: 'addMinutes()', slug: 'api/addMinutes' },
57-
{ label: 'addSeconds()', slug: 'api/addSeconds' },
58-
{ label: 'addMilliseconds()', slug: 'api/addMilliseconds' },
59-
{ label: 'subtract()', slug: 'api/subtract' },
46+
{ label: 'format()', link: '/api/format' },
47+
{ label: 'parse()', link: '/api/parse' },
48+
{ label: 'compile()', link: '/api/compile' },
49+
{ label: 'preparse()', link: '/api/preparse' },
50+
{ label: 'isValid()', link: '/api/isvalid' },
51+
{ label: 'transform()', link: '/api/transform' },
52+
{ label: 'addYears()', link: '/api/addyears' },
53+
{ label: 'addMonths()', link: '/api/addmonths' },
54+
{ label: 'addDays()', link: '/api/adddays' },
55+
{ label: 'addHours()', link: '/api/addhours' },
56+
{ label: 'addMinutes()', link: '/api/addminutes' },
57+
{ label: 'addSeconds()', link: '/api/addseconds' },
58+
{ label: 'addMilliseconds()', link: '/api/addmilliseconds' },
59+
{ label: 'subtract()', link: '/api/subtract' },
6060
],
6161
},
6262
{
6363
label: 'Utility Functions',
6464
items: [
65-
{ label: 'isLeapYear()', slug: 'api/utils/isLeapYear' },
66-
{ label: 'isSameDay()', slug: 'api/utils/isSameDay' },
67-
{ label: 'getDaysInMonth()', slug: 'api/utils/getDaysInMonth' },
68-
{ label: 'getISOWeekYear()', slug: 'api/utils/getISOWeekYear' },
69-
{ label: 'getISOWeek()', slug: 'api/utils/getISOWeek' },
65+
{ label: 'isLeapYear()', link: '/api/utils/isleapyear' },
66+
{ label: 'isSameDay()', link: '/api/utils/issameday' },
67+
{ label: 'getDaysInMonth()', link: '/api/utils/getdaysinmonth' },
68+
{ label: 'getISOWeekYear()', link: '/api/utils/getisoweekyear' },
69+
{ label: 'getISOWeek()', link: '/api/utils/getisoweek' },
7070
],
7171
},
7272
],
7373
},
74-
{ label: 'Locales', slug: 'locales' },
75-
{ label: 'Timezones', slug: 'timezones' },
76-
{ label: 'Plugins', slug: 'plugins' },
77-
{ label: 'Migration Guide', slug: 'migration' },
74+
{ label: 'Locales', link: '/locales' },
75+
{ label: 'Timezones', link: '/timezones' },
76+
{ label: 'Plugins', link: '/plugins' },
77+
{ label: 'Migration Guide', link: '/migration' },
7878
],
7979
}),
8080
],

docs/api/addDays.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
title: addDays()
3+
---
4+
15
# addDays()
26

37
Adds or subtracts days from a Date object. Handles month boundaries, leap years, and daylight saving time transitions properly.

docs/api/addHours.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
title: addHours()
3+
---
4+
15
# addHours()
26

37
Adds or subtracts hours from a Date object.

docs/api/addMilliseconds.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
title: addMilliseconds()
3+
---
4+
15
# addMilliseconds()
26

37
Adds or subtracts milliseconds from a Date object.

docs/api/addMinutes.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
title: addMinutes()
3+
---
4+
15
# addMinutes()
26

37
Adds or subtracts minutes from a Date object.

docs/api/addMonths.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
title: addMonths()
3+
---
4+
15
# addMonths()
26

37
Adds or subtracts months from a Date object. Handles month boundaries, leap years, and varying month lengths appropriately.

docs/api/addSeconds.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
title: addSeconds()
3+
---
4+
15
# addSeconds()
26

37
Adds or subtracts seconds from a Date object.

docs/api/addYears.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
title: addYears()
3+
---
4+
15
# addYears()
26

37
Adds or subtracts years from a Date object. Handles leap years and edge cases appropriately.

docs/api/compile.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
title: compile()
3+
---
4+
15
# compile()
26

37
Precompiles a format string into a reusable compiled object for improved performance when the same format pattern is used repeatedly.

docs/api/format.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
---
2+
title: format()
3+
---
4+
15
# format()
26

37
Formats a Date object according to the specified format string.

0 commit comments

Comments
 (0)