GREAT ADVENTURE OF THE THEME
Akira Sawada
Six Apart Engineer, Movable Type Engineering
| theme.yaml | 基本情報 |
|---|---|
| elements | |
| elements用ファイル | blog_static, templates... |
| thumbnail | large.png, small.png... |
| Special Directories | alt-tmpl, static... |
YAML とは、構造化されたデータを表現するためのフォーマットです。目的は XML と似ていますが、XML と比べて「読みやすい」「書きやすい」「わかりやすい」という利点があります。
- 「Rubyist Magazine - プログラマーのための YAML 入門 (初級編)」より引用
- http://jp.rubyist.net/magazine/?0009-YAML
required_components:
community: 0.1
optional_components:
commercial: 0.1
thumbnail_file: thumb.png thumbnail_file_medium: thumb-medium.png thumbnail_file_small: thumb-small.png
| width | height | |
|---|---|---|
| thumbnail_file | 400 | 300 |
| thumbnail_file_medium | 240 | 180 |
| thumbnail_file_small | 120 | 90 |
l10n_lexicon:
ja:
Classic Website: クラシックウェブサイト
de:
Classic Website: Klassische Website
author_link: http://blog.aklaswad.com/ author_name: Akira Sawada class: blog description: A slideware theme that brings you a slide composing screen and cool presentation appearance. This theme is for demonstration of MT5 theme framework. id: slidon label: Slidon name: Slidon version: 0.2 thumbnail_file: slidon_icon.png thumbnail_file_medium: slidon_icon_medium.png thumbnail_file_small: slidon_icon_small.png required_components: cmscontext/cmscontext.pl: 0.1
http://www.movabletype.jp/documentation/developer/theme/extend_theme_framewok.html
| Theme | Plugin | |
|---|---|---|
| 設置場所 | ./themes | ./plugins |
| 長所 | 開発が容易 | 高度なカスタマイズが可能 |
| 短所 | サーバー側でのスクリプトは含められない | 作成にはある程度のスキルが必要 |
require MT::Theme;
my $theme = MT::Theme->load('slidon');
# or my $theme = $blog->theme;
$theme->apply($blog);
for my $blog ( @blogs ) {
if ( $blog->theme_id eq 'pico' ) {
# do something
}
}