先日、Movable Typeを4.261にアップグレードしたのですが、やはり色々問題が残っていたので、修正しました。
主にテンプレート関連が初期化されたことによるものですが、なかなか気付かなかったのでメモしておきます。
・permanent linkの’_'(アンダーバー)の部分が’-’(マイナス)に変更された
アーカイブテンプレートのブログ記事で、アーカイブマッピングが、
yyyy/mm/entry-basename.html
になっているのが原因でした。
yyyy/mm/entry_basename.html
に変更すれば、アンダーバーに変更することができました。
(実際には両方出力するようにしました)


・atom.xml以外のfeedが作成されなくなった
インデックステンプレートからRSS feedを作成するテンプレートがなくなったためだったので、下記を追加しました。
RSS 1.0
出力ファイル index.rdf

<?xml version="1.0" encoding="<$MTPublishCharset$>"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:admin="http://webns.net/mvcb/"
xmlns:cc="http://web.resource.org/cc/"
xmlns="http://purl.org/rss/1.0/">
<channel rdf:about="<$MTBlogURL$>">
<title><$MTBlogName encode_xml="1"$></title>
<link><$MTBlogURL$></link>
<description><$MTBlogDescription encode_xml="1"$></description>
<dc:language><$MTDefaultLanguage$></dc:language>
<dc:creator></dc:creator>
<dc:date><MTEntries lastn="1"><$MTEntryDate format="%Y-%m-%dT%H:%M:%S" language="en"$><$MTBlogTimezone$></MTEntries></dc:date>
<admin:generatorAgent rdf:resource="http://www.movabletype.org/?v=<$MTVersion$>" />
<MTBlogIfCCLicense><cc:license rdf:resource="<$MTBlogCCLicenseURL$>" /></MTBlogIfCCLicense>
<items>
<rdf:Seq><MTEntries lastn="15">
<rdf:li rdf:resource="<$MTEntryPermalink encode_xml="1"$>" />
</MTEntries></rdf:Seq>
</items>
</channel>
<MTEntries lastn="15">
<item rdf:about="<$MTEntryPermalink encode_xml="1"$>">
<title><$MTEntryTitle encode_xml="1"$></title>
<link><$MTEntryPermalink encode_xml="1"$></link>
<description>
<$MTEntryBody encode_xml="1"$>
</description>
<dc:subject><$MTEntryCategory encode_xml="1"$></dc:subject>
<dc:creator><$MTEntryAuthor encode_xml="1"$></dc:creator>
<dc:date><$MTEntryDate format="%Y-%m-%dT%H:%M:%S" language="en"$><$MTBlogTimezone$></dc:date>
</item></MTEntries>
</rdf:RDF>


RSS 2.0
出力ファイル index.xml

<$MTHTTPContentType type="application/rss+xml"$><?xml version="1.0" encoding="<$MTPublishCharset$>"?>
<rss version="2.0">
<channel>
<title><$MTBlogName remove_html="1" encode_xml="1"$></title>
<link><$MTBlogURL$></link>
<description><$MTBlogDescription remove_html="1" encode_xml="1"$></description>
<language><$MTBlogLanguage ietf="1"$></language>
<copyright>Copyright <$MTDate format="%Y"$></copyright>
<lastBuildDate><MTEntries lastn="1"><$MTEntryDate format_name="rfc822"$></MTEntries></lastBuildDate>
<generator>http://www.sixapart.com/movabletype/</generator>
<docs>http://www.rssboard.org/rss-specification</docs>
<MTEntries lastn="15">
<item>
<title><$MTEntryTitle remove_html="1" encode_xml="1"$></title>
<description><$MTEntryBody encode_xml="1"$></description>
<link><$MTEntryPermalink encode_xml="1"$></link>
<guid><$MTEntryPermalink encode_xml="1"$></guid>
<MTEntryCategories>
<category domain="http://www.sixapart.com/ns/types#category"><$MTCategoryLabel remove_html="1" encode_xml="1"$></category>
</MTEntryCategories>
<MTEntryIfTagged><MTEntryTags>
<category domain="http://www.sixapart.com/ns/types#tag"><$MTTagName remove_html="1" encode_xml="1"$></category>
</MTEntryTags></MTEntryIfTagged>
<pubDate><$MTEntryDate format_name="rfc822"$></pubDate>
</item>
</MTEntries>
</channel>
</rss>


・iPhone用のページが更新されなくなった
使用していたiPhoneテンプレート for MTのテンプレートが消えていたため、再度設定。
あとトラブルではないですが、ブログ記事に追加した各種ソーシャルブックマーク用アイコンのコードは下記のような感じ。

<a href="http://b.hatena.ne.jp/entry/<$mt:EntryPermalink$>" title="このエントリーを含むはてなブックマーク"><img src="/image/b_entry.gif" width="16" height="12" style="border:0" alt="このエントリーを含むはてなブックマーク"></a><img src="http://b.hatena.ne.jp/entry/image/<$mt:EntryPermalink$>" alt="">
<a href="http://del.icio.us/url?url=<$mt:EntryPermalink$>" title="del.icio.us"><img src="/image/delicious.gif" width="12" height="12" style="border:0" alt="del.icio.us"></a>
<a href="javascript:void window.open(‘http://bookmarks.yahoo.co.jp/bookmarklet/showpopup?t=<$mt:EntryTitle encode_html="1"$>&u=<$mt:EntryPermalink$>&opener=bm&ei=euc’,’popup’,’width=550px,height=480px,status=1,location=0,resizable=1,scrollbars=0,left=100,top=50′,0);"><img src="http://i.yimg.jp/images/sicons/ybm16.gif" width="16" height="16" alt="Yahoo!ブックマークに登録"></a>
<a href="http://clip.livedoor.com/redirect?link=<$mt:EntryPermalink$>&title=<$mt:EntryTitle encode_html="1"$>&ie=euc" class="ldclip-redirect" title="この記事をクリップ!"><img src="http://parts.blog.livedoor.jp/img/cmn/clip_16_12_w.gif" width="16" height="12" alt="この記事をクリップ!"></a><img src="http://image.clip.livedoor.com/counter/<$mt:EntryPermalink$>">
<a href="http://buzzurl.jp/entry/<$mt:EntryPermalink$>" title="Buzzurlにブックマーク" target="_blank"><img src="http://buzzurl.jp/static/image/api/icon/add_icon_mini_10.gif" alt="Buzzurlにブックマーク" style="border:0"></a><a href="http://buzzurl.jp/entry/<$mt:EntryPermalink$>" title="Buzzurlにブックマーク" target="_blank"><img src="http://api.buzzurl.jp/api/counter/<$mt:EntryPermalink$>" alt="Buzzurlにブックマーク" style="border:0"></a>


一部のimageは自前で用意する必要があります。

コメントを残す