sergeybruhin/dynamic-robots 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱: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
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固