Skip to content

Commit 45be89d

Browse files
authored
Merge branch '5.next' into 5.next-console-ux
2 parents 9fc6f3b + 66103f7 commit 45be89d

24 files changed

Lines changed: 2476 additions & 414 deletions

.github/.markdownlint-cli2.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
"no-emphasis-as-heading": false
7676
},
7777
"customRules": [
78-
"./markdownlint-rules/no-space-after-fence.js"
78+
"./markdownlint-rules/no-space-after-fence.cjs"
7979
],
8080
"ignores": [
8181
"node_modules/**"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,15 @@ function checkLink(link, docsDir, lang) {
5151
* e.g., "toc_en.json" -> "en"
5252
*/
5353
function getLangFromTocFile(tocFile) {
54-
const match = tocFile.match(/^toc_(\w+)\.json$/);
54+
const match = tocFile.match(/toc_(\w+)\.json$/);
5555
return match ? match[1] : null;
5656
}
5757

5858
/**
5959
* Main validation function
6060
*/
6161
function validateTocFiles() {
62-
const tocFiles = fs.readdirSync(".").filter((f) => f.match(/^toc_.*\.json$/));
62+
const tocFiles = fs.readdirSync(".vitepress").filter((f) => f.match(/^toc_.*\.json$/)).map((f) => `.vitepress/${f}`);
6363

6464
if (tocFiles.length === 0) {
6565
console.error("No toc_*.json files found");
File renamed without changes.

.github/workflows/docs-validation.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
uses: actions/checkout@v6
2929

3030
- name: Validate config.js syntax
31-
run: node --check config.js
31+
run: node --check .vitepress/config.js
3232

3333
json-lint:
3434
name: Validate JSON Files
@@ -40,7 +40,7 @@ jobs:
4040

4141
- name: Validate JSON syntax
4242
run: |
43-
for file in toc_*.json; do
43+
for file in .vitepress/toc_*.json; do
4444
if ! jq empty "$file" 2>/dev/null; then
4545
echo "Invalid JSON: $file"
4646
exit 1
@@ -57,7 +57,7 @@ jobs:
5757
uses: actions/checkout@v6
5858

5959
- name: Check TOC links exist
60-
run: node bin/check-toc-links.js
60+
run: node .github/check-toc-links.cjs
6161

6262
markdown-lint:
6363
name: Lint Markdown
@@ -68,7 +68,7 @@ jobs:
6868
uses: actions/checkout@v6
6969

7070
- name: Lint markdown files
71-
uses: DavidAnson/markdownlint-cli2-action@v22
71+
uses: DavidAnson/markdownlint-cli2-action@v23
7272
with:
7373
config: './.github/.markdownlint-cli2.jsonc'
7474
globs: 'docs/**/*.md'
@@ -121,4 +121,4 @@ jobs:
121121
122122
- name: Check internal links
123123
if: steps.changed-files.outputs.files != ''
124-
run: node bin/check-links.js --baseline .github/linkchecker-baseline.json ${{ steps.changed-files.outputs.files }}
124+
run: node .github/check-links.cjs --baseline .github/linkchecker-baseline.json ${{ steps.changed-files.outputs.files }}

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
.vitepress/.temp
66
/node_modules/
77
.temp/
8+
docs/public/favicon/
9+
docs/public/fonts/
10+
docs/public/icons/
11+
docs/public/logo.svg
812

913
# IDE and editor specific files #
1014
#################################

config.js renamed to .vitepress/config.js

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import baseConfig, { substitutionsReplacer } from '@cakephp/docs-skeleton/config'
2+
13
import { createRequire } from "module";
24
const require = createRequire(import.meta.url);
35
const toc_en = require("./toc_en.json");
@@ -17,8 +19,21 @@ const versions = {
1719
],
1820
};
1921

22+
const substitutions = {
23+
'|phpversion|': { value: '8.5', format: 'bold' },
24+
'|minphpversion|': { value: '8.2', format: 'italic' },
25+
'|cakeversion|': '5.4.0',
26+
'|cakefullversion|': 'CakePHP 5.next',
27+
};
28+
2029
// This file contains overrides for .vitepress/config.js
2130
export default {
31+
extends: baseConfig,
32+
markdown: {
33+
config(md) {
34+
md.use(substitutionsReplacer, { substitutions });
35+
}
36+
},
2237
base: "/5.next/",
2338
rewrites: {
2439
"en/:slug*": ":slug*",
@@ -47,12 +62,6 @@ export default {
4762
linkText: 'Go to latest docs.'
4863
}
4964
},
50-
substitutions: {
51-
'|phpversion|': { value: '8.5', format: 'bold' },
52-
'|minphpversion|': { value: '8.2', format: 'italic' },
53-
'|cakeversion|': '5.4.0',
54-
'|cakefullversion|': 'CakePHP 5.next',
55-
},
5665
locales: {
5766
root: {
5867
label: "English",

.vitepress/theme/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { default } from '@cakephp/docs-skeleton'
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)