Skip to content

Commit 88108b6

Browse files
committed
fix docs
1 parent 186f44d commit 88108b6

1 file changed

Lines changed: 30 additions & 31 deletions

File tree

docs/.vitepress/config.js

Lines changed: 30 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,75 @@
11
import baseConfig from '@cakephp/docs-skeleton/config'
2+
import { createRequire } from 'module'
23

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')
99

1010
const versions = {
11-
text: "3.x",
11+
text: '3.x',
1212
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' },
1515
],
16-
};
16+
}
1717

18-
// This file contains overrides for .vitepress/config.js
1918
export default {
2019
extends: baseConfig,
2120
srcDir: '.',
2221
title: 'Chronos',
2322
description: 'CakePHP Chronos Documentation',
24-
base: "/3/",
23+
base: '/chronos/3/',
2524
rewrites: {
26-
"en/:slug*": ":slug*",
25+
'en/:slug*': ':slug*',
2726
},
2827
sitemap: {
29-
hostname: "https://book.cakephp.org/chronos/3/",
28+
hostname: 'https://book.cakephp.org/chronos/3/',
3029
},
3130
themeConfig: {
3231
socialLinks: [
33-
{ icon: "github", link: "https://github.com/cakephp/chronos" },
32+
{ icon: 'github', link: 'https://github.com/cakephp/chronos' },
3433
],
3534
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',
3837
},
3938
sidebar: toc_en,
4039
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' },
4342
{ ...versions },
4443
],
4544
},
4645
locales: {
4746
root: {
48-
label: "English",
49-
lang: "en",
47+
label: 'English',
48+
lang: 'en',
5049
themeConfig: {
5150
sidebar: toc_en,
5251
},
5352
},
54-
'/fr/': {
55-
label: "Français",
56-
lang: "fr",
53+
fr: {
54+
label: 'Français',
55+
lang: 'fr',
5756
themeConfig: {
5857
sidebar: toc_fr,
5958
},
6059
},
61-
'/ja/': {
62-
label: "日本語",
63-
lang: "ja",
60+
ja: {
61+
label: '日本語',
62+
lang: 'ja',
6463
themeConfig: {
6564
sidebar: toc_ja,
6665
},
6766
},
68-
'/pt/': {
69-
label: "Português",
70-
lang: "pt",
67+
pt: {
68+
label: 'Português',
69+
lang: 'pt',
7170
themeConfig: {
7271
sidebar: toc_pt,
7372
},
7473
},
7574
},
76-
};
75+
}

0 commit comments

Comments
 (0)