يحتوي هذا المشروع على الكود المصدري لموقع 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 الخاص بك). الصق في ملف في دليل data (@app/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 fake-data يمكنك تشغيله عدة مرات لإنشاء المزيد من البيانات../yii badge/rebuild ../yii user/ranking . لتعيين المستخدمين أذونات إضافية استخدم ./yii rbac/assign
يجب إعداد الأوامر التالية لتشغيلها بشكل منتظم:
| يأمر | فاصلة | غاية |
|---|---|---|
| yii sitemap/توليد | يوميًا | تجديد sitemap.xml |
| يساهم yii/توليد | أسبوعي | قائمة المساهمين تحديث في صفحة الفريق |
| yii شارة/تحديث | كل ساعة | تحديث شارات المستخدمين في Badge_queue |
| yii cron/update-packagist | كل ساعة | تحديث بيانات امتداد الحزمة |
| yii المستخدم/الترتيب | يوميًا | تحديث ترتيب المستخدم |
| يي جيثب-بروغرس | كل ساعة | تحديث بيانات تقدم github |
بالإضافة إلى ذلك ، يجب أن يتم تشغيل queue/listen كخفائي أو queue/run كرونجوب.
يغطي هذا القسم ملاحظات للنشر على خادم ، قد لا تحتاج إلى ذلك لـ Dev Env الخاص بك. من المفترض أن يكون نظام التشغيل "Bullseye".
apt-get install texlive-full python3-pygments git nodejs makeيتم إنشاء قائمة المساهمين والأعراس الآلهة بواسطة أمر وحدة التحكم:
./yii contributors/generate سوف يتصل بـ GitHub عبر واجهة برمجة التطبيقات وجلب قائمة من المساهمين ، وإنشاء data/contributors.json json و thumbnail images of the user avatars in data/avatars ، وأخيراً استدعاء Gulp لإنشاء صورة Sprite و 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 لإعادة بناء ملفات CSS/JS المستهدفة يدويًا من ملفات SASS SASS/JS.gulp watchproduction : gulp build --production أو تشغيل npm run buildassets/src/scss وإدراجها في assets/src/scss/all.scss .GuideController على ملف SASS يسمى _guide.scss .all.scss يجب أن يكون لها السطح السفلي الرائد في الاسم. سوف يتجاهل Sass الملفات التي تبدأ من السطح السفلي بحيث يتم إنتاج ملف CSS واحد فقط (All.CSS).all.scss .assets/src/js وإدراجها في config.yml .GuideController على ملف JS يسمى guide.js