Skip to content
Closed
Show file tree
Hide file tree
Changes from 26 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.yml]
indent_size = 2
49 changes: 49 additions & 0 deletions .github/workflows/jekyll-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Deploy Jekyll with GitHub Pages

on:
push:
branches: ["master"]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.4.8

- name: Install dependencies
run: |
gem install bundler
bundle install

- name: Build site
run: bundle exec jekyll build -d ./_site

- name: Upload artifact
uses: actions/upload-pages-artifact@v4

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
Empty file removed .nojekyll
Empty file.
13 changes: 13 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
source "https://rubygems.org"

ruby "3.4.8"

gem "jekyll", "~> 4.4.1"
gem "minima", "~> 2.5.2"

group :jekyll_plugins do
gem "jekyll-seo-tag", "~> 2.8.0"
gem "jekyll-optional-front-matter", "~> 0.3.2"
gem "jekyll-readme-index", "~> 0.3.0"
gem "jekyll-relative-links", "~> 0.7.0"
end
9 changes: 9 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
defaults:
- scope:
path: ""
Copy link

Copilot AI Dec 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The render_with_liquid: false configuration has been removed from _config.yml. However, this setting was likely intentional to prevent Jekyll/Liquid from processing Markdown files that contain Twig syntax (which uses similar {{ }} and {% %} delimiters). Removing this setting means Jekyll will now try to process all Liquid-like syntax in the documentation.

While the PR adds {% raw %} tags to one specific code block in template-engines.md, there are multiple other Twig code blocks in the same file (lines 19-43, 49-55, 75-87, 90-99) that also contain Liquid-like syntax but are NOT wrapped in {% raw %} tags. These will now be processed by Jekyll and potentially cause build errors or incorrect rendering.

Either the render_with_liquid: false setting should be kept, or ALL Twig code blocks throughout the documentation need to be wrapped with {% raw %}/{% endraw %} tags.

Suggested change
path: ""
path: ""
values:
render_with_liquid: false

Copilot uses AI. Check for mistakes.
values:
layout: "default"
baseurl: "/docs"
theme: minima
relative_links:
enabled: true
28 changes: 28 additions & 0 deletions _layouts/default.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<!DOCTYPE html>
<html lang="{{ page.lang | default: site.lang | default: " en" }}">

{%- include head.html -%}

<body>

{%- include header.html -%}

<main class="page-content" aria-label="Content">
<div class="wrapper">
{{ content }}
</div>
</main>

{%- include footer.html -%}

<script type="module">
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs';
mermaid.initialize({startOnLoad: false});
mermaid.run({
querySelector: 'code.language-mermaid'
});
</script>

</body>

</html>
23 changes: 19 additions & 4 deletions _translations/guide/po/es/start_workflow.md.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2025-10-19 11:32+0000\n"
"POT-Creation-Date: 2025-12-20 13:19+0000\n"
"PO-Revision-Date: 2025-09-04 11:19+0500\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
Expand Down Expand Up @@ -40,7 +40,7 @@ msgstr ""

#. type: Plain text
#: ../../guide/en/start/workflow.md
msgid "The installed application has only the homepage, which displays when you access the URL `http://localhost/`. It shares a common layout that you can reuse on further pages."
msgid "The installed application contains only one page, accessible at `http://localhost/`. It shares a common layout that you can reuse on further pages."
msgstr ""

#. type: Plain text
Expand Down Expand Up @@ -133,9 +133,24 @@ msgstr ""
msgid "The following diagram shows how an application handles a request."
msgstr ""

#. type: Plain text
#. type: Fenced code block (mermaid)
#: ../../guide/en/start/workflow.md
msgid "![Request Lifecycle](img/request-lifecycle.svg)"
#, no-wrap
msgid ""
"flowchart LR\n"
" user[User's client] --> index\n"
" index[index.php] --> DI[Initialize Dependency Container]\n"
" config[configs] -.-> DI\n"
" DI --> RequestFactory[RequestFactory]\n"
" RequestFactory -->|Request| app[Application]\n"
" app -->|Request| middleware[Middleware]\n"
" middleware -->|Request| router[Router]\n"
" router -->|Request| action[Action Handler]\n"
" action -->|Response| emitter[SapiEmitter]\n"
" router -->|Response| emitter\n"
" middleware -->|Response| emitter\n"
" app -->|Response| emitter\n"
" emitter --> user\n"
msgstr ""

#. type: Bullet: '1. '
Expand Down
23 changes: 19 additions & 4 deletions _translations/guide/po/id/start_workflow.md.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2025-10-19 11:32+0000\n"
"POT-Creation-Date: 2025-12-20 13:19+0000\n"
"PO-Revision-Date: 2025-09-04 11:19+0500\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
Expand Down Expand Up @@ -39,7 +39,7 @@ msgstr ""

#. type: Plain text
#: ../../guide/en/start/workflow.md
msgid "The installed application has only the homepage, which displays when you access the URL `http://localhost/`. It shares a common layout that you can reuse on further pages."
msgid "The installed application contains only one page, accessible at `http://localhost/`. It shares a common layout that you can reuse on further pages."
msgstr ""

#. type: Plain text
Expand Down Expand Up @@ -132,9 +132,24 @@ msgstr ""
msgid "The following diagram shows how an application handles a request."
msgstr ""

#. type: Plain text
#. type: Fenced code block (mermaid)
#: ../../guide/en/start/workflow.md
msgid "![Request Lifecycle](img/request-lifecycle.svg)"
#, no-wrap
msgid ""
"flowchart LR\n"
" user[User's client] --> index\n"
" index[index.php] --> DI[Initialize Dependency Container]\n"
" config[configs] -.-> DI\n"
" DI --> RequestFactory[RequestFactory]\n"
" RequestFactory -->|Request| app[Application]\n"
" app -->|Request| middleware[Middleware]\n"
" middleware -->|Request| router[Router]\n"
" router -->|Request| action[Action Handler]\n"
" action -->|Response| emitter[SapiEmitter]\n"
" router -->|Response| emitter\n"
" middleware -->|Response| emitter\n"
" app -->|Response| emitter\n"
" emitter --> user\n"
msgstr ""

#. type: Bullet: '1. '
Expand Down
23 changes: 19 additions & 4 deletions _translations/guide/po/ru/start_workflow.md.po
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2025-10-19 11:32+0000\n"
"POT-Creation-Date: 2025-12-20 13:19+0000\n"
"PO-Revision-Date: 2025-09-04 11:19+0500\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
Expand Down Expand Up @@ -41,7 +41,7 @@ msgstr "Определение псевдонимов <span id=\"defining-aliase

#. type: Plain text
#: ../../guide/en/start/workflow.md
msgid "The installed application has only the homepage, which displays when you access the URL `http://localhost/`. It shares a common layout that you can reuse on further pages."
msgid "The installed application contains only one page, accessible at `http://localhost/`. It shares a common layout that you can reuse on further pages."
msgstr ""

#. type: Plain text
Expand Down Expand Up @@ -135,9 +135,24 @@ msgstr "Полезные ссылки <span id=\"references\"></span>"
msgid "The following diagram shows how an application handles a request."
msgstr ""

#. type: Plain text
#. type: Fenced code block (mermaid)
#: ../../guide/en/start/workflow.md
msgid "![Request Lifecycle](img/request-lifecycle.svg)"
#, no-wrap
msgid ""
"flowchart LR\n"
" user[User's client] --> index\n"
" index[index.php] --> DI[Initialize Dependency Container]\n"
" config[configs] -.-> DI\n"
" DI --> RequestFactory[RequestFactory]\n"
" RequestFactory -->|Request| app[Application]\n"
" app -->|Request| middleware[Middleware]\n"
" middleware -->|Request| router[Router]\n"
" router -->|Request| action[Action Handler]\n"
" action -->|Response| emitter[SapiEmitter]\n"
" router -->|Response| emitter\n"
" middleware -->|Response| emitter\n"
" app -->|Response| emitter\n"
" emitter --> user\n"
msgstr ""

#. type: Bullet: '1. '
Expand Down
26 changes: 20 additions & 6 deletions _translations/guide/pot/start_workflow.md.pot
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2025-10-19 11:32+0000\n"
"POT-Creation-Date: 2025-12-20 13:19+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -47,9 +47,8 @@ msgstr ""
#. type: Plain text
#: ../../guide/en/start/workflow.md
msgid ""
"The installed application has only the homepage, which displays when you "
"access the URL `http://localhost/`. It shares a common layout that you can "
"reuse on further pages."
"The installed application contains only one page, accessible at `http://"
"localhost/`. It shares a common layout that you can reuse on further pages."
msgstr ""

#. type: Plain text
Expand Down Expand Up @@ -165,9 +164,24 @@ msgstr ""
msgid "The following diagram shows how an application handles a request."
msgstr ""

#. type: Plain text
#. type: Fenced code block (mermaid)
#: ../../guide/en/start/workflow.md
msgid "![Request Lifecycle](img/request-lifecycle.svg)"
#, no-wrap
msgid ""
"flowchart LR\n"
" user[User's client] --> index\n"
" index[index.php] --> DI[Initialize Dependency Container]\n"
" config[configs] -.-> DI\n"
" DI --> RequestFactory[RequestFactory]\n"
" RequestFactory -->|Request| app[Application]\n"
" app -->|Request| middleware[Middleware]\n"
" middleware -->|Request| router[Router]\n"
" router -->|Request| action[Action Handler]\n"
" action -->|Response| emitter[SapiEmitter]\n"
" router -->|Response| emitter\n"
" middleware -->|Response| emitter\n"
" app -->|Response| emitter\n"
" emitter --> user\n"
msgstr ""

#. type: Bullet: '1. '
Expand Down
4 changes: 4 additions & 0 deletions cookbook/en/deployment/docker-swarm.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
---
render_with_liquid: false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's better to disable Liquid globally at config level because front matter is rendered at GitHub: 787e837

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree, added.

---

# Deploying Yii applications to Docker Swarm

Check notice on line 5 in cookbook/en/deployment/docker-swarm.md

View workflow job for this annotation

GitHub Actions / vale

[vale] cookbook/en/deployment/docker-swarm.md#L5

[Microsoft.Headings] 'Deploying Yii applications to Docker Swarm' should use sentence-style capitalization.
Raw output
{"message": "[Microsoft.Headings] 'Deploying Yii applications to Docker Swarm' should use sentence-style capitalization.", "location": {"path": "cookbook/en/deployment/docker-swarm.md", "range": {"start": {"line": 5, "column": 3}}}, "severity": "INFO"}

This guide walks you through deploying a Yii application to Docker Swarm from a blank server, using Caddy as a reverse proxy and a container registry (Forgejo or Gitea).

Expand All @@ -17,7 +21,7 @@

## Prerequisites

- A server with a fresh installation of a Linux distribution (Ubuntu 22.04 LTS or later recommended)

Check notice on line 24 in cookbook/en/deployment/docker-swarm.md

View workflow job for this annotation

GitHub Actions / vale

[vale] cookbook/en/deployment/docker-swarm.md#L24

[Microsoft.Acronyms] 'LTS' has no definition.
Raw output
{"message": "[Microsoft.Acronyms] 'LTS' has no definition.", "location": {"path": "cookbook/en/deployment/docker-swarm.md", "range": {"start": {"line": 24, "column": 76}}}, "severity": "INFO"}
- A domain name pointing to your server's IP address
- SSH access to your server
- Basic knowledge of Docker and command-line tools
Expand All @@ -28,7 +32,7 @@

For installation instructions, see the [official Docker documentation](https://docs.docker.com/engine/install/ubuntu/).

### Initialize Docker Swarm

Check notice on line 35 in cookbook/en/deployment/docker-swarm.md

View workflow job for this annotation

GitHub Actions / vale

[vale] cookbook/en/deployment/docker-swarm.md#L35

[Microsoft.Headings] 'Initialize Docker Swarm' should use sentence-style capitalization.
Raw output
{"message": "[Microsoft.Headings] 'Initialize Docker Swarm' should use sentence-style capitalization.", "location": {"path": "cookbook/en/deployment/docker-swarm.md", "range": {"start": {"line": 35, "column": 5}}}, "severity": "INFO"}

Initialize your server as a Docker Swarm manager:

Expand All @@ -50,7 +54,7 @@

You need a container registry to store your Docker images. Choose one of the following options.

### Option 1: Using Forgejo

Check notice on line 57 in cookbook/en/deployment/docker-swarm.md

View workflow job for this annotation

GitHub Actions / vale

[vale] cookbook/en/deployment/docker-swarm.md#L57

[Microsoft.Headings] 'Option 1: Using Forgejo' should use sentence-style capitalization.
Raw output
{"message": "[Microsoft.Headings] 'Option 1: Using Forgejo' should use sentence-style capitalization.", "location": {"path": "cookbook/en/deployment/docker-swarm.md", "range": {"start": {"line": 57, "column": 5}}}, "severity": "INFO"}

Deploy Forgejo as a container registry.

Expand Down Expand Up @@ -91,7 +95,7 @@

After deployment, access Forgejo at `https://git.example.com` and complete the initial setup. Make sure to enable the container registry in the settings.

### Option 2: Using Gitea

Check notice on line 98 in cookbook/en/deployment/docker-swarm.md

View workflow job for this annotation

GitHub Actions / vale

[vale] cookbook/en/deployment/docker-swarm.md#L98

[Microsoft.Headings] 'Option 2: Using Gitea' should use sentence-style capitalization.
Raw output
{"message": "[Microsoft.Headings] 'Option 2: Using Gitea' should use sentence-style capitalization.", "location": {"path": "cookbook/en/deployment/docker-swarm.md", "range": {"start": {"line": 98, "column": 5}}}, "severity": "INFO"}

Deploy Gitea as a container registry.

Expand Down Expand Up @@ -167,10 +171,10 @@
docker stack deploy -c caddy-stack.yml caddy
```

Caddy automatically discovers services with Caddy labels and sets up HTTPS using Let's Encrypt.

Check warning on line 174 in cookbook/en/deployment/docker-swarm.md

View workflow job for this annotation

GitHub Actions / vale

[vale] cookbook/en/deployment/docker-swarm.md#L174

[Microsoft.We] Try to avoid using first-person plural like 'Let's'.
Raw output
{"message": "[Microsoft.We] Try to avoid using first-person plural like 'Let's'.", "location": {"path": "cookbook/en/deployment/docker-swarm.md", "range": {"start": {"line": 174, "column": 82}}}, "severity": "WARNING"}

> [!IMPORTANT]
> Make sure your domain DNS records are configured and pointing to your server before deploying services with Caddy labels, as Let's Encrypt requires domain validation.

Check notice on line 177 in cookbook/en/deployment/docker-swarm.md

View workflow job for this annotation

GitHub Actions / vale

[vale] cookbook/en/deployment/docker-swarm.md#L177

[Microsoft.Acronyms] 'DNS' has no definition.
Raw output
{"message": "[Microsoft.Acronyms] 'DNS' has no definition.", "location": {"path": "cookbook/en/deployment/docker-swarm.md", "range": {"start": {"line": 177, "column": 25}}}, "severity": "INFO"}

Check notice on line 177 in cookbook/en/deployment/docker-swarm.md

View workflow job for this annotation

GitHub Actions / vale

[vale] cookbook/en/deployment/docker-swarm.md#L177

[Microsoft.Passive] 'are configured' looks like passive voice.
Raw output
{"message": "[Microsoft.Passive] 'are configured' looks like passive voice.", "location": {"path": "cookbook/en/deployment/docker-swarm.md", "range": {"start": {"line": 177, "column": 37}}}, "severity": "INFO"}

Check warning on line 177 in cookbook/en/deployment/docker-swarm.md

View workflow job for this annotation

GitHub Actions / vale

[vale] cookbook/en/deployment/docker-swarm.md#L177

[Microsoft.We] Try to avoid using first-person plural like 'Let's'.
Raw output
{"message": "[Microsoft.We] Try to avoid using first-person plural like 'Let's'.", "location": {"path": "cookbook/en/deployment/docker-swarm.md", "range": {"start": {"line": 177, "column": 128}}}, "severity": "WARNING"}

## Alternative: Using Traefik as reverse proxy

Expand Down Expand Up @@ -236,9 +240,9 @@
- "traefik.http.services.app.loadbalancer.server.port=80"
```

## Configuring your Yii application

Check notice on line 243 in cookbook/en/deployment/docker-swarm.md

View workflow job for this annotation

GitHub Actions / vale

[vale] cookbook/en/deployment/docker-swarm.md#L243

[Microsoft.Headings] 'Configuring your Yii application' should use sentence-style capitalization.
Raw output
{"message": "[Microsoft.Headings] 'Configuring your Yii application' should use sentence-style capitalization.", "location": {"path": "cookbook/en/deployment/docker-swarm.md", "range": {"start": {"line": 243, "column": 4}}}, "severity": "INFO"}

### Update the Makefile configuration

Check notice on line 245 in cookbook/en/deployment/docker-swarm.md

View workflow job for this annotation

GitHub Actions / vale

[vale] cookbook/en/deployment/docker-swarm.md#L245

[Microsoft.Headings] 'Update the Makefile configuration' should use sentence-style capitalization.
Raw output
{"message": "[Microsoft.Headings] 'Update the Makefile configuration' should use sentence-style capitalization.", "location": {"path": "cookbook/en/deployment/docker-swarm.md", "range": {"start": {"line": 245, "column": 5}}}, "severity": "INFO"}

The [Yii application template](https://github.com/yiisoft/app) includes a Makefile with deployment commands. Update the `docker/.env` file in your project:

Expand All @@ -258,7 +262,7 @@

Replace the values:
- `STACK_NAME`: A unique name for your application stack
- `PROD_HOST`: The domain name where your app will be accessible

Check notice on line 265 in cookbook/en/deployment/docker-swarm.md

View workflow job for this annotation

GitHub Actions / vale

[vale] cookbook/en/deployment/docker-swarm.md#L265

[Microsoft.Vocab] Verify your use of 'accessible' with the A-Z word list.
Raw output
{"message": "[Microsoft.Vocab] Verify your use of 'accessible' with the A-Z word list.", "location": {"path": "cookbook/en/deployment/docker-swarm.md", "range": {"start": {"line": 265, "column": 55}}}, "severity": "INFO"}
- `PROD_SSH`: SSH connection string to your server (format: `ssh://user@host`)
- `IMAGE`: Full path to your container image in the registry
- `IMAGE_TAG`: Image tag, typically `latest` or a version number
Expand Down Expand Up @@ -330,7 +334,7 @@
- Uses a rolling update strategy with automatic rollback on failure
- Configures `labels` for automatic HTTPS on the reverse proxy
- Disables obtaining of HTTPs certificates on the container itself
since proxy communicates with the container via HTTP. That is `auto_https off`.

Check failure on line 337 in cookbook/en/deployment/docker-swarm.md

View workflow job for this annotation

GitHub Actions / vale

[vale] cookbook/en/deployment/docker-swarm.md#L337

[Microsoft.Contractions] Use 'that's' instead of 'That is'.
Raw output
{"message": "[Microsoft.Contractions] Use 'that's' instead of 'That is'.", "location": {"path": "cookbook/en/deployment/docker-swarm.md", "range": {"start": {"line": 337, "column": 57}}}, "severity": "ERROR"}

If you need a database, add it to the stack:

Expand Down Expand Up @@ -416,9 +420,9 @@
docker push ${IMAGE}:${IMAGE_TAG}
```

## Deploying to Docker Swarm

Check notice on line 423 in cookbook/en/deployment/docker-swarm.md

View workflow job for this annotation

GitHub Actions / vale

[vale] cookbook/en/deployment/docker-swarm.md#L423

[Microsoft.Headings] 'Deploying to Docker Swarm' should use sentence-style capitalization.
Raw output
{"message": "[Microsoft.Headings] 'Deploying to Docker Swarm' should use sentence-style capitalization.", "location": {"path": "cookbook/en/deployment/docker-swarm.md", "range": {"start": {"line": 423, "column": 4}}}, "severity": "INFO"}

### Configure SSH access

Check notice on line 425 in cookbook/en/deployment/docker-swarm.md

View workflow job for this annotation

GitHub Actions / vale

[vale] cookbook/en/deployment/docker-swarm.md#L425

[Microsoft.Headings] 'Configure SSH access' should use sentence-style capitalization.
Raw output
{"message": "[Microsoft.Headings] 'Configure SSH access' should use sentence-style capitalization.", "location": {"path": "cookbook/en/deployment/docker-swarm.md", "range": {"start": {"line": 425, "column": 5}}}, "severity": "INFO"}

Check warning on line 425 in cookbook/en/deployment/docker-swarm.md

View workflow job for this annotation

GitHub Actions / vale

[vale] cookbook/en/deployment/docker-swarm.md#L425

[Microsoft.HeadingAcronyms] Avoid using acronyms in a title or heading.
Raw output
{"message": "[Microsoft.HeadingAcronyms] Avoid using acronyms in a title or heading.", "location": {"path": "cookbook/en/deployment/docker-swarm.md", "range": {"start": {"line": 425, "column": 15}}}, "severity": "WARNING"}

Set up SSH key-based authentication to your server:

Expand Down Expand Up @@ -558,7 +562,7 @@

### Set up a firewall

Configure UFW (Uncomplicated Firewall) on your server:

Check notice on line 565 in cookbook/en/deployment/docker-swarm.md

View workflow job for this annotation

GitHub Actions / vale

[vale] cookbook/en/deployment/docker-swarm.md#L565

[Microsoft.Acronyms] 'UFW' has no definition.
Raw output
{"message": "[Microsoft.Acronyms] 'UFW' has no definition.", "location": {"path": "cookbook/en/deployment/docker-swarm.md", "range": {"start": {"line": 565, "column": 11}}}, "severity": "INFO"}

```bash
# Allow SSH
Expand All @@ -580,7 +584,7 @@

### Keep the system updated

Regularly update your server and Docker:

Check warning on line 587 in cookbook/en/deployment/docker-swarm.md

View workflow job for this annotation

GitHub Actions / vale

[vale] cookbook/en/deployment/docker-swarm.md#L587

[Microsoft.Adverbs] Remove 'Regularly' if it's not important to the meaning of the statement.
Raw output
{"message": "[Microsoft.Adverbs] Remove 'Regularly' if it's not important to the meaning of the statement.", "location": {"path": "cookbook/en/deployment/docker-swarm.md", "range": {"start": {"line": 587, "column": 1}}}, "severity": "WARNING"}

```bash
# Update system packages
Expand All @@ -603,15 +607,15 @@

Common issues:
- **Image pull errors**: Verify registry authentication with `docker -H ssh://docker-web login`
- **Port conflicts**: Ensure no other services are using ports 80/443

Check notice on line 610 in cookbook/en/deployment/docker-swarm.md

View workflow job for this annotation

GitHub Actions / vale

[vale] cookbook/en/deployment/docker-swarm.md#L610

[Microsoft.Vocab] Verify your use of 'Ensure' with the A-Z word list.
Raw output
{"message": "[Microsoft.Vocab] Verify your use of 'Ensure' with the A-Z word list.", "location": {"path": "cookbook/en/deployment/docker-swarm.md", "range": {"start": {"line": 610, "column": 23}}}, "severity": "INFO"}
- **Resource constraints**: Check available resources with `docker -H ssh://docker-web node ls`

### SSL certificate issues

Check warning on line 613 in cookbook/en/deployment/docker-swarm.md

View workflow job for this annotation

GitHub Actions / vale

[vale] cookbook/en/deployment/docker-swarm.md#L613

[Microsoft.HeadingAcronyms] Avoid using acronyms in a title or heading.
Raw output
{"message": "[Microsoft.HeadingAcronyms] Avoid using acronyms in a title or heading.", "location": {"path": "cookbook/en/deployment/docker-swarm.md", "range": {"start": {"line": 613, "column": 5}}}, "severity": "WARNING"}

Check notice on line 613 in cookbook/en/deployment/docker-swarm.md

View workflow job for this annotation

GitHub Actions / vale

[vale] cookbook/en/deployment/docker-swarm.md#L613

[Microsoft.Headings] 'SSL certificate issues' should use sentence-style capitalization.
Raw output
{"message": "[Microsoft.Headings] 'SSL certificate issues' should use sentence-style capitalization.", "location": {"path": "cookbook/en/deployment/docker-swarm.md", "range": {"start": {"line": 613, "column": 5}}}, "severity": "INFO"}

If Caddy/Traefik can't obtain certificates:
- Verify DNS is pointing to your server

Check notice on line 616 in cookbook/en/deployment/docker-swarm.md

View workflow job for this annotation

GitHub Actions / vale

[vale] cookbook/en/deployment/docker-swarm.md#L616

[Microsoft.Acronyms] 'DNS' has no definition.
Raw output
{"message": "[Microsoft.Acronyms] 'DNS' has no definition.", "location": {"path": "cookbook/en/deployment/docker-swarm.md", "range": {"start": {"line": 616, "column": 10}}}, "severity": "INFO"}
- Check that ports 80 and 443 are accessible from the internet

Check notice on line 617 in cookbook/en/deployment/docker-swarm.md

View workflow job for this annotation

GitHub Actions / vale

[vale] cookbook/en/deployment/docker-swarm.md#L617

[Microsoft.Vocab] Verify your use of 'accessible' with the A-Z word list.
Raw output
{"message": "[Microsoft.Vocab] Verify your use of 'accessible' with the A-Z word list.", "location": {"path": "cookbook/en/deployment/docker-swarm.md", "range": {"start": {"line": 617, "column": 35}}}, "severity": "INFO"}
- Ensure the email in the Let's Encrypt configuration is valid

Check notice on line 618 in cookbook/en/deployment/docker-swarm.md

View workflow job for this annotation

GitHub Actions / vale

[vale] cookbook/en/deployment/docker-swarm.md#L618

[Microsoft.Vocab] Verify your use of 'Ensure' with the A-Z word list.
Raw output
{"message": "[Microsoft.Vocab] Verify your use of 'Ensure' with the A-Z word list.", "location": {"path": "cookbook/en/deployment/docker-swarm.md", "range": {"start": {"line": 618, "column": 3}}}, "severity": "INFO"}

Check warning on line 618 in cookbook/en/deployment/docker-swarm.md

View workflow job for this annotation

GitHub Actions / vale

[vale] cookbook/en/deployment/docker-swarm.md#L618

[Microsoft.We] Try to avoid using first-person plural like 'Let's'.
Raw output
{"message": "[Microsoft.We] Try to avoid using first-person plural like 'Let's'.", "location": {"path": "cookbook/en/deployment/docker-swarm.md", "range": {"start": {"line": 618, "column": 27}}}, "severity": "WARNING"}
- Check logs: `docker -H ssh://docker-web service logs caddy` or `traefik_traefik`

### Container registry connection issues
Expand Down
4 changes: 4 additions & 0 deletions guide/en/start/databases.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
render_with_liquid: false
---

# Working with databases

Yii doesn't dictate using a particular database or storage for your application.
Expand All @@ -7,23 +11,23 @@
- [Yii Active Record](https://github.com/yiisoft/active-record)
- [Cycle](https://github.com/cycle) via [Yii Cycle package](https://github.com/yiisoft/yii-cycle)
- [Doctrine](https://www.doctrine-project.org/) via [Yii Doctrine package](https://github.com/stargazer-team/yii-doctrine)
- [PDO](https://www.php.net/manual/en/book.pdo.php)

Check notice on line 14 in guide/en/start/databases.md

View workflow job for this annotation

GitHub Actions / vale

[vale] guide/en/start/databases.md#L14

[Microsoft.Acronyms] 'PDO' has no definition.
Raw output
{"message": "[Microsoft.Acronyms] 'PDO' has no definition.", "location": {"path": "guide/en/start/databases.md", "range": {"start": {"line": 14, "column": 4}}}, "severity": "INFO"}

For non-relational ones, there are usually official libraries available:

- [ElasticSearch](https://github.com/elastic/elasticsearch-php)
- [Redis](https://redis.io/docs/clients/#php)
- ...

Check warning on line 20 in guide/en/start/databases.md

View workflow job for this annotation

GitHub Actions / vale

[vale] guide/en/start/databases.md#L20

[Microsoft.Ellipses] In general, don't use an ellipsis.
Raw output
{"message": "[Microsoft.Ellipses] In general, don't use an ellipsis.", "location": {"path": "guide/en/start/databases.md", "range": {"start": {"line": 20, "column": 3}}}, "severity": "WARNING"}

In this guide, we will focus on working with relational databases using Yii DB. We'll use PostgreSQL to implement a

Check warning on line 22 in guide/en/start/databases.md

View workflow job for this annotation

GitHub Actions / vale

[vale] guide/en/start/databases.md#L22

[Microsoft.We] Try to avoid using first-person plural like 'we'.
Raw output
{"message": "[Microsoft.We] Try to avoid using first-person plural like 'we'.", "location": {"path": "guide/en/start/databases.md", "range": {"start": {"line": 22, "column": 16}}}, "severity": "WARNING"}

Check warning on line 22 in guide/en/start/databases.md

View workflow job for this annotation

GitHub Actions / vale

[vale] guide/en/start/databases.md#L22

[Microsoft.We] Try to avoid using first-person plural like 'We'.
Raw output
{"message": "[Microsoft.We] Try to avoid using first-person plural like 'We'.", "location": {"path": "guide/en/start/databases.md", "range": {"start": {"line": 22, "column": 81}}}, "severity": "WARNING"}
simple CRUD (create read update delete).

Check notice on line 23 in guide/en/start/databases.md

View workflow job for this annotation

GitHub Actions / vale

[vale] guide/en/start/databases.md#L23

[Microsoft.Acronyms] 'CRUD' has no definition.
Raw output
{"message": "[Microsoft.Acronyms] 'CRUD' has no definition.", "location": {"path": "guide/en/start/databases.md", "range": {"start": {"line": 23, "column": 8}}}, "severity": "INFO"}

## Installing PostgreSQL

Check notice on line 25 in guide/en/start/databases.md

View workflow job for this annotation

GitHub Actions / vale

[vale] guide/en/start/databases.md#L25

[Microsoft.Headings] 'Installing PostgreSQL' should use sentence-style capitalization.
Raw output
{"message": "[Microsoft.Headings] 'Installing PostgreSQL' should use sentence-style capitalization.", "location": {"path": "guide/en/start/databases.md", "range": {"start": {"line": 25, "column": 4}}}, "severity": "INFO"}

You need to install PostgreSQL. If you prefer not to use Docker,
[get the installer from official website](https://www.postgresql.org/download/), install it and create a database.

If you use Docker, it is a bit simpler. Modify `docker/dev/compose.yml`:

Check failure on line 30 in guide/en/start/databases.md

View workflow job for this annotation

GitHub Actions / vale

[vale] guide/en/start/databases.md#L30

[Microsoft.Contractions] Use 'it's' instead of 'it is'.
Raw output
{"message": "[Microsoft.Contractions] Use 'it's' instead of 'it is'.", "location": {"path": "guide/en/start/databases.md", "range": {"start": {"line": 30, "column": 20}}}, "severity": "ERROR"}

```yaml
services:
Expand Down Expand Up @@ -71,19 +75,19 @@
db:
```

Note that we add `depends_on` so application waits for database to be up.

Check warning on line 78 in guide/en/start/databases.md

View workflow job for this annotation

GitHub Actions / vale

[vale] guide/en/start/databases.md#L78

[Microsoft.We] Try to avoid using first-person plural like 'we'.
Raw output
{"message": "[Microsoft.We] Try to avoid using first-person plural like 'we'.", "location": {"path": "guide/en/start/databases.md", "range": {"start": {"line": 78, "column": 11}}}, "severity": "WARNING"}

Also, we'll need a `pdo_pgsql` extension to communicate with PostgreSQL. You can enable it locally in `php.ini`.

Check warning on line 80 in guide/en/start/databases.md

View workflow job for this annotation

GitHub Actions / vale

[vale] guide/en/start/databases.md#L80

[Microsoft.We] Try to avoid using first-person plural like 'we'.
Raw output
{"message": "[Microsoft.We] Try to avoid using first-person plural like 'we'.", "location": {"path": "guide/en/start/databases.md", "range": {"start": {"line": 80, "column": 7}}}, "severity": "WARNING"}
If you use Docker, check `docker/Dockerfile` and add `pdo_pgsql` in `install-php-extensions` list. Then rebuild
PHP image with `make build && make down && make up`.

## Configuring connection

Now that we have the database, it's time to define the connection.

Check warning on line 86 in guide/en/start/databases.md

View workflow job for this annotation

GitHub Actions / vale

[vale] guide/en/start/databases.md#L86

[Microsoft.We] Try to avoid using first-person plural like 'we'.
Raw output
{"message": "[Microsoft.We] Try to avoid using first-person plural like 'we'.", "location": {"path": "guide/en/start/databases.md", "range": {"start": {"line": 86, "column": 10}}}, "severity": "WARNING"}

Check failure on line 86 in guide/en/start/databases.md

View workflow job for this annotation

GitHub Actions / vale

[vale] guide/en/start/databases.md#L86

[Microsoft.Contractions] Use 'we've' instead of 'we have'.
Raw output
{"message": "[Microsoft.Contractions] Use 'we've' instead of 'we have'.", "location": {"path": "guide/en/start/databases.md", "range": {"start": {"line": 86, "column": 10}}}, "severity": "ERROR"}

Let's use latest versions to be released. Change your `minimum-stability` to `dev` in `composer.json` first.

Check warning on line 88 in guide/en/start/databases.md

View workflow job for this annotation

GitHub Actions / vale

[vale] guide/en/start/databases.md#L88

[Microsoft.We] Try to avoid using first-person plural like 'Let's'.
Raw output
{"message": "[Microsoft.We] Try to avoid using first-person plural like 'Let's'.", "location": {"path": "guide/en/start/databases.md", "range": {"start": {"line": 88, "column": 1}}}, "severity": "WARNING"}

Check notice on line 88 in guide/en/start/databases.md

View workflow job for this annotation

GitHub Actions / vale

[vale] guide/en/start/databases.md#L88

[Microsoft.Passive] 'be released' looks like passive voice.
Raw output
{"message": "[Microsoft.Passive] 'be released' looks like passive voice.", "location": {"path": "guide/en/start/databases.md", "range": {"start": {"line": 88, "column": 30}}}, "severity": "INFO"}

Then we need a package to be installed:

Check warning on line 90 in guide/en/start/databases.md

View workflow job for this annotation

GitHub Actions / vale

[vale] guide/en/start/databases.md#L90

[Microsoft.We] Try to avoid using first-person plural like 'we'.
Raw output
{"message": "[Microsoft.We] Try to avoid using first-person plural like 'we'.", "location": {"path": "guide/en/start/databases.md", "range": {"start": {"line": 90, "column": 6}}}, "severity": "WARNING"}

Check notice on line 90 in guide/en/start/databases.md

View workflow job for this annotation

GitHub Actions / vale

[vale] guide/en/start/databases.md#L90

[Microsoft.Passive] 'be installed' looks like passive voice.
Raw output
{"message": "[Microsoft.Passive] 'be installed' looks like passive voice.", "location": {"path": "guide/en/start/databases.md", "range": {"start": {"line": 90, "column": 27}}}, "severity": "INFO"}

```sh
make composer require yiisoft/db-pgsql dev-master
Expand Down Expand Up @@ -129,18 +133,18 @@
];
```

`db` host is resolved automatically within the Docker network.

Check notice on line 136 in guide/en/start/databases.md

View workflow job for this annotation

GitHub Actions / vale

[vale] guide/en/start/databases.md#L136

[Microsoft.Passive] 'is resolved' looks like passive voice.
Raw output
{"message": "[Microsoft.Passive] 'is resolved' looks like passive voice.", "location": {"path": "guide/en/start/databases.md", "range": {"start": {"line": 136, "column": 11}}}, "severity": "INFO"}

For local installation without Docker the host in Dsn would be `localhost`. You'll have to adjust the rest to match
how you configured the database.

## Creating and applying migrations

For the initial state of the application and for further database changes, it is a good idea to use migrations.

Check failure on line 143 in guide/en/start/databases.md

View workflow job for this annotation

GitHub Actions / vale

[vale] guide/en/start/databases.md#L143

[Microsoft.Contractions] Use 'it's' instead of 'it is'.
Raw output
{"message": "[Microsoft.Contractions] Use 'it's' instead of 'it is'.", "location": {"path": "guide/en/start/databases.md", "range": {"start": {"line": 143, "column": 76}}}, "severity": "ERROR"}
These are files that create database changes. Applied migrations are tracked in the database, allowing us to know

Check notice on line 144 in guide/en/start/databases.md

View workflow job for this annotation

GitHub Actions / vale

[vale] guide/en/start/databases.md#L144

[Microsoft.Passive] 'are tracked' looks like passive voice.
Raw output
{"message": "[Microsoft.Passive] 'are tracked' looks like passive voice.", "location": {"path": "guide/en/start/databases.md", "range": {"start": {"line": 144, "column": 66}}}, "severity": "INFO"}

Check warning on line 144 in guide/en/start/databases.md

View workflow job for this annotation

GitHub Actions / vale

[vale] guide/en/start/databases.md#L144

[Microsoft.We] Try to avoid using first-person plural like 'us'.
Raw output
{"message": "[Microsoft.We] Try to avoid using first-person plural like 'us'.", "location": {"path": "guide/en/start/databases.md", "range": {"start": {"line": 144, "column": 104}}}, "severity": "WARNING"}
the current state and which migrations remain to be applied.

Check notice on line 145 in guide/en/start/databases.md

View workflow job for this annotation

GitHub Actions / vale

[vale] guide/en/start/databases.md#L145

[Microsoft.Passive] 'be applied' looks like passive voice.
Raw output
{"message": "[Microsoft.Passive] 'be applied' looks like passive voice.", "location": {"path": "guide/en/start/databases.md", "range": {"start": {"line": 145, "column": 50}}}, "severity": "INFO"}

To use migrations we need another package installed:

Check warning on line 147 in guide/en/start/databases.md

View workflow job for this annotation

GitHub Actions / vale

[vale] guide/en/start/databases.md#L147

[Microsoft.We] Try to avoid using first-person plural like 'we'.
Raw output
{"message": "[Microsoft.We] Try to avoid using first-person plural like 'we'.", "location": {"path": "guide/en/start/databases.md", "range": {"start": {"line": 147, "column": 19}}}, "severity": "WARNING"}

```sh
composer require yiisoft/db-migration dev-master
Expand All @@ -156,7 +160,7 @@
],
```

Now you can use `make yii migrate:create page` to create a new migration. For our example we need a `page` table

Check warning on line 163 in guide/en/start/databases.md

View workflow job for this annotation

GitHub Actions / vale

[vale] guide/en/start/databases.md#L163

[Microsoft.We] Try to avoid using first-person plural like 'our'.
Raw output
{"message": "[Microsoft.We] Try to avoid using first-person plural like 'our'.", "location": {"path": "guide/en/start/databases.md", "range": {"start": {"line": 163, "column": 79}}}, "severity": "WARNING"}

Check warning on line 163 in guide/en/start/databases.md

View workflow job for this annotation

GitHub Actions / vale

[vale] guide/en/start/databases.md#L163

[Microsoft.We] Try to avoid using first-person plural like 'we'.
Raw output
{"message": "[Microsoft.We] Try to avoid using first-person plural like 'we'.", "location": {"path": "guide/en/start/databases.md", "range": {"start": {"line": 163, "column": 91}}}, "severity": "WARNING"}
with some columns:

```php
Expand Down Expand Up @@ -196,15 +200,15 @@
}
```

Note that we use UUID as the primary key. While the storage space is a bit bigger than using int, the workflow with

Check warning on line 203 in guide/en/start/databases.md

View workflow job for this annotation

GitHub Actions / vale

[vale] guide/en/start/databases.md#L203

[Microsoft.We] Try to avoid using first-person plural like 'we'.
Raw output
{"message": "[Microsoft.We] Try to avoid using first-person plural like 'we'.", "location": {"path": "guide/en/start/databases.md", "range": {"start": {"line": 203, "column": 11}}}, "severity": "WARNING"}

Check notice on line 203 in guide/en/start/databases.md

View workflow job for this annotation

GitHub Actions / vale

[vale] guide/en/start/databases.md#L203

[Microsoft.Acronyms] 'UUID' has no definition.
Raw output
{"message": "[Microsoft.Acronyms] 'UUID' has no definition.", "location": {"path": "guide/en/start/databases.md", "range": {"start": {"line": 203, "column": 18}}}, "severity": "INFO"}
such IDs is beneficial. You generate the ID yourself so you can define a set of related data and save it in a single
transaction. The entities that define this set of data in the code are often called an "aggregate".

Check failure on line 205 in guide/en/start/databases.md

View workflow job for this annotation

GitHub Actions / vale

[vale] guide/en/start/databases.md#L205

[Microsoft.Quotes] Punctuation should be inside the quotes.
Raw output
{"message": "[Microsoft.Quotes] Punctuation should be inside the quotes.", "location": {"path": "guide/en/start/databases.md", "range": {"start": {"line": 205, "column": 88}}}, "severity": "ERROR"}

Apply it with `make yii migrate:up`.

## An entity

Now that you have a table it is time to define an entity in the code. Create `src/Web/Page/Page.php`:

Check failure on line 211 in guide/en/start/databases.md

View workflow job for this annotation

GitHub Actions / vale

[vale] guide/en/start/databases.md#L211

[Microsoft.Contractions] Use 'it's' instead of 'it is'.
Raw output
{"message": "[Microsoft.Contractions] Use 'it's' instead of 'it is'.", "location": {"path": "guide/en/start/databases.md", "range": {"start": {"line": 211, "column": 27}}}, "severity": "ERROR"}

```php
<?php
Expand Down Expand Up @@ -257,7 +261,7 @@

## Repository

Now that we have entity, we need a place for methods to save an entity, delete it and select either

Check warning on line 264 in guide/en/start/databases.md

View workflow job for this annotation

GitHub Actions / vale

[vale] guide/en/start/databases.md#L264

[Microsoft.We] Try to avoid using first-person plural like 'we'.
Raw output
{"message": "[Microsoft.We] Try to avoid using first-person plural like 'we'.", "location": {"path": "guide/en/start/databases.md", "range": {"start": {"line": 264, "column": 10}}}, "severity": "WARNING"}

Check failure on line 264 in guide/en/start/databases.md

View workflow job for this annotation

GitHub Actions / vale

[vale] guide/en/start/databases.md#L264

[Microsoft.Contractions] Use 'we've' instead of 'we have'.
Raw output
{"message": "[Microsoft.Contractions] Use 'we've' instead of 'we have'.", "location": {"path": "guide/en/start/databases.md", "range": {"start": {"line": 264, "column": 10}}}, "severity": "ERROR"}

Check warning on line 264 in guide/en/start/databases.md

View workflow job for this annotation

GitHub Actions / vale

[vale] guide/en/start/databases.md#L264

[Microsoft.We] Try to avoid using first-person plural like 'we'.
Raw output
{"message": "[Microsoft.We] Try to avoid using first-person plural like 'we'.", "location": {"path": "guide/en/start/databases.md", "range": {"start": {"line": 264, "column": 26}}}, "severity": "WARNING"}
a single page or multiple pages.

Create `src/Web/Page/PageRepository.php`:
Expand Down
4 changes: 4 additions & 0 deletions guide/en/views/template-engines.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
---
render_with_liquid: false
---

# Template engines

Yii3 supports multiple template engines through a flexible renderer system. By default, PHP is used as the

Check notice on line 7 in guide/en/views/template-engines.md

View workflow job for this annotation

GitHub Actions / vale

[vale] guide/en/views/template-engines.md#L7

[Microsoft.Passive] 'is used' looks like passive voice.
Raw output
{"message": "[Microsoft.Passive] 'is used' looks like passive voice.", "location": {"path": "guide/en/views/template-engines.md", "range": {"start": {"line": 7, "column": 93}}}, "severity": "INFO"}
template engine, but you can easily add support for other engines like Twig or create your own custom renderers.

Check warning on line 8 in guide/en/views/template-engines.md

View workflow job for this annotation

GitHub Actions / vale

[vale] guide/en/views/template-engines.md#L8

[Microsoft.Adverbs] Remove 'easily' if it's not important to the meaning of the statement.
Raw output
{"message": "[Microsoft.Adverbs] Remove 'easily' if it's not important to the meaning of the statement.", "location": {"path": "guide/en/views/template-engines.md", "range": {"start": {"line": 8, "column": 30}}}, "severity": "WARNING"}

PHP templates were described in the "[View](view.md)" guide section.

Check notice on line 10 in guide/en/views/template-engines.md

View workflow job for this annotation

GitHub Actions / vale

[vale] guide/en/views/template-engines.md#L10

[Microsoft.Passive] 'were described' looks like passive voice.
Raw output
{"message": "[Microsoft.Passive] 'were described' looks like passive voice.", "location": {"path": "guide/en/views/template-engines.md", "range": {"start": {"line": 10, "column": 15}}}, "severity": "INFO"}

## Twig Template Engine

Check notice on line 12 in guide/en/views/template-engines.md

View workflow job for this annotation

GitHub Actions / vale

[vale] guide/en/views/template-engines.md#L12

[Microsoft.Headings] 'Twig Template Engine' should use sentence-style capitalization.
Raw output
{"message": "[Microsoft.Headings] 'Twig Template Engine' should use sentence-style capitalization.", "location": {"path": "guide/en/views/template-engines.md", "range": {"start": {"line": 12, "column": 4}}}, "severity": "INFO"}

Twig is a modern template engine that provides a more designer-friendly syntax. To use Twig in your Yii3 application,
you need to install the Twig extension.
Expand Down Expand Up @@ -42,7 +46,7 @@
</div>
```

### Twig Features

Check notice on line 49 in guide/en/views/template-engines.md

View workflow job for this annotation

GitHub Actions / vale

[vale] guide/en/views/template-engines.md#L49

[Microsoft.Headings] 'Twig Features' should use sentence-style capitalization.
Raw output
{"message": "[Microsoft.Headings] 'Twig Features' should use sentence-style capitalization.", "location": {"path": "guide/en/views/template-engines.md", "range": {"start": {"line": 49, "column": 5}}}, "severity": "INFO"}

**Automatic Escaping**: Twig automatically escapes variables for HTML context:

Expand Down Expand Up @@ -96,7 +100,7 @@
{% endblock %}
```

### Rendering Twig Templates

Check notice on line 103 in guide/en/views/template-engines.md

View workflow job for this annotation

GitHub Actions / vale

[vale] guide/en/views/template-engines.md#L103

[Microsoft.Headings] 'Rendering Twig Templates' should use sentence-style capitalization.
Raw output
{"message": "[Microsoft.Headings] 'Rendering Twig Templates' should use sentence-style capitalization.", "location": {"path": "guide/en/views/template-engines.md", "range": {"start": {"line": 103, "column": 5}}}, "severity": "INFO"}

Use Twig templates the same way as PHP templates:

Expand All @@ -111,7 +115,7 @@
}
```

## Custom Template Engines

Check notice on line 118 in guide/en/views/template-engines.md

View workflow job for this annotation

GitHub Actions / vale

[vale] guide/en/views/template-engines.md#L118

[Microsoft.Headings] 'Custom Template Engines' should use sentence-style capitalization.
Raw output
{"message": "[Microsoft.Headings] 'Custom Template Engines' should use sentence-style capitalization.", "location": {"path": "guide/en/views/template-engines.md", "range": {"start": {"line": 118, "column": 4}}}, "severity": "INFO"}

You can create custom template engines by implementing the `TemplateRendererInterface`:

Expand Down Expand Up @@ -170,13 +174,13 @@
- Feature 3
```

## Choosing the Right Template Engine

Check notice on line 177 in guide/en/views/template-engines.md

View workflow job for this annotation

GitHub Actions / vale

[vale] guide/en/views/template-engines.md#L177

[Microsoft.Headings] 'Choosing the Right Template Engine' should use sentence-style capitalization.
Raw output
{"message": "[Microsoft.Headings] 'Choosing the Right Template Engine' should use sentence-style capitalization.", "location": {"path": "guide/en/views/template-engines.md", "range": {"start": {"line": 177, "column": 4}}}, "severity": "INFO"}

**Use PHP templates when:**
- You need maximum flexibility and performance
- Your team is comfortable with PHP
- You want to leverage existing PHP knowledge
- You need complex logic in templates (though this should be minimized)

Check notice on line 183 in guide/en/views/template-engines.md

View workflow job for this annotation

GitHub Actions / vale

[vale] guide/en/views/template-engines.md#L183

[Microsoft.Passive] 'be minimized' looks like passive voice.
Raw output
{"message": "[Microsoft.Passive] 'be minimized' looks like passive voice.", "location": {"path": "guide/en/views/template-engines.md", "range": {"start": {"line": 183, "column": 59}}}, "severity": "INFO"}

**Use Twig templates when:**
- You want stricter separation between logic and presentation
Expand All @@ -189,10 +193,10 @@
- You're working with specialized content formats
- You need integration with external template systems

## Best Practices

Check notice on line 196 in guide/en/views/template-engines.md

View workflow job for this annotation

GitHub Actions / vale

[vale] guide/en/views/template-engines.md#L196

[Microsoft.Headings] 'Best Practices' should use sentence-style capitalization.
Raw output
{"message": "[Microsoft.Headings] 'Best Practices' should use sentence-style capitalization.", "location": {"path": "guide/en/views/template-engines.md", "range": {"start": {"line": 196, "column": 4}}}, "severity": "INFO"}

1. **Keep templates simple**: Move complex logic to controllers or services
2. **Always escape output**: Prevent XSS attacks by properly escaping variables

Check warning on line 199 in guide/en/views/template-engines.md

View workflow job for this annotation

GitHub Actions / vale

[vale] guide/en/views/template-engines.md#L199

[Microsoft.Adverbs] Remove 'properly' if it's not important to the meaning of the statement.
Raw output
{"message": "[Microsoft.Adverbs] Remove 'properly' if it's not important to the meaning of the statement.", "location": {"path": "guide/en/views/template-engines.md", "range": {"start": {"line": 199, "column": 53}}}, "severity": "WARNING"}
3. **Use meaningful names**: Name your templates and variables clearly
4. **Organize templates**: Group related templates in subdirectories
5. **Document variables**: Always add type hints for better IDE support
Expand Down
4 changes: 4 additions & 0 deletions guide/es/start/databases.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
render_with_liquid: false
---

# Working with databases

Yii doesn't dictate using a particular database or storage for your
Expand Down
23 changes: 19 additions & 4 deletions guide/es/start/workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ you need.

## Functionality <span id="functionality"></span>

The installed application has only the homepage, which displays when you
access the URL `http://localhost/`. It shares a common layout that you can
reuse on further pages.
The installed application contains only one page, accessible at
`http://localhost/`. It shares a common layout that you can reuse on
further pages.

<!--
You should also see a toolbar at the bottom of the browser window.
Expand Down Expand Up @@ -86,7 +86,22 @@ documentation](https://github.com/yiisoft/app/blob/master/README.md).

The following diagram shows how an application handles a request.

![Request Lifecycle](img/request-lifecycle.svg)
```mermaid
flowchart LR
user[User's client] --> index
index[index.php] --> DI[Initialize Dependency Container]
config[configs] -.-> DI
DI --> RequestFactory[RequestFactory]
RequestFactory -->|Request| app[Application]
app -->|Request| middleware[Middleware]
middleware -->|Request| router[Router]
router -->|Request| action[Action Handler]
action -->|Response| emitter[SapiEmitter]
router -->|Response| emitter
middleware -->|Response| emitter
app -->|Response| emitter
emitter --> user
```

1. A user makes a request to the [entry
script](../structure/entry-script.md) `public/index.php`.
Expand Down
4 changes: 4 additions & 0 deletions guide/id/start/databases.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
render_with_liquid: false
---

# Working with databases

Yii doesn't dictate using a particular database or storage for your
Expand Down
Loading
Loading