承接 sergeybruhin/dynamic-robots 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

sergeybruhin/dynamic-robots

最新稳定版本:1.0.3

Composer 安装命令:

composer require sergeybruhin/dynamic-robots

包简介

Laravel Dynamic Robots Package

README 文档

README

Latest Version on Packagist Total Downloads

Very basic and simple package to show different robots.txt files for different environments. Just create new directory and create there blade files with environment names. That's it!

Installation

You can install the package via composer:

composer require sergeybruhin/dynamic-robots

Publish Config

php artisan vendor:publish --provider="SergeyBruhin\DynamicRobots\Providers\DynamicRobotsServiceProvider"

Set robots blade files directory

If you want to change robots.txt for production environment just add production.blade.php with robots.txt content to resources/views/robots.

return [
    /**
     * Custom robots blade files directory prefix without trailing dot
     * eg: robots
     * If empty, default robots.txt from package will be used
     */
    'directory' => 'robots',
];

Create Default robots.txt

If there are no blade file for current environment, default.blade.php will be used. So don't forget to create it in /resources/views/{your-directory}!

Default robots.txt from package if user robots.txt not exists

User-agent: *
Disallow: /admin/*
Disallow: /nova/*

⚠️ If you have robots.txt in public folder don't forget to delete it!

Testing (Not yet 💁‍♂️)

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

ToDo

  • Add ability to programmatically change robots files
  • Add ability to set default rule set via config

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email sundaycreative@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 80
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-01-03