[xml] RSS2.0 Feed Template

ブログでおなじみのRSSというものは書式さえ覚えてしまえば手書きでも配信出来るんだ。
詳細はRSS 2.0 Notesが分かりやすいと思います。

headタグにこのlinkタグを入れると、アドレスバーにRSSのマークが付く。

<link rel="alternate" type="application/rss+xml" title="RSS Feed" href="http://example.com/feed.xml" />

xmlファイル作って以下をコピペしたあと適当に中身を編集する。文字コードはUTF-8で。
内容増やす場合はitemの部分をコピペする。

<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
>
	<channel>
	<title>Title</title>
	<link>Site URL</link>
	<atom:link href="FeedURL" rel="self" type="application/rss+xml" />
	<description>Feed Description</description>
	<language>ja</language>
	<pubDate>last modified Date(RFC 822)</pubDate>
	<lastBuildDate>last modified Date(GMT)</lastBuildDate>
	<docs>http://blogs.law.harvard.edu/tech/rss</docs>
	<generator>RSS Generator Name</generator>
	<webMaster>sample@example.com (master name)</webMaster>
	<item>
		<title>Title</title>
		<link>Item Detail Link</link>
		<description>Descriotion</description>
		<pubDate>Publish Date(RFC 822)</pubDate>
		<guid isPermaLink="false">Item ID or URI</guid>
	</item>
	</channel>
</rss>

コメントを残す

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください