|
| 1 | +import { defineConfig } from 'astro/config'; |
| 2 | +import starlight from '@astrojs/starlight'; |
| 3 | + |
| 4 | +export default defineConfig({ |
| 5 | + outDir: './pages', |
| 6 | + srcDir: './docs', |
| 7 | + site: 'https://knowledgecode.github.io', |
| 8 | + base: '/date-and-time', |
| 9 | + trailingSlash: 'never', |
| 10 | + devToolbar: { |
| 11 | + enabled: false, |
| 12 | + }, |
| 13 | + markdown: { |
| 14 | + shikiConfig: { |
| 15 | + themes: { |
| 16 | + light: 'github-light', |
| 17 | + dark: 'github-dark', |
| 18 | + }, |
| 19 | + }, |
| 20 | + }, |
| 21 | + integrations: [ |
| 22 | + starlight({ |
| 23 | + customCss: [ |
| 24 | + './docs/styles/custom.css', |
| 25 | + ], |
| 26 | + title: 'date-and-time', |
| 27 | + description: 'The simplest, most intuitive date and time library', |
| 28 | + logo: { |
| 29 | + src: './docs/assets/logo.png', |
| 30 | + alt: 'date-and-time', |
| 31 | + }, |
| 32 | + social: [ |
| 33 | + { icon: 'github', label: 'GitHub', href: 'https://github.com/knowledgecode/date-and-time' }, |
| 34 | + { icon: 'npm', label: 'npm', href: 'https://www.npmjs.com/package/date-and-time' }, |
| 35 | + ], |
| 36 | + sidebar: [ |
| 37 | + { |
| 38 | + label: 'Getting Started', |
| 39 | + items: [ |
| 40 | + { label: 'Introduction', link: '/guide' }, |
| 41 | + { label: 'Installation', link: '/guide/installation' }, |
| 42 | + { label: 'Quick Start', link: '/guide/quick-start' }, |
| 43 | + ], |
| 44 | + }, |
| 45 | + { |
| 46 | + label: 'API Reference', |
| 47 | + collapsed: true, |
| 48 | + items: [ |
| 49 | + { label: 'Overview', link: '/api' }, |
| 50 | + { |
| 51 | + label: 'Core Functions', |
| 52 | + items: [ |
| 53 | + { label: 'format()', link: '/api/format' }, |
| 54 | + { label: 'parse()', link: '/api/parse' }, |
| 55 | + { label: 'compile()', link: '/api/compile' }, |
| 56 | + { label: 'preparse()', link: '/api/preparse' }, |
| 57 | + { label: 'isValid()', link: '/api/isvalid' }, |
| 58 | + { label: 'transform()', link: '/api/transform' }, |
| 59 | + { label: 'addYears()', link: '/api/addyears' }, |
| 60 | + { label: 'addMonths()', link: '/api/addmonths' }, |
| 61 | + { label: 'addDays()', link: '/api/adddays' }, |
| 62 | + { label: 'addHours()', link: '/api/addhours' }, |
| 63 | + { label: 'addMinutes()', link: '/api/addminutes' }, |
| 64 | + { label: 'addSeconds()', link: '/api/addseconds' }, |
| 65 | + { label: 'addMilliseconds()', link: '/api/addmilliseconds' }, |
| 66 | + { label: 'subtract()', link: '/api/subtract' }, |
| 67 | + ], |
| 68 | + }, |
| 69 | + { |
| 70 | + label: 'Utility Functions', |
| 71 | + items: [ |
| 72 | + { label: 'isLeapYear()', link: '/api/utils/isleapyear' }, |
| 73 | + { label: 'isSameDay()', link: '/api/utils/issameday' }, |
| 74 | + { label: 'getDaysInMonth()', link: '/api/utils/getdaysinmonth' }, |
| 75 | + { label: 'getISOWeekYear()', link: '/api/utils/getisoweekyear' }, |
| 76 | + { label: 'getISOWeek()', link: '/api/utils/getisoweek' }, |
| 77 | + ], |
| 78 | + }, |
| 79 | + ], |
| 80 | + }, |
| 81 | + { label: 'Locales', link: '/locales' }, |
| 82 | + { label: 'Timezones', link: '/timezones' }, |
| 83 | + { label: 'Plugins', link: '/plugins' }, |
| 84 | + { label: 'Migration Guide', link: '/migration' }, |
| 85 | + ], |
| 86 | + }), |
| 87 | + ], |
| 88 | +}); |
0 commit comments