Setup sitemap

This commit is contained in:
Jannis Portmann 2022-01-19 16:21:10 +01:00
parent 46b5d4c107
commit 50e0245d4e
9 changed files with 82 additions and 7 deletions

View file

@ -14,6 +14,7 @@
"easycorp/easyadmin-bundle": "^3",
"imagine/imagine": "^1.2",
"mjaschen/phpgeo": "^3.2",
"presta/sitemap-bundle": "^3.2",
"samayo/bulletproof": "4.0.1",
"sensio/framework-extra-bundle": "^6.1",
"symfony/asset": "5.4.*",

70
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "ec2a4f1eba6f8f15d154da64a0495d08",
"content-hash": "0cf6e60682a00711078e84db847b1f3b",
"packages": [
{
"name": "composer/package-versions-deprecated",
@ -2037,6 +2037,74 @@
},
"time": "2021-11-30T19:35:32+00:00"
},
{
"name": "presta/sitemap-bundle",
"version": "v3.2.1",
"source": {
"type": "git",
"url": "https://github.com/prestaconcept/PrestaSitemapBundle.git",
"reference": "341ad68ef7d1b0dad183fa68ecb8275d89fa1e9b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/prestaconcept/PrestaSitemapBundle/zipball/341ad68ef7d1b0dad183fa68ecb8275d89fa1e9b",
"reference": "341ad68ef7d1b0dad183fa68ecb8275d89fa1e9b",
"shasum": ""
},
"require": {
"ext-simplexml": "*",
"php": ">=7.1.3",
"symfony/console": "^4.4|^5.0|^6.0",
"symfony/framework-bundle": "^4.4|^5.0|^6.0"
},
"require-dev": {
"doctrine/annotations": "^1.0",
"phpstan/phpstan": "^0.12.82",
"phpunit/phpunit": "^7.5|^8.0",
"sensio/framework-extra-bundle": "^5.5|^6.1",
"squizlabs/php_codesniffer": "^3.5",
"symfony/browser-kit": "^4.4|^5.0|^6.0",
"symfony/messenger": "^4.4|^5.0|^6.0",
"symfony/phpunit-bridge": "^4.4|^5.0|^6.0",
"symfony/yaml": "^4.4|^5.0|^6.0"
},
"type": "symfony-bundle",
"extra": {
"branch-alias": {
"3.x": "3.x-dev",
"2.x": "2.x-dev",
"1.x": "1.x-dev"
}
},
"autoload": {
"psr-4": {
"Presta\\SitemapBundle\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Prestaconcept",
"homepage": "http://www.prestaconcept.net/"
}
],
"description": "A Symfony bundle that provides tools to build your application sitemap.",
"keywords": [
"Sitemap",
"bundle",
"prestaconcept",
"symfony",
"xml"
],
"support": {
"issues": "https://github.com/prestaconcept/PrestaSitemapBundle/issues",
"source": "https://github.com/prestaconcept/PrestaSitemapBundle/tree/v3.2.1"
},
"time": "2021-12-16T08:09:53+00:00"
},
{
"name": "psr/cache",
"version": "2.0.0",

View file

@ -16,4 +16,5 @@ return [
Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true],
Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true],
SymfonyCasts\Bundle\ResetPassword\SymfonyCastsResetPasswordBundle::class => ['all' => true],
Presta\SitemapBundle\PrestaSitemapBundle::class => ['all' => true],
];

View file

@ -0,0 +1,2 @@
presta_sitemap:
resource: "@PrestaSitemapBundle/config/routing.yml"

View file

@ -10,19 +10,19 @@ use Twig\Environment;
class AppController extends AbstractController
{
#[Route('/', name: 'homepage')]
#[Route('/', name: 'homepage', options: ["sitemap" => true])]
public function index(): Response
{
return $this->render('app/index.html.twig');
}
#[Route('/imprint', name: 'imprint')]
#[Route('/imprint', name: 'imprint', options: ["sitemap" => true])]
public function imprint(): Response
{
return $this->render('app/imprint.html.twig');
}
#[Route('/faq', name: 'faq')]
#[Route('/faq', name: 'faq', options: ["sitemap" => true])]
public function faq(): Response
{
return $this->render('app/faq.html.twig');

View file

@ -32,7 +32,7 @@ class OfferController extends AbstractController
$this->photoresizer = $photoresizer;
}
#[Route('/offers', name: 'offers')]
#[Route('/offers', name: 'offers', options: ["sitemap" => true])]
public function showAll(Environment $twig, Request $request, OfferingRepository $offerRepository, PlzToCoordinate $plzconverter, DistanceCalculator $distanceCalculator): Response
{
$form = $this->createForm(OfferFilterFormType::class);

View file

@ -26,7 +26,7 @@ class RegistrationController extends AbstractController
$this->emailVerifier = $emailVerifier;
}
#[Route('/register', name: 'app_register')]
#[Route('/register', name: 'app_register', options: ["sitemap" => true])]
public function register(Request $request, UserPasswordHasherInterface $passwordEncoder, CaptchaVerifier $captchaVerifier): Response
{
$user = new User();

View file

@ -10,7 +10,7 @@ use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
class SecurityController extends AbstractController
{
/**
* @Route("/login", name="app_login")
* @Route("/login", name="app_login", options={"sitemap"=true})
*/
public function login(AuthenticationUtils $authenticationUtils): Response
{

View file

@ -118,6 +118,9 @@
"nikic/php-parser": {
"version": "v4.10.4"
},
"presta/sitemap-bundle": {
"version": "v3.2.1"
},
"psr/cache": {
"version": "2.0.0"
},