|
| 1 | +import baseConfig from '@cakephp/docs-skeleton/config' |
| 2 | +import { createRequire } from 'module' |
| 3 | + |
| 4 | +const require = createRequire(import.meta.url) |
| 5 | +const tocEn = require('./toc_en.json') |
| 6 | +const tocEs = require('./toc_es.json') |
| 7 | +const tocFr = require('./toc_fr.json') |
| 8 | +const tocJa = require('./toc_ja.json') |
| 9 | + |
| 10 | +const versions = { |
| 11 | + text: '3.x', |
| 12 | + items: [ |
| 13 | + { text: '3.x (current)', link: 'https://book.cakephp.org/authorization/3/', target: '_self' }, |
| 14 | + { text: '2.x', link: 'https://book.cakephp.org/authorization/2/en/', target: '_self' }, |
| 15 | + ], |
| 16 | +} |
| 17 | + |
| 18 | +export default { |
| 19 | + extends: baseConfig, |
| 20 | + srcDir: '.', |
| 21 | + title: 'Authorization', |
| 22 | + description: 'CakePHP Authorization Documentation', |
| 23 | + base: '/authorization/3/', |
| 24 | + rewrites: { |
| 25 | + 'en/:slug*': ':slug*', |
| 26 | + }, |
| 27 | + sitemap: { |
| 28 | + hostname: 'https://book.cakephp.org/authorization/3/', |
| 29 | + }, |
| 30 | + themeConfig: { |
| 31 | + socialLinks: [ |
| 32 | + { icon: 'github', link: 'https://github.com/cakephp/authorization' }, |
| 33 | + ], |
| 34 | + editLink: { |
| 35 | + pattern: 'https://github.com/cakephp/authorization/edit/3.x/docs/:path', |
| 36 | + text: 'Edit this page on GitHub', |
| 37 | + }, |
| 38 | + sidebar: tocEn, |
| 39 | + nav: [ |
| 40 | + { text: 'CakePHP', link: 'https://cakephp.org' }, |
| 41 | + { text: 'API', link: 'https://api.cakephp.org/authorization/' }, |
| 42 | + { ...versions }, |
| 43 | + ], |
| 44 | + }, |
| 45 | + locales: { |
| 46 | + root: { |
| 47 | + label: 'English', |
| 48 | + lang: 'en', |
| 49 | + themeConfig: { |
| 50 | + sidebar: tocEn, |
| 51 | + }, |
| 52 | + }, |
| 53 | + es: { |
| 54 | + label: 'Español', |
| 55 | + lang: 'es', |
| 56 | + themeConfig: { |
| 57 | + sidebar: tocEs, |
| 58 | + }, |
| 59 | + }, |
| 60 | + fr: { |
| 61 | + label: 'Français', |
| 62 | + lang: 'fr', |
| 63 | + themeConfig: { |
| 64 | + sidebar: tocFr, |
| 65 | + }, |
| 66 | + }, |
| 67 | + ja: { |
| 68 | + label: '日本語', |
| 69 | + lang: 'ja', |
| 70 | + themeConfig: { |
| 71 | + sidebar: tocJa, |
| 72 | + }, |
| 73 | + }, |
| 74 | + }, |
| 75 | +} |
0 commit comments