From a56b1e51b84649f6c8c8959bc4dcef33f576e2d1 Mon Sep 17 00:00:00 2001 From: Serreau Jovann Date: Tue, 20 Jan 2026 18:38:20 +0100 Subject: [PATCH] =?UTF-8?q?```=20=E2=9C=A8=20feat(sitemap):=20Ajoute=20une?= =?UTF-8?q?=20commande=20pour=20g=C3=A9n=C3=A9rer=20les=20sitemaps=20et=20?= =?UTF-8?q?modifie=20l'appel=20dans=20ansible.=20```?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ansible/playbook.yml | 2 +- config/routes.yaml | 6 +++++- src/Command/SitemapCommand.php | 32 ++++++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 src/Command/SitemapCommand.php diff --git a/ansible/playbook.yml b/ansible/playbook.yml index 4216b89..def07cd 100644 --- a/ansible/playbook.yml +++ b/ansible/playbook.yml @@ -216,7 +216,7 @@ args: chdir: "{{ path }}" - name: Exécuter pwa:compile dans le répertoire de l application - ansible.builtin.command: php bin/console presta:sitemaps:dump + ansible.builtin.command: php bin/console app:sitemap become: false args: chdir: "{{ path }}" diff --git a/config/routes.yaml b/config/routes.yaml index db1dd29..e2b65ba 100644 --- a/config/routes.yaml +++ b/config/routes.yaml @@ -6,7 +6,11 @@ controllers: type: attribute - +PrestaSitemapBundle_section: + path: "/seo/%presta_sitemap.sitemap_file_prefix%.{name}.{_format}" + defaults: { _controller: Presta\SitemapBundle\Controller\SitemapController::sectionAction } + requirements: + _format: xml 2fa_login: path: /2fa diff --git a/src/Command/SitemapCommand.php b/src/Command/SitemapCommand.php new file mode 100644 index 0000000..01032a2 --- /dev/null +++ b/src/Command/SitemapCommand.php @@ -0,0 +1,32 @@ +dumper->dump($this->kernel->getProjectDir()."/public/seo",$_ENV['DEFAULT_URI']."/seo","",[]); + return Command::SUCCESS; + } +}