Skip to content

monsieurbiz/SyliusRobotsTxtPlugin

Repository files navigation

Sylius Robots TXT

Robots TXT Plugin license Tests Status Recipe Status Security Status

Manage your robots.txt from your Sylius admin pannel

Demo of the settings form to manage robots.txt content

Compatibility

Sylius Version PHP Version
1.12 8.1 - 8.2
1.13 8.1 - 8.2

Installation

If you want to use our recipes, you can configure your composer.json by running:

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

Then remove your robots.txt file from your public directory.

rm public/robots.txt
For the installation without flex, follow these additional steps

Setup Settings Installation

Change your config/bundles.php file to add this line for the plugin declaration:

<?php

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

Then create the config file in config/packages/monsieurbiz_sylius_robots_txt_plugin.yaml :

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

Finally import the routes in config/routes/monsieurbiz_sylius_robots_txt_plugin.yaml :

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

Contributing

You can open an issue or a Pull Request if you want! 😘
Thank you!

About

Manage your robot.txt from your Sylius admin pannel

Resources

License

Stars

Watchers

Forks

Packages

No packages published