|
| 1 | +import { defineConfig } from 'astro/config'; |
| 2 | +import starlight from '@astrojs/starlight'; |
| 3 | + |
| 4 | +export default defineConfig({ |
| 5 | + srcDir: './docs', |
| 6 | + site: 'https://knowledgecode.github.io', |
| 7 | + base: '/date-and-time', |
| 8 | + trailingSlash: 'never', |
| 9 | + markdown: { |
| 10 | + shikiConfig: { |
| 11 | + themes: { |
| 12 | + light: 'github-light', |
| 13 | + dark: 'github-dark', |
| 14 | + }, |
| 15 | + }, |
| 16 | + }, |
| 17 | + integrations: [ |
| 18 | + starlight({ |
| 19 | + title: 'date-and-time', |
| 20 | + description: 'The simplest, most intuitive date and time library', |
| 21 | + logo: { |
| 22 | + src: './public/logo.png', |
| 23 | + alt: 'date-and-time', |
| 24 | + }, |
| 25 | + social: [ |
| 26 | + { icon: 'github', label: 'GitHub', href: 'https://github.com/knowledgecode/date-and-time' }, |
| 27 | + { icon: 'npm', label: 'npm', href: 'https://www.npmjs.com/package/date-and-time' }, |
| 28 | + ], |
| 29 | + sidebar: [ |
| 30 | + { |
| 31 | + label: 'Getting Started', |
| 32 | + items: [ |
| 33 | + { label: 'Introduction', slug: 'guide/index' }, |
| 34 | + { label: 'Installation', slug: 'guide/installation' }, |
| 35 | + { label: 'Quick Start', slug: 'guide/quick-start' }, |
| 36 | + ], |
| 37 | + }, |
| 38 | + { |
| 39 | + label: 'API Reference', |
| 40 | + collapsed: true, |
| 41 | + items: [ |
| 42 | + { label: 'Overview', slug: 'api/index' }, |
| 43 | + { |
| 44 | + label: 'Core Functions', |
| 45 | + 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' }, |
| 60 | + ], |
| 61 | + }, |
| 62 | + { |
| 63 | + label: 'Utility Functions', |
| 64 | + 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' }, |
| 70 | + ], |
| 71 | + }, |
| 72 | + ], |
| 73 | + }, |
| 74 | + { label: 'Locales', slug: 'locales' }, |
| 75 | + { label: 'Timezones', slug: 'timezones' }, |
| 76 | + { label: 'Plugins', slug: 'plugins' }, |
| 77 | + { label: 'Migration Guide', slug: 'migration' }, |
| 78 | + ], |
| 79 | + }), |
| 80 | + ], |
| 81 | +}); |
0 commit comments