Skip to content

Commit

Permalink
Merge branch 'main' of github.com:retinens/laravel-sitemap-command in…
Browse files Browse the repository at this point in the history
…to main
  • Loading branch information
WhereIsLucas committed May 15, 2022
2 parents 81fd5fc + 88b240f commit ac06897
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ You can install the package via composer:
composer require retinens/laravel-sitemap-command
```

Don't forget to add the sitemap.xml file in your gitignore
```bash
/public/sitemap.xml
```


You can publish the config file with:
```bash
php artisan vendor:publish --tag="laravel-sitemap-command-config"
Expand Down
1 change: 1 addition & 0 deletions src/Commands/LaravelSitemapCommandCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public function handle(): int
{
if (strlen(config('sitemap-command.website_url'))) {
SitemapGenerator::create(config('sitemap-command.website_url'))->writeToFile(public_path('/sitemap.xml'));

return self::SUCCESS;
} else {
$this->error('Please setup an valid APP_URL in your .env file');
Expand Down

0 comments on commit ac06897

Please sign in to comment.