|
| 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 | +const tocPt = require('./toc_pt.json') |
| 10 | +const tocRu = require('./toc_ru.json') |
| 11 | + |
| 12 | +const versions = { |
| 13 | + text: '3.x', |
| 14 | + items: [ |
| 15 | + { text: '3.x (current)', link: 'https://book.cakephp.org/bake/3/', target: '_self' }, |
| 16 | + { text: '2.x', link: 'https://book.cakephp.org/bake/2.x/', target: '_self' }, |
| 17 | + { text: '1.x', link: 'https://book.cakephp.org/bake/1.x/', target: '_self' }, |
| 18 | + ], |
| 19 | +} |
| 20 | + |
| 21 | +export default { |
| 22 | + extends: baseConfig, |
| 23 | + srcDir: '.', |
| 24 | + title: 'Bake', |
| 25 | + description: 'CakePHP Bake Documentation', |
| 26 | + base: '/bake/3/', |
| 27 | + rewrites: { |
| 28 | + 'en/:slug*': ':slug*', |
| 29 | + }, |
| 30 | + sitemap: { |
| 31 | + hostname: 'https://book.cakephp.org/bake/3/', |
| 32 | + }, |
| 33 | + themeConfig: { |
| 34 | + socialLinks: [ |
| 35 | + { icon: 'github', link: 'https://github.com/cakephp/bake' }, |
| 36 | + ], |
| 37 | + editLink: { |
| 38 | + pattern: 'https://github.com/cakephp/bake/edit/3.x/docs/:path', |
| 39 | + text: 'Edit this page on GitHub', |
| 40 | + }, |
| 41 | + sidebar: tocEn, |
| 42 | + nav: [ |
| 43 | + { text: 'CakePHP', link: 'https://cakephp.org' }, |
| 44 | + { text: 'API', link: 'https://api.cakephp.org/bake/' }, |
| 45 | + { ...versions }, |
| 46 | + ], |
| 47 | + }, |
| 48 | + locales: { |
| 49 | + root: { |
| 50 | + label: 'English', |
| 51 | + lang: 'en', |
| 52 | + themeConfig: { |
| 53 | + sidebar: tocEn, |
| 54 | + }, |
| 55 | + }, |
| 56 | + es: { |
| 57 | + label: 'Español', |
| 58 | + lang: 'es', |
| 59 | + themeConfig: { |
| 60 | + sidebar: tocEs, |
| 61 | + }, |
| 62 | + }, |
| 63 | + fr: { |
| 64 | + label: 'Français', |
| 65 | + lang: 'fr', |
| 66 | + themeConfig: { |
| 67 | + sidebar: tocFr, |
| 68 | + }, |
| 69 | + }, |
| 70 | + ja: { |
| 71 | + label: '日本語', |
| 72 | + lang: 'ja', |
| 73 | + themeConfig: { |
| 74 | + sidebar: tocJa, |
| 75 | + }, |
| 76 | + }, |
| 77 | + pt: { |
| 78 | + label: 'Português', |
| 79 | + lang: 'pt', |
| 80 | + themeConfig: { |
| 81 | + sidebar: tocPt, |
| 82 | + }, |
| 83 | + }, |
| 84 | + ru: { |
| 85 | + label: 'Русский', |
| 86 | + lang: 'ru', |
| 87 | + themeConfig: { |
| 88 | + sidebar: tocRu, |
| 89 | + }, |
| 90 | + }, |
| 91 | + }, |
| 92 | +} |
0 commit comments