Skip to content

Latest commit

 

History

History
30 lines (19 loc) · 1022 Bytes

sitemap.md

File metadata and controls

30 lines (19 loc) · 1022 Bytes

Sitemap

Phpillip automatically generates an XML sitemap of your website. The sitemap contains every URL called by the build command.

Set last modified

When registering a url in the sitemap, the build command looks for a Last-Modified header in the Response, if it exists it will be used as <lastmod> tag for this entry in the sitemap.

So if you want to set a last modified tag for a custom controller, just set the Last-Modified header in your response.

Tip: If your routes are declared as content routes, Phpillip automatically set that header based on last change of your content files.

Hide a route from sitemap

By default, all routes are registered in the sitemap. To hide a route from the sitemap, use the method hideFromSitemap;

$app->get('blog/feed.rss')->hideFromSitemap();

Disable Sitemap

To disable the sitemap feature completely, set it to false in the configuration:

# src/Resources/config/config.yml
sitemap: false