release 2.0.1 k8s convenience output file option
This commit is contained in:
parent
482614655c
commit
a982d5daa1
3 changed files with 13 additions and 2 deletions
|
|
@ -2,6 +2,10 @@
|
|||
|
||||
All notable changes to `sitemap-generator` will be documented in this file.
|
||||
|
||||
## Version 2.0.1
|
||||
|
||||
- Add sitemap output option
|
||||
|
||||
## Version 2.0.0
|
||||
|
||||
- Laravel 10 php 8.2 release
|
||||
|
|
|
|||
|
|
@ -96,4 +96,11 @@ return [
|
|||
* ! This needs pupetter installed with npm : npm i puppeteer (not to put in dev dependencies)
|
||||
*/
|
||||
'executeJavascript' => true,
|
||||
|
||||
/**
|
||||
* Output xml file, consider this shall be public/sitemap.xml
|
||||
*
|
||||
* Use this for deployement convenience for example.
|
||||
*/
|
||||
'output' => \storage_path('app/public/sitemap.xml')
|
||||
];
|
||||
|
|
|
|||
|
|
@ -47,13 +47,13 @@ class GenerateSitemapCommand extends Command
|
|||
return 0;
|
||||
}
|
||||
|
||||
$dest = \public_path('sitemap.xml');
|
||||
$dest = config('sitemap-generator.output', \public_path('sitemap.xml'));
|
||||
|
||||
if (File::exists($dest)) {
|
||||
$this->info('public/sitemap.xml exist, will overwrite.');
|
||||
}
|
||||
|
||||
$sitemap->export(\public_path('sitemap.xml'));
|
||||
$sitemap->export($dest);
|
||||
} catch (SitemapException $e) {
|
||||
$this->error('An error occured while generating sitemap');
|
||||
$this->error($e->getMessage());
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue