|
| 1 | +import { defineConfig } from 'vitepress' |
| 2 | + |
| 3 | +function unifiedSidebar() { |
| 4 | + return [ |
| 5 | + { |
| 6 | + text: 'Getting Started', |
| 7 | + collapsed: false, |
| 8 | + items: [ |
| 9 | + { text: 'Overview', link: '/guide/' }, |
| 10 | + { text: '5-min Quick Start', link: '/guide/quick-start' }, |
| 11 | + { text: 'Installation', link: '/guide/install' }, |
| 12 | + { text: 'Configuration', link: '/guide/configuration' }, |
| 13 | + { text: 'Custom Adapters', link: '/guide/custom-adapters' }, |
| 14 | + { text: 'Troubleshooting', link: '/guide/troubleshooting' }, |
| 15 | + { text: 'Upgrade Guide', link: '/guide/upgrade' }, |
| 16 | + ], |
| 17 | + }, |
| 18 | + { |
| 19 | + text: 'Authentication', |
| 20 | + collapsed: false, |
| 21 | + items: [ |
| 22 | + { text: 'Setup & INI', link: '/authentication/' }, |
| 23 | + { text: 'Impersonation', link: '/authentication/impersonation' }, |
| 24 | + { text: 'Custom Adapter', link: '/authentication/adapter' }, |
| 25 | + ], |
| 26 | + }, |
| 27 | + { |
| 28 | + text: 'Authorization', |
| 29 | + collapsed: false, |
| 30 | + items: [ |
| 31 | + { text: 'Setup & INI', link: '/authorization/' }, |
| 32 | + { text: 'Middleware & Policy', link: '/authorization/middleware' }, |
| 33 | + { text: 'Custom Adapter', link: '/authorization/adapter' }, |
| 34 | + { text: 'Multi-Role', link: '/authorization/multi-role' }, |
| 35 | + ], |
| 36 | + }, |
| 37 | + { |
| 38 | + text: 'Helpers & Tools', |
| 39 | + collapsed: false, |
| 40 | + items: [ |
| 41 | + { text: 'AuthUser (Component / Helper)', link: '/auth-user' }, |
| 42 | + { text: 'AuthPanel (DebugKit)', link: '/auth-panel' }, |
| 43 | + ], |
| 44 | + }, |
| 45 | + { |
| 46 | + text: 'Reference', |
| 47 | + collapsed: true, |
| 48 | + items: [ |
| 49 | + { text: 'CLI Commands', link: '/reference/cli' }, |
| 50 | + ], |
| 51 | + }, |
| 52 | + ] |
| 53 | +} |
| 54 | + |
| 55 | +export default defineConfig({ |
| 56 | + title: 'cakephp-tinyauth', |
| 57 | + description: 'INI-based authentication and authorization for CakePHP — a thin wrapper over the official Authentication and Authorization plugins.', |
| 58 | + base: '/cakephp-tinyauth/', |
| 59 | + lastUpdated: true, |
| 60 | + sitemap: { |
| 61 | + hostname: 'https://dereuromark.github.io/cakephp-tinyauth/', |
| 62 | + }, |
| 63 | + head: [ |
| 64 | + ['link', { rel: 'icon', href: '/cakephp-tinyauth/favicon.svg', type: 'image/svg+xml' }], |
| 65 | + ], |
| 66 | + themeConfig: { |
| 67 | + logo: '/logo.svg', |
| 68 | + nav: [ |
| 69 | + { text: 'Guide', link: '/guide/', activeMatch: '/guide/' }, |
| 70 | + { text: 'Authentication', link: '/authentication/', activeMatch: '/authentication/' }, |
| 71 | + { text: 'Authorization', link: '/authorization/', activeMatch: '/authorization/' }, |
| 72 | + { |
| 73 | + text: 'Links', |
| 74 | + items: [ |
| 75 | + { text: 'GitHub', link: 'https://github.com/dereuromark/cakephp-tinyauth' }, |
| 76 | + { text: 'Packagist', link: 'https://packagist.org/packages/dereuromark/cakephp-tinyauth' }, |
| 77 | + { text: 'Issues', link: 'https://github.com/dereuromark/cakephp-tinyauth/issues' }, |
| 78 | + { text: 'TinyAuth Backend (admin GUI)', link: 'https://github.com/dereuromark/cakephp-tinyauth-backend' }, |
| 79 | + ], |
| 80 | + }, |
| 81 | + ], |
| 82 | + sidebar: { |
| 83 | + '/': unifiedSidebar(), |
| 84 | + }, |
| 85 | + socialLinks: [ |
| 86 | + { icon: 'github', link: 'https://github.com/dereuromark/cakephp-tinyauth' }, |
| 87 | + ], |
| 88 | + search: { |
| 89 | + provider: 'local', |
| 90 | + }, |
| 91 | + editLink: { |
| 92 | + pattern: 'https://github.com/dereuromark/cakephp-tinyauth/edit/master/docs/:path', |
| 93 | + text: 'Edit this page on GitHub', |
| 94 | + }, |
| 95 | + footer: { |
| 96 | + message: 'Released under the MIT License.', |
| 97 | + copyright: 'Copyright Mark Scherer', |
| 98 | + }, |
| 99 | + }, |
| 100 | +}) |
0 commit comments