ヘッダーのロゴ変更
先日Macをクリーンインストールする羽目になったので,Tracなどをローカルにインストールした.
その際以前はTrac標準のロゴ画像が表示されていたはずだけどバージョンアップに伴ってか,デフォルトでは表示されなくなっていた.
なので,とりあえず適当にロゴを設定する方法.
まず,Tracを準備する
$ mkdir project $ trac-admin project initenv reating a new Trac environment at /www/tracs/project Trac will first ask a few questions about your environment in order to initialize and prepare the project database. Please enter the name of your project. This name will be used in page titles and descriptions. Project Name [My Project]> project ... --------------------------------------------------------------------- Project environment for 'project' created. You may now configure the environment by editing the file: /www/tracs/project/conf/trac.ini If you'd like to take this new project environment for a test drive, try running the Trac standalone web server `tracd`: tracd --port 8000 /www/tracs/project Then point your browser to http://localhost:8000/project. There you can also browse the documentation for your installed version of Trac, including information on further setup (such as deploying Trac to a real web server). The latest documentation can also always be found on the project website: http://trac.edgewall.org/ Congratulations!
てな感じで準備したら,trac.iniで画像を設定してね.と書いてある.
ので,設定してみる.
$ cd project $ vi conf/trac.ini
でtrac.iniを開いたら,以下の箇所にロゴ画像のパスを設定
[header_logo] alt = (please configure the [header_logo] section in trac.ini) height = -1 link = src = site/your_project_logo.png # <- ここを編集 width = -1
上の"your_project_logo.png"を任意の画像名に変更して,先ほど作ったTracのディレクトリの"htdocs"に指定した画像ファイルを置いたらできあがり.