이 프로젝트에는 yiiframework.com 웹 사이트의 소스 코드가 포함되어 있습니다.
기여하려면 문제 추적기를 사용하여 저희와 연락하십시오.
Docker와 Docker Compose를 설치하십시오.
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/generate | 일일 | SiteMap.xml을 재생합니다 |
| YII 기고자/생성 | 주간 | 팀 페이지에서 기고자 목록을 업데이트하십시오 |
| YII 배지/업데이트 | 시간별 | badge_queue에서 사용자를위한 배지를 업데이트하십시오 |
| Yii Cron/Update-Packagist | 시간별 | Packagist 확장 데이터를 업데이트하십시오 |
| YII 사용자/순위 | 일일 | 사용자 순위를 업데이트하십시오 |
| Yii github 프로그램 | 시간별 | GitHub 진행 데이터를 업데이트합니다 |
또한 queue/listen 크론 조브로 데몬 또는 queue/run 실행으로 실행해야합니다.
이 섹션에서는 서버에서 배포에 대한 메모를 다루고 있습니다. Dev Env에는이 문제가 필요하지 않을 수 있습니다. OS는 데비안 "Bullseye"라고 가정합니다.
apt-get install texlive-full python3-pygments git nodejs make기고자 목록과 아바타 썸네일은 콘솔 명령에 의해 생성됩니다.
./yii contributors/generate API를 통해 Github에 연결하고 기고자 목록을 가져오고 데이터 data/avatars 에서 사용자 아바타의 data/contributors.json 및 썸네일 이미지를 생성하고 마지막으로 GULP를 호출하여 스프라이트 이미지 및 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 실행하여 View, SASS 및 JS 파일을 변경하고 대상 CSS/JS 파일을 자동으로 빌드하십시오. 이 명령은 또한 BrowserSync에 연결된 브라우저 창을 시작합니다.gulp build 실행하여 소스 SASS/JS 파일에서 대상 CSS/JS 파일을 수동으로 재구성하십시오.gulp watch 발행 할 수 있습니다.production 플래그를 지정하십시오 : gulp build --production 또는 Run 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 에는 js js guide.js 파일이 있습니다.