blackbit_digital_commerce/pimcore-external-sitemaps

将外部站点地图/站点地图索引文件中的URL添加到Pimcore生成的sitemap.xml

1.0.0 2022-05-19 10:00 UTC

This package is auto-updated.

Last update: 2024-09-19 15:12:21 UTC


README

此Pimcore插件允许您将外部站点地图包含到您的sitemap.xml中。它还支持包含外部站点地图索引URL,其中引用的站点地图文件将被解析。

安装

Composer

要获取插件代码,请发送电子邮件至 info@blackbit.de

然后您将获得访问插件存储库的权限,或者您将获得作为zip文件的插件代码。访问Bitbucket存储库的优点是您将始终在拉取请求中看到插件的变化,并能够自行更新到新版本 - 如果这听起来很有趣,请访问 此页面 - 如果有兴趣,请发送我们您的BitBucket账户电子邮件地址,以便我们允许访问存储库。

当我们允许您的账户访问我们的存储库时,请将存储库添加到您的Pimcore根目录中的 composer.json(请参阅 Composer repositories

"repositories": [
    {
        "type": "vcs",
        "url": "git@bitbucket.org:blackbitwerbung/pimcore-plugins-external-sitemaps"
    }
],

或者如果您收到的是zip文件的插件代码,请将zip文件上传到您的服务器(例如,到Pimcore根目录),并将以下内容添加到您的 composer.json

"repositories": [
    {
        "type": "artifact",
        "url": "path/to/directory/with/zip-file/"
    }
]

然后您应该能够从CLI执行 composer require blackbit/external-sitemaps(如果您已安装此捆绑包,则用于更新的命令为 composer update blackbit/external-sitemaps --no-dev)。

最后,您必须通过Pimcore管理后台的浏览器UI或通过CLI启用插件

bin/console pimcore:bundle:enable BlackbitExternalSitemapsBundle

插件配置

要定义外部站点地图URL,您必须在 config/services.yaml(Pimcore >= 10)或 app/config/services.yml(Pimcore <= 6) 中覆盖symfony服务 Blackbit\ExternalSitemapsBundle\ExternalSitemapGenerator

Blackbit\ExternalSitemapsBundle\ExternalSitemapGenerator:
    arguments:
        $externalUrls: [ 'https://example.org/sitemap.xml', 'https://example2.org/sitemapIndex.xml' ]

配置完成后,所有外部站点地图URL将放入您默认Pimcore站点地图索引文件 /sitemap.xml 中的 sitemap.externalUrls.xml