Skip to content

Commit

Permalink
Merge pull request #673 from eerison/fix-robots_link
Browse files Browse the repository at this point in the history
Fix robots link
  • Loading branch information
eerison authored Aug 6, 2022
2 parents b185911 + b9fb5c3 commit d2c1cc5
Show file tree
Hide file tree
Showing 6 changed files with 155 additions and 267 deletions.
9 changes: 9 additions & 0 deletions src/Controller/SiteController.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@ public function privacyPolicy(): Response
return $this->render('site/private_policy.html.twig');
}

#[Route(path: '/robots.txt', name: 'robots')]
public function robots(): Response
{
$response = $this->render('site/robots.txt.twig');
$response->headers->set('Content-Type', 'text/plain');

return $response;
}

#[Route(path: '/{_locale}', name: 'homepage', defaults: ['_locale' => 'pt_BR'])]
#[Route(path: '/login/{_locale}', name: 'login')]
public function homepage(UserRepository $userRepository): Response
Expand Down
55 changes: 0 additions & 55 deletions templates/security/base.html.twig

This file was deleted.

74 changes: 0 additions & 74 deletions templates/security/login.html.twig

This file was deleted.

File renamed without changes.
2 changes: 2 additions & 0 deletions tests/Functional/SmokeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
'Static sitemap (Portuguese)' => ['/sitemap.static_pt_BR.xml'],
'Profile sitemap (English)' => ['/sitemap.profile_en.xml'],
'Profile sitemap (Portuguese)' => ['/sitemap.profile_pt_BR.xml'],

'Robots txt' => ['/robots.txt'],
]);

it('is redirecting', function (string $url, string $redirectTo) {
Expand Down
Loading

0 comments on commit d2c1cc5

Please sign in to comment.