Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Default Target Directory Configurable #187

Closed
kiler129 opened this issue Apr 11, 2019 · 4 comments
Closed

Make Default Target Directory Configurable #187

kiler129 opened this issue Apr 11, 2019 · 4 comments
Assignees
Labels

Comments

@kiler129
Copy link
Contributor

Currently the dump command has a hardcoded public directory as a default target:

->addArgument(
'target',
InputArgument::OPTIONAL,
'Location where to dump sitemaps. Generated urls will not be related to this folder.',
version_compare(Kernel::VERSION, '4.0') >= 0 ? 'public' : 'web'
);

Maybe it will be possible to expose this as a setting? It generally doesn't change per-run and it's static on the application level.

@yann-eugone
Copy link
Member

OK, the standard is hardcoded, but this is a default value.

I believe that your problem is that you are do not want to dump your sitemap to that directory, but you don't want to write that directory every time.

Maybe we can introduce a config entry to specify that default value.

What do you think ?

@yann-eugone yann-eugone added the DX label Apr 11, 2019
@kiler129
Copy link
Contributor Author

@yann-eugone Exactly my point to get this value from the config with the default being the same as of now - I'm sorry if I wasn't clear :)

I want to improve DX in multiple applications where each one of them defines its sitemap destination (since for example robots.txt needs to know about it too, web server has a punch-hole for the folder with sitemap, WAF is not triggered for such requests etc) without sysadmin caring about configuring crontab to point to a directory.

@yann-eugone yann-eugone self-assigned this Apr 11, 2019
kiler129 added a commit to kiler129/PrestaSitemapBundle that referenced this issue Apr 15, 2019
@kiler129
Copy link
Contributor Author

Thank you, it works amazingly :)

@yann-eugone
Copy link
Member

Released in 1.7.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants