Skip to content

LeonB/Sitemap

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sitemap

This extension will automatically create XML sitemaps for your Bolt sites. After enabling the extension, go to http://example.org/sitemap.xml to see it.

The bigger search-engines like Google and Bing will automatically pick up your sitemap after a while, but it's always a good idea to explicitly tell the search engines where to find it. To do so, add the following line to your robots.txt file:

Sitemap: http://example.org/sitemap.xml

and to the <head> section of your pages:

<link rel="sitemap" type="application/xml" title="Sitemap" href="/sitemap.xml" />

Obviously, you should replace 'example.org' with the domain name of your website.

If you use the pagebinding in routing.yml (or anything similar like /{slug} ), you need to add the following above that route:

sitemapxml:
  path: /sitemap.xml
  defaults: { _controller: 'Bolt\Extension\Bolt\Sitemap\Extension::sitemapXml' }


sitemap:
  path: /sitemap
  defaults: { _controller: 'Bolt\Extension\Bolt\Sitemap\Extension::sitemap' }

About

[Bolt Extension] An extension to create XML sitemaps for your Bolt website.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • PHP 74.0%
  • HTML 26.0%