yiiframework.com
1.0.0
该项目包含yiiframework.com网站的源代码。
如果您想贡献,请使用问题跟踪器与我们联系。
安装Docker和Docker组成。
docker-compose build
docker-compose up
该网站将在http:// localhost:81。
您可以在源目录的根部使用脚本run_pageres.sh来生成屏幕截图。
如果需要,请调整本地配置文件:
config/console-local.php 。config/params-local.php 。config/web-local.php 。生成个人github令牌(来自您的github个人资料设置部分)。将其粘贴到称为github.token (一行,无线破坏)的data目录(@app/data)中的文件中。
继续以下命令:
# run migrations
./yii migrate
# fill RBAC
./yii rbac/up
# build contributors page (this may take some time as it downloads a lot of user avatars from github)
./yii contributors/generate
# If you're on Windows you have to manually symlink or copy
# %appdata%/npm/node_modules/browser-sync to your app's node_modules
# The next step is for building the API documentation and the Guide files.
# It is optional for the site to be working but you will have no API docs and Guide.
# This step includes cloning the Yii 1 and Yii 2 repositories and a lot of computation,
# so you might want to skip it on the first install.
#
# This also requires an instance of elasticsearch to be configured and running
# (if you do not have it, it will still run, but the site search will not work).
# It also assumes you have pdflatex installed for building PDF guide docs.
#
# You may also build only parts of the docs, run make help for the available commands.
make docs
# If you are using Docker image, you need to additionally pass VENDOR_DIR:
make docs VENDOR_DIR= $VENDOR_DIR
# Yii 1.0 API docs generation. They are already included in VCS. Run this only if layout has changed.
docker build -f Dockerfile.yii-1.0 -t yiiframeworkcom-yii-1.0 .
docker run -it -v $PWD /data/api-1.0:/code/data/api-1.0 yiiframeworkcom-yii-1.0
# populate the search index by running
./yii search/rebuild
/code/vendor/bin/apidoc guide data/yii-2.0/docs/guide-ru data/docs-offline/yii-docs-2.0-ru --interactive=0
./yii guide " 2.0 " --interactive=0对于从旧网站导入数据,需要以下步骤:
./yii import命令导入数据./yii badge/rebuild来重建用户徽章./yii user/ranking 。如果您没有这些数据,则可以使用虚拟内容:
./yii fake-data 。您可以多次运行它以生成更多数据。./yii badge/rebuild来重建用户徽章。./yii user/ranking 。为用户分配额外的权限使用./yii rbac/assign 。
需要设置以下命令以定期运行:
| 命令 | 间隔 | 目的 |
|---|---|---|
| yii站点地图/生成 | 日常的 | 再生sitemap.xml |
| yii贡献者/生成 | 每周 | 更新团队页面上的贡献者列表 |
| YII徽章/更新 | 小时 | 更新Badge_queue用户的徽章 |
| yii cron/update-cackagist | 小时 | 更新Packagist扩展数据 |
| yii用户/排名 | 日常的 | 更新用户排名 |
| yii github-progress | 小时 | 更新GitHub进度数据 |
此外, queue/listen应作为守护程序或queue/run作为cronjob运行。
本节涵盖了在服务器上部署的注释,您可能不需要Dev Env。 OS被认为是Debian的“ Bullseye”。
apt-get install texlive-full python3-pygments git nodejs make贡献者列表和头像缩略图由控制台命令生成:
./yii contributors/generate它将通过API连接到GitHub,并获取贡献者的列表,生成data/contributors.json data/avatars中用户头像的json和缩略图图像,并最终调用Gulp来生成Sprite Image和SASS代码。
最好偶尔运行一个cron工作是一个好主意 - 也许每月一次。
commands/ contains console commands (controllers)
config/ contains application configurations
controllers/ contains Web controller classes
data/ contains important data generated by different commands
env/ contains environment-dependent files
assets/
src/
fonts/ contains fonts
scss/ contains Sass source files
js/ contains JS source files
mail/ contains view files for e-mails
models/ contains model classes
node_modules/ contains installed NPM packages
runtime/ contains files generated during runtime
scripts/ contains shell scripts
vendor/ contains dependent 3rd-party packages
views/ contains view files for the Web application
web/ contains the entry script and Web resources
gulp观察视图,SASS和JS文件更改,并自动构建目标CSS/JS文件。该命令还将启动连接到浏览器的浏览器窗口。gulp build从源SASS/JS文件手动重建目标CSS/JS文件。gulp watchproduction标志: gulp build --production或运行npm run buildassets/src/scss下放置,并在assets/src/scss/all.scss中列出。GuideController具有名为_guide.scss的SASS文件。all.scss外,所有SASS源文件都应在名称中具有领先的下划线。 SASS将忽略以下划线开头的文件,以便仅生产一个CSS文件(ALL.CSS)。all.scss 。assets/src/js下,并在config.yml中列出。GuideController具有一个名为guide.js的JS文件。