Для создания карты сайта нам понадобятся:
Заходим в раздел шаблонов вашего блога. Создаем модульный шаблон с именем "Google Sitemap". Потому что вроде как гугл и придумал эту штукенцию. Хотя может и не гугл, но все поисковики поддерживают карту сайта именно в гугловом формате.
Шаг 2.
Копируем в шаблон следующий код:
Шаг 3.
Создаем индексный шаблон под названием "Google Sitemap". И присваиваем ему имя файла "sitemap.xml". В нем пишем код:
Все. Теперь у вас есть карта сайта, которую понимают как минимум Google, Yandex, Yahoo, Bing и Ask. Есть вопросы? Пишите.
Данный прием был позаимствован с MovableType.org.
- Блог под управлением Movable Type
- Админский доступ в этот блог
- Прямые руки и умение читать с бумажки
- Умение использовать секретную комбинацию Copy-Paste.
Заходим в раздел шаблонов вашего блога. Создаем модульный шаблон с именем "Google Sitemap". Потому что вроде как гугл и придумал эту штукенцию. Хотя может и не гугл, но все поисковики поддерживают карту сайта именно в гугловом формате.
Шаг 2.
Копируем в шаблон следующий код:
<?xml version="1.0" encoding="UTF-8"?>Затем! указываем, что шаблон у нас кэшируемый и истекает через 24 часа. Это даст нам автоматическую публикацию карты сайта каждые 24 часа.Canonical sitemap.xml template v0.8 ### START SETUP Possible values for the frequency variables are: always hourly daily weekly monthly yearly never "always" should be used to describe documents that change each time they are accessed. "never" should be used to describe archived URLs. <$MTSetVar name="home-frequency" value="daily"$> <$MTSetVar name="category-frequency" value="weekly"$> <$MTSetVar name="current-monthly-frequency" value="daily"$> <$MTSetVar name="past-monthly-frequency" value="never"$> <$MTSetVar name="current-weekly-frequency" value="daily"$> <$MTSetVar name="past-weekly-frequency" value="never"$> <$MTSetVar name="current-daily-frequency" value="hourly"$> <$MTSetVar name="past-daily-frequency" value="never"$> <$MTSetVar name="recent-entry-frequency" value="hourly"$> <$MTSetVar name="past-entry-frequency" value="monthly"$> <$MTSetVar name="page-frequency" value="weekly"$>Values for priority range from 0.0 to 1.0 and reflect the relative importance of pages within your site. Do not set these all to a high value, as that's no different from setting them all to 0.0. This does not affect how your pages are compared to other sites'. <$MTSetVar name="home-priority" value="1.0"$> <$MTSetVar name="category-priority" value="0.8"$> <$MTSetVar name="monthly-priority" value="0.6"$> <$MTSetVar name="weekly-priority" value="0.4"$> <$MTSetVar name="daily-priority" value="0.2"$> <$MTSetVar name="entry-priority" value="1.0"$> <$MTSetVar name="page-priority" value="1.0"$>### END SETUP ### This is your blog's homepage <$MTBlogURL encode_xml="1"$> <$MTGetVar name="home-frequency"$> <$MTGetVar name="home-priority"$> ### START CATEGORY ARCHIVES <$MTCategoryArchiveLink encode_xml="1"$> <$MTEntryModifiedDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$> <$MTGetVar name="category-frequency"$> <$MTGetVar name="category-priority"$> ### END CATEGORY ARCHIVES ### START MONTHLY ARCHIVES ### The current month is still being updated. <$MTArchiveLink encode_xml="1"$> <$MTEntryModifiedDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$> <$MTGetVar name="current-monthly-frequency"$> <$MTGetVar name="monthly-priority"$> ### Past months are just archived. <$MTArchiveLink encode_xml="1"$> <$MTEntryModifiedDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$> <$MTGetVar name="past-monthly-frequency"$> <$MTGetVar name="monthly-priority"$> ### END MONTHLY ARCHIVES ### START WEEKLY ARCHIVES ### The current week is still being updated. <$MTArchiveLink encode_xml="1"$> <$MTEntryModifiedDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$> <$MTGetVar name="current-weekly-frequency"$> <$MTGetVar name="weekly-priority"$> ### Past weeks are just archived. <$MTArchiveLink encode_xml="1"$> <$MTEntryModifiedDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$> <$MTGetVar name="past-weekly-frequency"$> <$MTGetVar name="weekly-priority"$> ### END WEEKLY ARCHIVES ### START DAILY ARCHIVES ### The current day is still being updated. <$MTArchiveLink encode_xml="1"$> <$MTEntryModifiedDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$> <$MTGetVar name="current-daily-frequency"$> <$MTGetVar name="daily-priority"$> ### Past days are just archived. <$MTArchiveLink encode_xml="1"$> <$MTEntryModifiedDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$> <$MTGetVar name="past-daily-frequency"$> <$MTGetVar name="daily-priority"$> ### END DAILY ARCHIVES ### START INDIVIDUAL ARCHIVES ### The recent items you post are more likely to be active(comments, etc) than older ones. <$MTEntryPermalink encode_xml="1"$> <$MTEntryModifiedDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$> <$MTGetVar name="recent-entry-frequency"$> <$MTGetVar name="entry-priority"$> ### And the rest of them. <$MTEntryPermalink encode_xml="1"$> <$MTEntryModifiedDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$> <$MTGetVar name="past-entry-frequency"$> <$MTGetVar name="entry-priority"$> ### END INDIVIDUAL ARCHIVES ### START PAGE ARCHIVES ### <$MTPagePermalink encode_xml="1"$> <$MTPageModifiedDate format="%Y-%m-%dT%H:%M:%S"$><$MTBlogTimezone$> <$MTGetVar name="page-frequency"$> <$MTGetVar name="page-priority"$> ### END PAGE ARCHIVES ###
Шаг 3.
Создаем индексный шаблон под названием "Google Sitemap". И присваиваем ему имя файла "sitemap.xml". В нем пишем код:
<$mt:Include module="Google Sitemap"$>Сохраняем и публикуем шаблон.
Все. Теперь у вас есть карта сайта, которую понимают как минимум Google, Yandex, Yahoo, Bing и Ask. Есть вопросы? Пишите.
Данный прием был позаимствован с MovableType.org.

Комментировать