monsieurbiz/sylius-robots-txt-plugin

从您的 Sylius 管理面板管理您的 robot.txt

安装: 542

依赖: 0

建议: 0

安全性: 0

星级: 2

关注者: 2

分支: 0

开放问题: 0

类型:sylius-plugin

v0.1.1 2024-07-29 10:30 UTC

This package is auto-updated.

Last update: 2024-08-29 11:53:48 UTC


README

Robots TXT Plugin license Tests Status Recipe Status Security Status

从您的 Sylius 管理面板管理您的 robot.txt

Demo of the settings form to manage robots.txt content

兼容性

安装

如果您想使用我们的配方,您可以通过运行以下命令来配置您的 composer.json

composer config --no-plugins --json extra.symfony.endpoint '["https://api.github.com/repos/monsieurbiz/symfony-recipes/contents/index.json?ref=flex/master","flex://defaults"]'
composer require monsieurbiz/sylius-robots-txt-plugin

然后从您的公开目录中删除您的 robots.txt 文件。

rm public/robots.txt
对于不带 flex 的安装,请按照以下额外步骤操作

设置设置安装

更改您的 config/bundles.php 文件,为插件声明添加此行

<?php

return [
    //..
    MonsieurBiz\SyliusRobotsTxtPlugin\MonsieurBizSyliusRobotsTxtPlugin::class => ['all' => true],
];  

然后在 config/packages/monsieurbiz_sylius_robots_txt_plugin.yaml 中创建配置文件

imports:
    resource: '@MonsieurBizSyliusRobotsTxtPlugin/Resources/config/config.yaml'

最后在 config/routes/monsieurbiz_sylius_robots_txt_plugin.yaml 中导入路由

monsieurbiz_robots_txt_render:
    path: /robots.txt
    methods: [ GET ]
    defaults:
        _controller: MonsieurBiz\SyliusRobotsTxtPlugin\Controller\RenderController

贡献

如果您想,您可以打开一个问题或拉取请求! 😘
谢谢!