ネコとイチゴが好きなwebデザイナー・鶴穂香のブログです

個別記事

MTでRSS1.0を配信する

すいません、前の記事でRSS2.0でmixiの日記に反映できたーと書いていましたが、あらためてmixiを見たら、日記を書くボタン上に出ていた「最近は更新がありません」というメッセージが消えてただけで、日記その物は反映されていませんでした(笑)

もしかしてRSS1.0でないとダメなのかなーと思い、こちらも作成してみました。
そしたら無事、mixiの更新履歴にブログのタイトルが並んでました!

RSS2.0がダメだったのか、追加しちゃったcontent:encodedがよくなかったのかは分かりませんが(もしくはmixiって外部ブログの反映が遅くなる事が多いみたいなので、ラグがあっただけかもしれませんが)、とりあえずは成功したのでオールオッケー。

Movable Type 備忘録さんのRSS1.0テンプレートを追加するという記事を参考にさせていただきました。

一応自分用にメモ......

手順はRSS2.0と同じなので割愛。
ファイル名は、拡張子がrdfに変更になるのでindex.rdfになる。
ソースは以下。

新規インデックスファイル(index.rdf)

<?xml version="1.0" encoding="<$mt:PublishCharset$>"?> <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="<$mt:BlogURL$>"> <title><$mt:BlogName encode_xml="1"$></title> <link><$mt:BlogURL$></link> <description><$mt:BlogDescription encode_xml="1"$></description> <dc:language><$mt:DefaultLanguage$></dc:language> <dc:creator></dc:creator> <dc:date><mt:Entries lastn="1"><$mt:EntryDate format="%Y-%m-%dT%H:%M:%S" language="en"$><$mt:BlogTimezone$></mt:Entries></dc:date> <admin:generatorAgent rdf:resource="http://www.movabletype.org/?v=<$mt:Version$>" /> <mt:BlogIfCCLicense> <cc:license rdf:resource="<$mt:BlogCCLicenseURL$>" /> </mt:BlogIfCCLicense> <items> <rdf:Seq><mt:Entries lastn="15"> <rdf:li rdf:resource="<$mt:EntryPermalink encode_xml="1"$>" /> </mt:Entries></rdf:Seq> </items> </channel> <mt:Entries lastn="15"> <item rdf:about="<$mt:EntryPermalink encode_xml="1"$>"> <title><$mt:EntryTitle encode_xml="1"$></title> <link><$mt:EntryPermalink encode_xml="1"$></link> <description><$mt:EntryExcerpt encode_xml="1"$></description> <dc:subject><$mt:EntryCategory encode_xml="1"$></dc:subject> <dc:creator><$mt:EntryAuthor encode_xml="1"$></dc:creator> <dc:date><$mt:EntryDate format="%Y-%m-%dT%H:%M:%S" language="en"$><$mt:BlogTimezone$></dc:date> </item> </mt:Entries> </rdf:RDF>

HTMLヘッダーに追加

<link rel="alternate" type="application/rss+xml" title="RSS 1.0" href="<$MTBlogURL$>index.rdf" />

ウィジェット > 購読に追加

<a href="<$mt:BlogURL$>index.rdf">RSS 1.0</a>

Trackback URL : http://www.tsuruhoka.net/mt/mt-tb.cgi/16

コメントオーナー情報
チェック項目
コメント欄

ページ上部へ