このプロジェクトには、Yiiframework.com Webサイトのソースコードが含まれています。
貢献したい場合は、Issue Trackerを使用してご連絡ください。
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 (1行、ラインブレイクなし)と呼ばれる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-progress | 時給 | GitHubの進捗データを更新します |
さらに、 queue/listenデーモンとして実行されるか、cronjobとしてqueue/run必要があります。
このセクションでは、サーバー上の展開のためのメモについて説明します。これは、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者とサムネイル画像を生成し、最後に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を実行してビューを視聴し、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は、アンダースコアから始まるファイルを無視して、1つのCSSファイルのみが生成されるようにします(all.CSS)。all.scss参照してください。assets/src/jsの下に置き、 config.ymlにリストされている必要があります。GuideControllerにはguide.jsという名前のJSファイルがあります。