-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Expand file tree
/
Copy pathconfig.js
More file actions
70 lines (68 loc) · 1.98 KB
/
config.js
File metadata and controls
70 lines (68 loc) · 1.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import { createRequire } from "module";
const require = createRequire(import.meta.url);
const toc_en = require("./toc_en.json");
const toc_ja = require("./toc_ja.json");
const versions = {
text: "5.x",
items: [
{ text: "5.x (latest)", link: "https://book.cakephp.org/5.x/", target: '_self' },
{ text: "4.x", link: "https://book.cakephp.org/4.x/", target: '_self' },
{ text: "3.x", link: "https://book.cakephp.org/3.x/", target: '_self' },
{ text: "2.x", link: "https://book.cakephp.org/2.x/", target: '_self' },
{ text: "Next releases", items: [
{ text: "5.next", link: "https://book.cakephp.org/5.next/", target: '_self' },
{ text: "6.x", link: "https://book.cakephp.org/6.x/", target: '_self' },
]},
],
};
// This file contains overrides for .vitepress/config.js
export default {
base: "/5.x/",
rewrites: {
"en/:slug*": ":slug*",
},
sitemap: {
hostname: "https://book.cakephp.org/5.x/",
},
themeConfig: {
socialLinks: [
{ icon: "github", link: "https://github.com/cakephp/cakephp" },
],
editLink: {
pattern: "https://github.com/cakephp/docs/edit/5.x/docs/:path",
text: "Edit this page on GitHub",
},
sidebar: toc_en,
nav: [
{ text: "Guide", link: "/intro" },
{ text: "API", link: "https://api.cakephp.org/" },
{ text: "Documentation", link: "/" },
{ ...versions },
],
},
substitutions: {
'|phpversion|': { value: '8.5', format: 'bold' },
'|minphpversion|': { value: '8.2', format: 'italic' },
'|cakeversion|': '5.3',
'|cakefullversion|': 'CakePHP 5',
},
locales: {
root: {
label: "English",
lang: "en",
},
ja: {
label: "Japanese",
lang: "ja",
themeConfig: {
nav: [
{ text: "ガイド", link: "/ja/intro" },
{ text: "API", link: "https://api.cakephp.org/" },
{ text: "ドキュメント", link: "/ja/" },
{ ...versions },
],
sidebar: toc_ja,
},
},
},
};