現在位置: Top/Googleサイトマップ

Googleサイトマップ

MovableType

  1. テンプレートの編集をします。
    テンプレートの名前:GoogleSitemaps
    出力ファイル名:sitemap.xml
    インデックス・テンプレートを再構築するときにこのテンプレートを自動的に再構築する:チェックする
    テンプレートの中身:
    <?xml version="1.0" encoding="UTF-8"?>
    <urlset xmlns="http://www.google.com/schemas/sitemap/0.84">
    <url>
    <loc><$MTBlogURL encode_xml="1"$></loc>
    <priority>1.0</priority>
    </url>
    <MTCategories>
    <url>
    <loc><$MTCategoryArchiveLink encode_xml="1"$></loc>
    </url>
    </MTCategories>
    <MTEntries lastn="9999">
    <url>
    <loc><$MTEntryPermalink encode_xml="1"$></loc>
    <lastmod><$MTEntryModifiedDate utc="1" format="%Y-%m-%dT%H:%M:%SZ"$></lastmod>
    </url>
    </MTEntries>
    </urlset>
  2. 再構築する。
  3. <URL>sitemap.xmlを登録

Nucleus

  1. sitemap.php
    <?php
    $CONF = array();
    include('./config.php');
    selectSkin('google/sitemap');
    selector();
    ?>
  2. skinbackup.xml
    <nucleusskin>
    <meta>
    <skin name="google/sitemap" />
    <template name="google/sitemap" />
    <info><![CDATA[Google Sitemaps Skin]]></info>
    </meta>
    <skin name="google/sitemap" type="text/xml" includeMode="normal" includePrefix="">
    <description>GoogleSitemap</description>
    <part name="index"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
    <urlset
     xmlns="http://www.google.com/schemas/sitemap/0.84"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://www.google.com/schemas/sitemap/0.84
       http://www.google.com/schemas/sitemap/0.84/sitemap.xsd">
    <url>
    <loc><%sitevar(url)%></loc>
    <priority>1.0</priority>
    </url>
    <%blog(google/sitemap,9999)%>
    </urlset>]]></part>
    </skin>
    <template name="google/sitemap">
    <description>GoogleSitemap</description>
    <part name="FORMAT_DATE"><![CDATA[%Y-%m-%d]]></part>
    <part name="FORMAT_TIME"><![CDATA[%H:%M:%S]]></part>
    <part name="ITEM"><![CDATA[<url>
    <loc><%blogurl%><%itemlink%></loc>
    <lastmod><%date(utc)%></lastmod>
    </url>
    ]]></part>
    </template>
    </nucleusskin>
  3. sitemap.phpはindex.phpと同じフォルダへ。
  4. skinbackup.xmlはskins/sitemapフォルダへ。
  5. 管理画面から「レイアウト設定」の「読込/書出」で「ローカルファイルから読み込み:」の「sitemap」を選択して「読み込み」
  6. <URL>sitemap.phpを登録

Pukiwiki

http://terai.xrea.jp/PukiWiki/Google.html

xreaの場合

404 (ファイルが見つかりません)
エラー ページのヘッダーで 200 (OK) ステータスが返されました。

というエラーがでるので、

  1. ルートに.htaccessというファイルを作成
    ErrorDocument 404 /error.html
    という内容を書き込む
  2. ルートにerror.htmlを置く。
  3. 内容は「ファイルが見つかりません」のようなことが書いてあるといいですね。