fuelviews / laravel-robots-txt
Laravel robots txt package
Fund package maintenance!
Fuelviews
Requires
- php: ^8.2
- spatie/laravel-package-tools: ^1.14.0
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.8
- orchestra/testbench: ^8.8
- pestphp/pest: ^2.20
- pestphp/pest-plugin-arch: ^2.5
- pestphp/pest-plugin-laravel: ^2.0
This package is auto-updated.
Last update: 2024-10-28 22:34:44 UTC
README
Laravel robots txt integrates opinionated default robots.txt
Installation
You can require the package and it's dependencies via composer:
composer require fuelviews/laravel-robots-txt
You can manually publish the config file with:
php artisan vendor:publish --provider="Fuelviews\RobotsTxt\RobotsTxtServiceProvider" --tag="robots-txt-config"
This is the contents of the published config file:
return [ /** * The disk where the robots.txt file will be saved */ 'disk' => 'public', /** * User agent rules for different paths */ 'user_agents' => [ '*' => [ 'Allow' => [ '/', ], 'Disallow' => [ '/admin', '/dashboard', ], ], ], /** * Sitemaps to include in robots.txt */ 'sitemap' => [ 'sitemap.xml', ], ];
Usage
To access the robots.txt, navigate to your application's URL and append /robots.txt to it.
For example, if your application is hosted at http://example.com, the sitemap can be found at http://example.com/robots.txt.
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
If you've found a bug regarding security please mail support@fuelviews.com instead of using the issue tracker.
Credits
Support us
Fuelviews is a web development agency based in Portland, Maine. You'll find an overview of all our projects on our website.
License
The MIT License (MIT). Please see License File for more information.