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