Skip to content

Commit 28d4bce

Browse files
authored
Migrate to VitePress (#276)
1 parent 0b48a77 commit 28d4bce

File tree

836 files changed

+69809
-7312
lines changed

Some content is hidden

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

836 files changed

+69809
-7312
lines changed

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@ trim_trailing_whitespace = true
1212

1313
[*.md]
1414
trim_trailing_whitespace = false
15+
16+
[*.yml]
17+
indent_size = 2

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ jobs:
1919
reporter: github-check
2020
fail_on_error: false
2121
filter_mode: nofilter
22-
files: '["cookbook", "guide"]'
22+
files: '["src/en"]'
2323
env:
2424
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

.github/workflows/github-pages.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Deploy VitePress with GitHub Pages
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: ["master"]
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: "pages"
16+
cancel-in-progress: false
17+
18+
jobs:
19+
build:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v6
24+
25+
- name: Setup Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: 22
29+
cache: npm
30+
31+
- name: Install dependencies
32+
run: npm ci
33+
34+
- name: Build VitePress site
35+
run: npm run build
36+
37+
- name: Upload artifact
38+
uses: actions/upload-pages-artifact@v4
39+
with:
40+
path: src/.vitepress/dist
41+
42+
deploy:
43+
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
44+
environment:
45+
name: github-pages
46+
url: ${{ steps.deployment.outputs.page_url }}
47+
runs-on: ubuntu-latest
48+
needs: build
49+
steps:
50+
- name: Deploy to GitHub Pages
51+
id: deployment
52+
uses: actions/deploy-pages@v4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
name: Update docs translation
1+
name: Update translations
22

33
on:
4-
pull_request_target:
4+
pull_request:
55
paths:
66
- '_translations/**'
7-
- 'cookbook/**'
8-
- 'guide/**'
7+
- 'src/**'
98

109
jobs:
1110
update-docs:
@@ -19,18 +18,18 @@ jobs:
1918
ref: ${{ github.head_ref }}
2019
repository: ${{ github.event.pull_request.head.repo.full_name }}
2120

21+
- name: Prepare po4a configuration
22+
run: _translations/prepare-config.sh
23+
2224
- name: Use po4a
2325
uses: addnab/docker-run-action@v3
2426
with:
2527
image: arduanovdanil/po4a-fork:v0.73
26-
options: -v ${{ github.workspace }}:/src
27-
run: |
28-
cd _translations/guide
29-
po4a po4a.cfg
30-
cd ../cookbook
31-
po4a po4a.cfg
28+
options: -v ${{ github.workspace }}:/src -w /src/_translations
29+
run: po4a po4a.conf && po4a po4a.conf
30+
3231
- name: Commit changed files
3332
uses: stefanzweifel/git-auto-commit-action@v5
3433
with:
3534
commit_message: Update translation
36-
file_pattern: '_translations guide cookbook'
35+
file_pattern: '_translations src'

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,8 @@ Thumbs.db
1616
.DS_Store
1717

1818
# po4a .mo files
19-
*.mo
19+
*.mo
20+
21+
# VitePress
22+
/node_modules/
23+
/.vitepress/cache

.nojekyll

Whitespace-only changes.

Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
init:
2+
npm install
3+
4+
build:
5+
npm run build
6+
7+
preview:
8+
npm run preview
9+
10+
dev:
11+
npm run dev
12+
13+
po4a:
14+
./_translations/prepare-config.sh && \
15+
docker run --rm \
16+
--user $(shell id -u):$(shell id -g) \
17+
-v $(PWD):/src \
18+
-w /src/_translations \
19+
arduanovdanil/po4a-fork:v0.73 \
20+
po4a.conf

_translations/cookbook/po4a.cfg

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

_translations/guide/po4a.cfg

Lines changed: 0 additions & 69 deletions
This file was deleted.
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# Spanish translations for PACKAGE package
2+
# Copyright (C) 2025 Free Software Foundation, Inc.
3+
# This file is distributed under the same license as the PACKAGE package.
4+
# Automatically generated, 2025.
5+
#
6+
msgid ""
7+
msgstr ""
8+
"Project-Id-Version: PACKAGE VERSION\n"
9+
"POT-Creation-Date: 2025-10-19 11:34+0000\n"
10+
"PO-Revision-Date: 2025-10-19 11:34+0000\n"
11+
"Last-Translator: Automatically generated\n"
12+
"Language-Team: none\n"
13+
"Language: es\n"
14+
"MIME-Version: 1.0\n"
15+
"Content-Type: text/plain; charset=UTF-8\n"
16+
"Content-Transfer-Encoding: 8bit\n"
17+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
18+
19+
#. type: Title #
20+
#: ../../cookbook/en/README.md
21+
#, no-wrap
22+
msgid "Yii3 community cookbook"
23+
msgstr ""
24+
25+
#. type: Plain text
26+
#: ../../cookbook/en/README.md
27+
msgid "Yii3 Community Cookbook is an OpenSource book full of tips and tricks about the [Yii3](https://www.yiiframework.com/) PHP framework."
28+
msgstr ""
29+
30+
#. type: Bullet: '- '
31+
#: ../../cookbook/en/README.md
32+
msgid "The Yii community creates the cookbook."
33+
msgstr ""
34+
35+
#. type: Bullet: '- '
36+
#: ../../cookbook/en/README.md
37+
msgid "Yii core team members curate and edit it."
38+
msgstr ""
39+
40+
#. type: Plain text
41+
#: ../../cookbook/en/README.md
42+
msgid "Feel free to pull-request your own writings. Team members will review it, give feedback and merge the best possible way."
43+
msgstr ""
44+
45+
#. type: Plain text
46+
#: ../../cookbook/en/README.md
47+
#, fuzzy
48+
#| msgid "We release this guide under the [Terms of Yii Documentation](https://www.yiiframework.com/license#docs)."
49+
msgid "This book conforms to the [Terms of Yii Documentation](https://www.yiiframework.com/license#docs)."
50+
msgstr "Esta guía se publica bajo los [Términos de documentación de Yii](https://www.yiiframework.com/license#docs))."
51+
52+
#. type: Bullet: '- '
53+
#: ../../cookbook/en/README.md
54+
#, fuzzy
55+
#| msgid "[Packages](structure/package.md) +"
56+
msgid "[Preface](preface.md)"
57+
msgstr "[Paquetes](structure/package.md)"
58+
59+
#. type: Bullet: '- '
60+
#: ../../cookbook/en/README.md
61+
msgid "[Structuring code by use-case with vertical slices](organizing-code/structuring-by-use-case-with-vertical-slices.md)"
62+
msgstr ""
63+
64+
#. type: Bullet: '- '
65+
#: ../../cookbook/en/README.md
66+
msgid "[Making HTTP requests](making-http-requests.md)"
67+
msgstr ""
68+
69+
#. type: Bullet: '- '
70+
#: ../../cookbook/en/README.md
71+
msgid "[Disabling CSRF protection](disabling-csrf-protection.md)"
72+
msgstr ""
73+
74+
#. type: Bullet: '- '
75+
#: ../../cookbook/en/README.md
76+
#, fuzzy
77+
#| msgid "[Authentication](security/authentication.md) +"
78+
msgid "[Sentry integration](sentry-integration.md)"
79+
msgstr "[Autenticación](security/authentication.md)"
80+
81+
#. type: Bullet: '- '
82+
#: ../../cookbook/en/README.md
83+
msgid "[Configuring webservers](configuring-webservers/general.md)"
84+
msgstr ""
85+
86+
#. type: Bullet: '- '
87+
#: ../../cookbook/en/README.md
88+
msgid "[Deploying to Docker Swarm](deployment/docker-swarm.md)"
89+
msgstr ""

0 commit comments

Comments
 (0)