|
| 1 | +import { defineConfig } from 'vitepress' |
| 2 | + |
| 3 | +function unifiedSidebar() { |
| 4 | + return [ |
| 5 | + { |
| 6 | + text: 'Getting Started', |
| 7 | + items: [ |
| 8 | + { text: 'Overview', link: '/guide/' }, |
| 9 | + { text: '5-min Quick Start', link: '/guide/quick-start' }, |
| 10 | + { text: 'Installation', link: '/guide/install' }, |
| 11 | + { text: 'Upgrade Guide', link: '/guide/upgrade' }, |
| 12 | + { text: 'Shims', link: '/guide/shims' }, |
| 13 | + { text: 'Tools Backend', link: '/guide/backend' }, |
| 14 | + { text: 'Plugin Ecosystem', link: '/guide/ecosystem' }, |
| 15 | + ], |
| 16 | + }, |
| 17 | + { |
| 18 | + text: 'Behaviors', |
| 19 | + collapsed: true, |
| 20 | + items: [ |
| 21 | + { text: 'Overview', link: '/behavior/' }, |
| 22 | + { text: 'AfterSave', link: '/behavior/after-save' }, |
| 23 | + { text: 'Bitmasked', link: '/behavior/bitmasked' }, |
| 24 | + { text: 'Encryption', link: '/behavior/encryption' }, |
| 25 | + { text: 'Jsonable', link: '/behavior/jsonable' }, |
| 26 | + { text: 'Passwordable', link: '/behavior/passwordable' }, |
| 27 | + { text: 'Reset', link: '/behavior/reset' }, |
| 28 | + { text: 'Slugged', link: '/behavior/slugged' }, |
| 29 | + { text: 'String', link: '/behavior/string' }, |
| 30 | + { text: 'Toggle', link: '/behavior/toggle' }, |
| 31 | + { text: 'Typographic', link: '/behavior/typographic' }, |
| 32 | + ], |
| 33 | + }, |
| 34 | + { |
| 35 | + text: 'Helpers', |
| 36 | + collapsed: true, |
| 37 | + items: [ |
| 38 | + { text: 'Overview', link: '/helper/' }, |
| 39 | + { text: 'Common', link: '/helper/common' }, |
| 40 | + { text: 'Format', link: '/helper/format' }, |
| 41 | + { text: 'Form', link: '/helper/form' }, |
| 42 | + { text: 'Html', link: '/helper/html' }, |
| 43 | + { text: 'Icon', link: '/helper/icon' }, |
| 44 | + { text: 'Meter', link: '/helper/meter' }, |
| 45 | + { text: 'Progress', link: '/helper/progress' }, |
| 46 | + { text: 'Tree', link: '/helper/tree' }, |
| 47 | + { text: 'Typography', link: '/helper/typography' }, |
| 48 | + ], |
| 49 | + }, |
| 50 | + { |
| 51 | + text: 'Components', |
| 52 | + collapsed: true, |
| 53 | + items: [ |
| 54 | + { text: 'Overview', link: '/component/' }, |
| 55 | + { text: 'Common', link: '/component/common' }, |
| 56 | + { text: 'Mobile', link: '/component/mobile' }, |
| 57 | + { text: 'RefererRedirect', link: '/component/referer-redirect' }, |
| 58 | + ], |
| 59 | + }, |
| 60 | + { |
| 61 | + text: 'Model & Entity', |
| 62 | + collapsed: true, |
| 63 | + items: [ |
| 64 | + { text: 'Overview', link: '/model/' }, |
| 65 | + { text: 'Table', link: '/model/table' }, |
| 66 | + { text: 'Tokens', link: '/model/tokens' }, |
| 67 | + { text: 'Enum', link: '/model/enum' }, |
| 68 | + { text: 'StaticEnum', link: '/model/static-enum' }, |
| 69 | + ], |
| 70 | + }, |
| 71 | + { |
| 72 | + text: 'Reference', |
| 73 | + collapsed: true, |
| 74 | + items: [ |
| 75 | + { text: 'Overview', link: '/reference/' }, |
| 76 | + { text: 'Login Links', link: '/reference/login-link' }, |
| 77 | + { text: 'Email', link: '/reference/email' }, |
| 78 | + { text: 'Controller', link: '/reference/controller' }, |
| 79 | + { text: 'Inflect Command', link: '/reference/inflect' }, |
| 80 | + { text: 'I18n', link: '/reference/i18n' }, |
| 81 | + { text: 'DateTime', link: '/reference/date-time' }, |
| 82 | + { text: 'URL', link: '/reference/url' }, |
| 83 | + { text: 'ExceptionTrap', link: '/reference/exception-trap' }, |
| 84 | + { text: 'FileLog', link: '/reference/file-log' }, |
| 85 | + { text: 'Datalist Widget', link: '/reference/datalist' }, |
| 86 | + ], |
| 87 | + }, |
| 88 | + ] |
| 89 | +} |
| 90 | + |
| 91 | +export default defineConfig({ |
| 92 | + title: 'cakephp-tools', |
| 93 | + description: 'The CakePHP Toolbox: behaviors, helpers, components, model and entity utilities for CakePHP applications.', |
| 94 | + base: '/cakephp-tools/', |
| 95 | + lastUpdated: true, |
| 96 | + sitemap: { |
| 97 | + hostname: 'https://dereuromark.github.io/cakephp-tools/', |
| 98 | + }, |
| 99 | + head: [ |
| 100 | + ['link', { rel: 'icon', href: '/cakephp-tools/favicon.svg', type: 'image/svg+xml' }], |
| 101 | + ], |
| 102 | + themeConfig: { |
| 103 | + logo: '/logo.svg', |
| 104 | + nav: [ |
| 105 | + { text: 'Guide', link: '/guide/', activeMatch: '/guide/' }, |
| 106 | + { text: 'Reference', link: '/reference/', activeMatch: '/(reference|behavior|helper|component|model)/' }, |
| 107 | + { |
| 108 | + text: 'Links', |
| 109 | + items: [ |
| 110 | + { text: 'GitHub', link: 'https://github.com/dereuromark/cakephp-tools' }, |
| 111 | + { text: 'Packagist', link: 'https://packagist.org/packages/dereuromark/cakephp-tools' }, |
| 112 | + { text: 'Issues', link: 'https://github.com/dereuromark/cakephp-tools/issues' }, |
| 113 | + ], |
| 114 | + }, |
| 115 | + ], |
| 116 | + sidebar: { |
| 117 | + '/': unifiedSidebar(), |
| 118 | + }, |
| 119 | + socialLinks: [ |
| 120 | + { icon: 'github', link: 'https://github.com/dereuromark/cakephp-tools' }, |
| 121 | + ], |
| 122 | + search: { |
| 123 | + provider: 'local', |
| 124 | + }, |
| 125 | + editLink: { |
| 126 | + pattern: 'https://github.com/dereuromark/cakephp-tools/edit/master/docs/:path', |
| 127 | + text: 'Edit this page on GitHub', |
| 128 | + }, |
| 129 | + footer: { |
| 130 | + message: 'Released under the MIT License.', |
| 131 | + copyright: 'Copyright Mark Scherer', |
| 132 | + }, |
| 133 | + }, |
| 134 | +}) |
0 commit comments