.. Installation ============= インストール ============ .. Installing RTD is pretty simple. Here is a step by step plan on how to do it. RTD のインストールはとても簡単で、以下にその手順を見てみましょう。 .. First, obtain Python_ and virtualenv_ if you do not already have them. Using a virtual environment will make the installation easier, and will help to avoid clutter in your system-wide libraries. You will also need Git_ in order to clone the repository. はじめに、まだインストールされていなければ Python_ と virtualenv_ をインストールして下さい。 仮想環境を使用すると、インストールが楽になりますし、システム全体のライブラリを汚さずに済みます。 また、リポジトリをクローンするには Git_ も必要です。 .. _Python: http://www.python.org/ .. _virtualenv: http://pypi.python.org/pypi/virtualenv .. _Git: http://git-scm.com/ .. Once you have these, create a virtual environment somewhere on your disk, then activate it:: これらを導入した後は、自分の環境のどこでも構わないので仮想環境を作成して有効化します:: virtualenv rtd cd rtd source bin/activate .. Create a folder in here, and clone the repository:: ここにフォルダを作成し、リポジトリをクローンしましょう:: mkdir checkouts cd checkouts git clone http://github.com/rtfd/readthedocs.org.git .. Next, install the dependencies using ``pip`` (included with virtualenv_):: 次に ``pip`` (virtualenv_ に含まれています)を使って依存ライブラリをインストールします:: cd readthedocs.org pip install -r pip_requirements.txt .. This may take a while, so go grab a beverage. When it's done, build your database:: これには少し時間がかかるので、飲み物でも飲んで待ちましょう。完了したらデータベースを構築します:: ./manage.py syncdb .. This will prompt you to create a superuser account for Django. Do that. Then:: この処理の中で Django の管理者アカウントを作成するか聞かれるので、作成しましょう。次に以下を実行します:: ./manage.py migrate .. If you like, you can load up some test projects:: お好みで、いくつかのテストプロジェクトを読み込むことができます:: ./manage.py loaddata test_data ./manage.py update_repos .. Or you can skip it and start with a fresh, empty site. Finally, you're ready to start the webserver:: または上記ステップを飛ばして、まっさらなサイトとして開始することもできます。 これで Web サーバを起動する準備ができました:: ./manage.py runserver .. Visit http://127.0.0.1:8000/ in your browser to see how it looks; you can use the admin interface via http://127.0.0.1:8000/admin (logging in with the superuser account you just created). それではブラウザで http://127.0.0.1:8000/ を開いてみましょう; 先程作成した管理者アカウントでログインすれば http://127.0.0.1:8000/admin から管理者画面を使うこともできます。 .. What's available ---------------- どんなことができるのか ---------------------- .. After registering with the site (or creating yourself a superuser account), you will be able to log in and view the `dashboard `_ サイトにアカウント登録(または自身を管理者アカウントとして作成)すると、ログインして `ダッシュボード `_ 画面を閲覧することができます。 .. From the dashboard you can either create new documentation, or import your existing docs provided that they are in a git or mercurial repo. ダッシュボードでは、新規ドキュメントを作成したり、git や mercurial リポジトリ上の既存ドキュメントを取り込むことができます。 .. Creating new Docs ^^^^^^^^^^^^^^^^^ 新規ドキュメントの作成 ^^^^^^^^^^^^^^^^^^^^^^ .. One of the goals of `readthedocs.org `_ is to make it easy for any open source developer to get high quality hosted docs with great visibility! We provide a simple editor and two sample pages whenever a new project is created. From there its up to you to fill in the gaps - we'll build the docs, give you access to history on every revision of your files, and we plan on adding more features in the weeks and months to come. `readthedocs.org `_ の目的のひとつに、どんなオープンソース開発者でも簡単に、 クオリティが高く、見た目もいいホスティングされたドキュメントを作成できるようにしたい、というものがあります。 そこで、新規プロジェクトを作成するたびに、シンプルなエディタとふたつのサンプルページを提供しています。 それらの項目を埋めるだけで、ドキュメントのビルド、ファイルの全リビジョンの履歴閲覧などが可能になります。 また今後数週間から数ヶ月のうちに、もっと機能を追加していく予定です。 .. Importing existing docs ^^^^^^^^^^^^^^^^^^^^^^^ 既存ドキュメントの取り込み ^^^^^^^^^^^^^^^^^^^^^^^^^^ .. The other side of `readthedocs.org `_ is hosting the docs you've already built. Simply provide us with the clone url to your repo, we'll pull your code, extract your docs, and build them! We make available a post-commit webhook that can be configured to update the docs on our site whenever you commit to your repo, effectively letting you 'set it and forget it'. `readthedocs.org `_ には、既にビルドされたドキュメントをホスティングできるという側面もあります。 複製元リポジトリの URL を指定するだけで、コードを取り込んでドキュメントを抜き出し、それらをビルドしてくれるのです! 更に提供しているポストコミット Web フックを使えば、自分のリポジトリにドキュメントをコミットした時に、このサイトのドキュメントも更新されるように設定することができます。 実際「一度設定したら忘れてOK」な状態にできるのです。 .. Caveats ------- 注意事項 -------- .. We are auto-importing and generating ``conf.py`` files, so projects with special extensions, themes, or templates won't work correctly. This is because of the possibility of code execution within the python files. We are planning to support popular themes and white list users that we trust to have these abilities. このサイトは自動取り込み後に ``conf.py`` ファイルを生成しています。 そのため特殊な拡張やテーマ、テンプレートを使用しているプロジェクトは、正しく動作しません。 これは python ファイル内のコードの実行を制限しているためです。 ゆくゆくは人気のあるテーマの導入や、認定されたホワイトリストユーザーへの制限の解除なども計画しています。