Skip to content

Commit

Permalink
Update GitHub funding and issue template URLs, update package name in…
Browse files Browse the repository at this point in the history
… README, update package name in license, update package name in composer.json, update package name in PHPUnit configuration, update package name in robots.txt controller, update package name in robots.txt facade, update package name in robots.txt service provider, update package name in robots.txt service, update package name in robots.txt clear command, update package name in robots.txt disk test, update package name in robots.txt environment test, update package name in robots.txt sitemap test, update package name in delete public robots.txt test, update package name in pest test helper.
  • Loading branch information
thejmitchener committed Mar 5, 2024
1 parent d4480a5 commit 261d70b
Show file tree
Hide file tree
Showing 34 changed files with 801 additions and 617 deletions.
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github: :vendor_name
github: Fuelviews
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
blank_issues_enabled: false
contact_links:
- name: Ask a question
url: https://github.com/:vendor_name/:package_name/discussions/new?category=q-a
url: https://github.com/Fuelviews/laravel-sitemap/discussions/new?category=q-a
about: Ask the community for help
- name: Request a feature
url: https://github.com/:vendor_name/:package_name/discussions/new?category=ideas
url: https://github.com/Fuelviews/laravel-sitemap/discussions/new?category=ideas
about: Share ideas for new features
- name: Report a security issue
url: https://github.com/:vendor_name/:package_name/security/policy
url: https://github.com/Fuelviews/laravel-sitemap/security/policy
about: Learn how to notify us for sensitive bugs
28 changes: 0 additions & 28 deletions .github/workflows/phpstan.yml

This file was deleted.

7 changes: 3 additions & 4 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@ jobs:
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest]
php: [8.3, 8.2, 8.1]
os: [ubuntu-latest]
php: [8.3, 8.2]
laravel: [10.*]
stability: [prefer-lowest, prefer-stable]
include:
- laravel: 10.*
testbench: 8.*
carbon: ^2.63

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}

Expand All @@ -45,7 +44,7 @@ jobs:
- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "nesbot/carbon:${{ matrix.carbon }}" --no-interaction --no-update
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
- name: List Installed Dependencies
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Changelog

All notable changes to `:package_name` will be documented in this file.
All notable changes to `laravel-robots-txt` will be documented in this file.
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) :vendor_name <author@domain.com>
Copyright (c) Fuelviews <support@fuelviews.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
86 changes: 41 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,70 +1,60 @@
# :package_description

[![Latest Version on Packagist](https://img.shields.io/packagist/v/:vendor_slug/:package_slug.svg?style=flat-square)](https://packagist.org/packages/:vendor_slug/:package_slug)
[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/:vendor_slug/:package_slug/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/:vendor_slug/:package_slug/actions?query=workflow%3Arun-tests+branch%3Amain)
[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/:vendor_slug/:package_slug/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/:vendor_slug/:package_slug/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
[![Total Downloads](https://img.shields.io/packagist/dt/:vendor_slug/:package_slug.svg?style=flat-square)](https://packagist.org/packages/:vendor_slug/:package_slug)
<!--delete-->
---
This repo can be used to scaffold a Laravel package. Follow these steps to get started:

1. Press the "Use this template" button at the top of this repo to create a new repo with the contents of this skeleton.
2. Run "php ./configure.php" to run a script that will replace all placeholders throughout all the files.
3. Have fun creating your package.
4. If you need help creating a package, consider picking up our <a href="https://laravelpackage.training">Laravel Package Training</a> video course.
---
<!--/delete-->
This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.
# Fuelviews laravel robots.txt package

## Support us

[<img src="https://github-ads.s3.eu-central-1.amazonaws.com/:package_name.jpg?t=1" width="419px" />](https://spatie.be/github-ad-click/:package_name)
[![Latest Version on Packagist](https://img.shields.io/packagist/v/fuelviews/laravel-robots-txt.svg?style=flat-square)](https://packagist.org/packages/fuelviews/laravel-robots-txt)
[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/fuelviews/laravel-robots-txt/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/fuelviews/laravel-robots-txt/actions?query=workflow%3Arun-tests+branch%3Amain)
[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/fuelviews/laravel-robots-txt/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/fuelviews/laravel-robots-txt/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
[![Total Downloads](https://img.shields.io/packagist/dt/fuelviews/laravel-robots-txt.svg?style=flat-square)](https://packagist.org/packages/fuelviews/laravel-robots-txt)

We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards).
The Fuelviews laravel robots.txt package is engineered to significantly accelerate the development and management of robots.txt files for laravel applications. This package seamlessly integrates into your laravel project, offering an efficient and streamlined approach to controlling how search engines interact with your website. By leveraging this package, developers can swiftly configure search engine access rules, directly from the application's configuration, thus dramatically speeding up the development process. With its focus on rapid configuration and deployment, the Fuelviews laravel robots.txt package ensures that managing your site's search engine visibility becomes a quick, hassle-free aspect of your development workflow, allowing you to focus on building and optimizing your application.

## Installation

You can install the package via composer:

```bash
composer require :vendor_slug/:package_slug
```

You can publish and run the migrations with:
You can require the package and it's dependencies via composer:

```bash
php artisan vendor:publish --tag=":package_slug-migrations"
php artisan migrate
composer require fuelviews/laravel-robots-txt
```

You can publish the config file with:
You can manually publish the config file with:

```bash
php artisan vendor:publish --tag=":package_slug-config"
php artisan vendor:publish --provider="Fuelviews\RobotsTxt\RobotsTxtServiceProvider" --tag="robots-txt-config"
```

This is the contents of the published config file:

```php
<?php

return [
'disk' => 'public',
'deny_development_url' => 'development.test2',
'user_agents' => [
'*' => [
'Allow' => [
'/'
],
'Disallow' => [
'/admin',
'/dashboard',
],
],
],
'sitemap' => [
'sitemap.xml',
],
];
```

Optionally, you can publish the views using
You can manually clear the robots.txt cache with:

```bash
php artisan vendor:publish --tag=":package_slug-views"
php artisan robots-txt:clear
```

## Usage

```php
$variable = new VendorName\Skeleton();
echo $variable->echoPhrase('Hello, VendorName!');
```
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

```bash
Expand All @@ -77,17 +67,23 @@ Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed re

## Contributing

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
Please see [CONTRIBUTING](https://github.com/fuelviews/.github/blob/main/CONTRIBUTING.md) for details.

## Security Vulnerabilities

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.
If you've found a bug regarding security please mail [support@fuelviews.com](mailto:support@fuelviews.com) instead of using the issue tracker.

## Credits

- [:author_name](https://github.com/:author_username)
- [Thejmitchener](https://github.com/thejmitchener)
- [Fuelviews](https://github.com/fuelviews)
- [Spatie](https://github.com/spatie)
- [All Contributors](../../contributors)

## Support us

Fuelviews is a web development agency based in Portland, Maine. You'll find an overview of all our projects [on our website](https://fuelviews.com).

## License

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
38 changes: 16 additions & 22 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,53 +1,47 @@
{
"name": ":vendor_slug/:package_slug",
"description": ":package_description",
"name": "fuelviews/laravel-robots-txt",
"description": "Fuelviews laravel robots.txt package",
"keywords": [
":vendor_name",
"Fuelviews",
"laravel",
":package_slug"
"laravel-robots-txt"
],
"homepage": "https://github.com/:vendor_slug/:package_slug",
"homepage": "https://github.com/fuelviews/laravel-robots-txt",
"license": "MIT",
"authors": [
{
"name": ":author_name",
"email": "author@domain.com",
"name": "thejmitchener",
"email": "joshua@fuelviews.com",
"role": "Developer"
}
],
"require": {
"php": "^8.1",
"spatie/laravel-package-tools": "^1.14.0",
"illuminate/contracts": "^10.0"
"php": "^8.2",
"spatie/laravel-package-tools": "^1.14.0"
},
"require-dev": {
"laravel/pint": "^1.0",
"nunomaduro/collision": "^7.8",
"larastan/larastan": "^2.0.1",
"orchestra/testbench": "^8.8",
"pestphp/pest": "^2.20",
"pestphp/pest-plugin-arch": "^2.5",
"pestphp/pest-plugin-laravel": "^2.0",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpstan/phpstan-phpunit": "^1.0",
"spatie/laravel-ray": "^1.26"
"pestphp/pest-plugin-laravel": "^2.0"
},
"autoload": {
"psr-4": {
"VendorName\\Skeleton\\": "src/",
"VendorName\\Skeleton\\Database\\Factories\\": "database/factories/"
"Fuelviews\\RobotsTxt\\": "src/",
"Fuelviews\\RobotsTxt\\Database\\Factories\\": "database/factories/"
}
},
"autoload-dev": {
"psr-4": {
"VendorName\\Skeleton\\Tests\\": "tests/",
"Fuelviews\\RobotsTxt\\Tests\\": "tests/",
"Workbench\\App\\": "workbench/app/"
}
},
"scripts": {
"post-autoload-dump": "@composer run prepare",
"clear": "@php vendor/bin/testbench package:purge-skeleton --ansi",
"clear": "@php vendor/bin/testbench package:purge-laravel-robots-txt --ansi",
"prepare": "@php vendor/bin/testbench package:discover --ansi",
"build": [
"@composer run prepare",
Expand All @@ -73,10 +67,10 @@
"extra": {
"laravel": {
"providers": [
"VendorName\\Skeleton\\SkeletonServiceProvider"
"Fuelviews\\RobotsTxt\\RobotsTxtServiceProvider"
],
"aliases": {
"Skeleton": "VendorName\\Skeleton\\Facades\\Skeleton"
"RobotsTxt": "Fuelviews\\RobotsTxt\\Facades\\RobotsTxt"
}
}
},
Expand Down
41 changes: 41 additions & 0 deletions config/robots-txt.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?php

/**
* Configuration File: robots-txt.php
*
* This file contains configuration options for the robots.txt generation.
*/

return [
/**
* The disk where the robots.txt file will be saved
*/
'disk' => 'public',

/**
* The domain pattern to deny access in development environment
*/
'deny_development_url' => 'development.',

/**
* User agent rules for different paths
*/
'user_agents' => [
'*' => [
'Allow' => [
'/'
],
'Disallow' => [
'/admin',
'/dashboard',
],
],
],

/**
* List of sitemaps to include in robots.txt
*/
'sitemap' => [
'sitemap.xml',
],
];
6 changes: 0 additions & 6 deletions config/skeleton.php

This file was deleted.

Loading

0 comments on commit 261d70b

Please sign in to comment.