Skip to content

Commit d88ea7a

Browse files
author
songsang
committed
docs(calendar): add basePath and replace internal links with Link component
- Add basePath '/calendar' to next.config.mjs - Replace markdown internal links with Next.js Link component for basePath compatibility
1 parent c48e91b commit d88ea7a

File tree

4 files changed

+16
-9
lines changed

4 files changed

+16
-9
lines changed

docs/calendar/app/api-docs/api/use-calendar/page.mdx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import Link from 'next/link';
2+
13
# useCalendar
24

35
The main hook that provides calendar state, navigation controls, and render data.
@@ -113,11 +115,11 @@ The hook returns an object with the following structure:
113115

114116
For detailed information about each part of the return value:
115117

116-
- **[headers](/api-docs/api/headers)** - Weekday header data
117-
- **[body](/api-docs/api/body)** - Calendar grid data
118-
- **[navigation](/api-docs/api/navigation)** - Navigation methods
119-
- **[view](/api-docs/api/view)** - View type controls
120-
- **[utilities](/api-docs/api/utilities)** - Metadata and utility methods
118+
- <Link href="/api-docs/api/headers">**headers**</Link> - Weekday header data
119+
- <Link href="/api-docs/api/body">**body**</Link> - Calendar grid data
120+
- <Link href="/api-docs/api/navigation">**navigation**</Link> - Navigation methods
121+
- <Link href="/api-docs/api/view">**view**</Link> - View type controls
122+
- <Link href="/api-docs/api/utilities">**utilities**</Link> - Metadata and utility methods
121123

122124
## Type Exports
123125

docs/calendar/app/docs/guide/getting-started/page.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import Link from 'next/link';
2+
13
# Getting Started
24

35
Get started with @h6s/calendar in your React application.
@@ -75,12 +77,12 @@ A styled calendar with date selection and month navigation:
7577
<Sandpack files={filesCalendar} height={425} />
7678

7779
<div className="mt-4 flex justify-end">
78-
<a
80+
<Link
7981
href="/docs/examples/date-picker/vanilla"
8082
className="inline-flex items-center gap-1 text-sm text-blue-600 dark:text-blue-400 hover:underline"
8183
>
8284
View more examples →
83-
</a>
85+
</Link>
8486
</div>
8587

8688
## Key Concepts

docs/calendar/app/docs/guide/headless-philosophy/page.mdx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import Link from 'next/link';
2+
13
# Headless Philosophy
24

35
## What is Headless?
@@ -186,7 +188,7 @@ All using the same `useCalendar()` hook.
186188

187189
## Philosophy in Action
188190

189-
See our [Examples](/docs/examples) to see how the same `useCalendar` hook powers completely different calendar designs:
191+
See our <Link href="/docs/examples">Examples</Link> to see how the same `useCalendar` hook powers completely different calendar designs:
190192

191193
- DatePicker with popover
192194
- DateRangePicker with dual calendars
@@ -197,4 +199,4 @@ Each example uses **the exact same hook**, just with different presentation laye
197199

198200
---
199201

200-
**Next:** Learn how to use the [API Reference](/api-docs/api/use-calendar) to build your own calendar.
202+
**Next:** Learn how to use the <Link href="/api-docs/api/use-calendar">API Reference</Link> to build your own calendar.

docs/calendar/next.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ const withNextra = nextra({
66

77
export default withNextra({
88
reactStrictMode: true,
9+
basePath: "/calendar",
910
});

0 commit comments

Comments
 (0)