close
Skip to content

Commit a25ec87

Browse files
committed
Merge branch '3.x' into 3.next
# Conflicts: # src/Command/TemplateCommand.php
2 parents e173734 + 093b385 commit a25ec87

183 files changed

Lines changed: 5413 additions & 3384 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/deploy_docs_3x.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ jobs:
2121
with:
2222
git_remote_url: 'ssh://dokku@apps.cakephp.org:22/bake-docs-3'
2323
ssh_private_key: ${{ secrets.DOKKU_SSH_PRIVATE_KEY }}
24+
branch: '3.x'
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Documentation Validation
2+
3+
on:
4+
push:
5+
branches:
6+
- 3.x
7+
paths:
8+
- 'docs/**'
9+
- '.github/**'
10+
pull_request:
11+
paths:
12+
- 'docs/**'
13+
- '.github/**'
14+
15+
jobs:
16+
validate:
17+
uses: cakephp/.github/.github/workflows/docs-validation.yml@5.x
18+
with:
19+
docs-path: 'docs'
20+
vitepress-path: 'docs/.vitepress'
21+
enable-config-js-check: true
22+
enable-json-lint: true
23+
enable-toc-check: true
24+
enable-spell-check: true
25+
enable-markdown-lint: true
26+
enable-link-check: true
27+
tools-ref: '5.x'

‎Dockerfile‎

Lines changed: 36 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,36 @@
1-
# Basic docker based environment
2-
# Necessary to trick dokku into building the documentation
3-
# using dockerfile instead of herokuish
4-
FROM ubuntu:22.04
5-
6-
# Add basic tools
7-
RUN apt-get update && \
8-
apt-get install -y build-essential \
9-
software-properties-common \
10-
curl \
11-
git \
12-
libxml2 \
13-
libffi-dev \
14-
libssl-dev
15-
16-
# Prevent interactive timezone input
17-
ENV DEBIAN_FRONTEND=noninteractive
18-
RUN LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php && \
19-
apt-get update && \
20-
apt-get install -y php8.1-cli php8.1-mbstring php8.1-xml php8.1-zip php8.1-intl php8.1-opcache php8.1-sqlite
21-
22-
WORKDIR /code
23-
24-
VOLUME ["/code"]
25-
26-
CMD [ '/bin/bash' ]
1+
# ----------------------
2+
# 1. Build stage
3+
# ----------------------
4+
FROM node:24-alpine AS builder
5+
6+
# Git is required because docs/package.json pulls a dependency from GitHub.
7+
RUN apk add --no-cache git openssh-client
8+
9+
WORKDIR /app/docs
10+
11+
# Copy dependency manifests first to preserve Docker layer caching.
12+
COPY docs/ ./
13+
RUN npm ci
14+
15+
# Increase max-old-space-size to avoid memory issues during build
16+
#ENV NODE_OPTIONS="--max-old-space-size=8192"
17+
18+
# Build the site.
19+
RUN npm run docs:build
20+
21+
# ----------------------
22+
# 2. Runtime stage (angie)
23+
# ----------------------
24+
FROM docker.angie.software/angie:latest AS runner
25+
26+
# Copy built files
27+
COPY --from=builder /app/docs/.vitepress/dist /usr/share/angie/html
28+
29+
# Expose port
30+
EXPOSE 80
31+
32+
# Health check (optional)
33+
HEALTHCHECK CMD wget --quiet --tries=1 --spider http://localhost:80/ || exit 1
34+
35+
# Start angie
36+
CMD ["angie", "-g", "daemon off;"]

‎composer.json‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@
7171
"stan": "@phpstan",
7272
"stan-baseline": "tools/phpstan --generate-baseline",
7373
"stan-setup": "phive install",
74+
"rector-setup": "cp composer.json composer.backup && composer require --dev rector/rector:\"~2.3.1\" && mv composer.backup composer.json",
75+
"rector-check": "vendor/bin/rector process --dry-run",
76+
"rector-fix": "vendor/bin/rector process",
7477
"test": "phpunit",
7578
"test-coverage": "phpunit --coverage-clover=clover.xml"
7679
}

‎docs.Dockerfile‎

Lines changed: 0 additions & 24 deletions
This file was deleted.

‎docs/.gitignore‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules
2+
*/public/
3+
.vitepress/cache
4+
.vitepress/dist

‎docs/.vitepress/config.js‎

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
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+
siteTitle: false,
35+
pluginName: "Bake",
36+
socialLinks: [
37+
{ icon: 'github', link: 'https://github.com/cakephp/bake' },
38+
],
39+
editLink: {
40+
pattern: 'https://github.com/cakephp/bake/edit/3.x/docs/:path',
41+
text: 'Edit this page on GitHub',
42+
},
43+
sidebar: tocEn,
44+
nav: [
45+
{ text: 'CakePHP', link: 'https://cakephp.org' },
46+
{ text: 'API', link: 'https://api.cakephp.org/bake/' },
47+
{ ...versions },
48+
],
49+
},
50+
locales: {
51+
root: {
52+
label: 'English',
53+
lang: 'en',
54+
themeConfig: {
55+
sidebar: tocEn,
56+
},
57+
},
58+
es: {
59+
label: 'Español',
60+
lang: 'es',
61+
themeConfig: {
62+
sidebar: tocEs,
63+
},
64+
},
65+
fr: {
66+
label: 'Français',
67+
lang: 'fr',
68+
themeConfig: {
69+
sidebar: tocFr,
70+
},
71+
},
72+
ja: {
73+
label: '日本語',
74+
lang: 'ja',
75+
themeConfig: {
76+
sidebar: tocJa,
77+
},
78+
},
79+
pt: {
80+
label: 'Português',
81+
lang: 'pt',
82+
themeConfig: {
83+
sidebar: tocPt,
84+
},
85+
},
86+
ru: {
87+
label: 'Русский',
88+
lang: 'ru',
89+
themeConfig: {
90+
sidebar: tocRu,
91+
},
92+
},
93+
},
94+
}

‎docs/.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'

‎docs/.vitepress/toc_en.json‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"/": [
3+
{
4+
"text": "CakePHP Bake",
5+
"collapsed": false,
6+
"items": [
7+
{ "text": "Bake Console", "link": "/" },
8+
{ "text": "Code Generation with Bake", "link": "/usage" },
9+
{ "text": "Extending Bake", "link": "/development" }
10+
]
11+
}
12+
]
13+
}

‎docs/.vitepress/toc_es.json‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"/es/": [
3+
{
4+
"text": "CakePHP Bake",
5+
"collapsed": false,
6+
"items": [
7+
{ "text": "Consola Bake", "link": "/es/" },
8+
{ "text": "Crear código con Bake", "link": "/es/usage" },
9+
{ "text": "Extending Bake", "link": "/es/development" }
10+
]
11+
}
12+
]
13+
}

0 commit comments

Comments
 (0)