โครงการนี้มีซอร์สโค้ดสำหรับเว็บไซต์ yiiframework.com
หากคุณต้องการมีส่วนร่วมโปรดติดต่อเราโดยใช้ตัวติดตามปัญหา
ติดตั้งนักเทียบท่าและนักเทียบท่า
docker-compose build
docker-compose up
เว็บไซต์จะมีให้ที่ http: // localhost: 81
คุณสามารถใช้สคริปต์ run_pageres.sh ที่รูทของไดเรกทอรีต้นฉบับเพื่อสร้างภาพหน้าจอ
ปรับไฟล์ config local หากจำเป็น:
config/console-local.phpconfig/params-local.phpconfig/web-local.php สร้างโทเค็น GitHub ส่วนตัว (จากส่วนการตั้งค่าโปรไฟล์ GitHub ของคุณ) วางไว้ในไฟล์ในไดเรกทอรี data (@แอป/ข้อมูล) ที่เรียกว่า github.token (หนึ่งบรรทัดไม่มีการทำลายบรรทัด)
ดำเนินการต่อด้วยคำสั่งต่อไปนี้:
# 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หากคุณไม่มีข้อมูลนั้นคุณสามารถทำงานกับเนื้อหาจำลอง:
./yii fake-data คุณอาจเรียกใช้หลายครั้งเพื่อสร้างข้อมูลเพิ่มเติม./yii badge/rebuild./yii user/ranking yii เพื่อกำหนดสิทธิ์การใช้งานพิเศษของผู้ใช้ ./yii rbac/assign
คำสั่งต่อไปนี้จะต้องตั้งค่าให้ทำงานเป็นประจำ:
| สั่งการ | ช่วงเวลา | วัตถุประสงค์ |
|---|---|---|
| yii sitemap/สร้าง | รายวัน | regenerate sitemap.xml |
| ผู้มีส่วนร่วมของ YII/สร้าง | รายสัปดาห์ | อัปเดตรายชื่อผู้สนับสนุนในหน้าทีม |
| ป้าย/อัปเดต yii | ทุกชั่วโมง | อัปเดตป้ายสำหรับผู้ใช้ใน Badge_queue |
| yii cron/update-packagist | ทุกชั่วโมง | อัปเดตข้อมูลส่วนขยายแพ็คกิสต์ |
| ผู้ใช้/การจัดอันดับ YII | รายวัน | อัปเดตการจัดอันดับผู้ใช้ |
| yii github-progress | ทุกชั่วโมง | อัปเดตข้อมูลความคืบหน้าของ GitHub |
นอกจากนี้ queue/listen ควรทำงานเป็น daemon หรือ queue/run เป็น cronjob
ส่วนนี้ครอบคลุมบันทึกสำหรับการปรับใช้บนเซิร์ฟเวอร์คุณอาจไม่จำเป็นต้องใช้สิ่งนี้สำหรับ dev env ของคุณ OS ถือว่าเป็น Debian "Bullseye"
apt-get install texlive-full python3-pygments git nodejs makeรายชื่อผู้มีส่วนร่วมและรูปขนาดย่อของอวตารถูกสร้างขึ้นโดยคำสั่งคอนโซล:
./yii contributors/generate มันจะเชื่อมต่อกับ GitHub ผ่าน API และดึงรายชื่อผู้มีส่วนร่วมสร้าง data/contributors.json และภาพขนาดย่อของอวตารของผู้ใช้ใน data/avatars และในที่สุดก็เรียกร้องอึกเพื่อสร้างภาพสไปรต์
มันเป็นความคิดที่ดีที่จะตั้งค่างาน 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 เพื่อสร้างไฟล์ CSS/JS เป้าหมายด้วยตนเองจากไฟล์ Source SASS/JS ด้วยตนเองgulp watchproduction : gulp build --production การผลิตหรือเรียกใช้ npm run buildassets/src/scss และแสดงรายการใน assets/src/scss/all.scssGuideController มีไฟล์ SASS ชื่อ _guide.scssall.scss ควรมีขีดล่างชั้นนำในชื่อ SASS จะเพิกเฉยต่อไฟล์ที่เริ่มต้นด้วยขีดล่างเพื่อให้ไฟล์ CSS เพียงหนึ่งไฟล์เท่านั้น (all.css)all.scssassets/src/js และแสดงรายการใน config.ymlGuideController มีไฟล์ JS ชื่อ guide.js