blankogmbh/kirby-sitemap

此包已被废弃且不再维护。作者建议使用 omz13/kirby3-xmlsitemap 包。
最新版本(v1.4.1)的此包没有可用的许可证信息。

安装: 671

依赖者: 0

建议者: 0

安全: 0

星星: 10

关注者: 3

分支: 1

类型:kirby-plugin

v1.4.1 2018-01-24 14:13 UTC

This package is auto-updated.

Last update: 2020-05-24 09:21:04 UTC


README

此插件可以从Kirby的所有页面生成 sitemap.xml。您可以选择从网站地图中排除页面,并指定哪些页面应该有最高的优先级(1)。否则,页面将自动按深度排序。

安装

Composer

composer require blankogmbh/kirby-sitemap

Kirby CLI

kirby plugin:install blankogmbh/kirby-sitemap

Git

检出此存储库到 /site/plugins/ 或将其作为子模块包含: git submodule add https://github.com/blankogmbh/kirby-sitemap.git site/plugins/kirby-sitemap

使用

您可以通过浏览到 http://your-fancy-kirby-site.net/sitemap.xml 来预览您的网站地图。

您可以通过Kirby的 config.php 配置此插件。

从网站地图中排除页面

c::set('sitemap.exclude', [
    'error', // just the page error
    'example*', // exclude all pages starting with example
    'example/*', // exclude only subpages of example (but include example)
]);

排除隐藏页面

c::set('sitemap.excludeHiddenPages', true);

在根级别包含隐藏页面

如果您将 sitemap.excludeHiddenPages 设置为 true,但希望隐藏的根页面被包含

c::set('sitemap.includeHiddenRootPages', true);

优先级页面

c::set('sitemap.priority', [
    'contact', // just the page contact
    'important*', // all pages starting with important
    'important/*', // all subpages of important (but not important)
]);

c::set('sitemap.priority', false); // disable prioritization

在页面 创建、删除、排序、隐藏、移动 时ping Google

c::set('sitemap.pingGoogle', true);

更改路由模式

c::set('sitemap.route.pattern', 'sitemap-xml');

作者

Markus Denhoff / Blanko denhoff@blanko.de

灵感来自 Thomas Ghysels的网站地图插件