Sitemap

Provide automatically generated XML sitemap.

Sergey Romanenko


Installation

  1. Download & Install all required dependencies.
  2. Create new folder /project/plugins/sitemap
  3. Download Sitemap Plugin and unzip plugin content to the folder /project/plugins/sitemap

Settings

Key Value Description
enabled true true or false to disable the plugin
priority 100 sitemap plugin priority
route sitemap.xml sitemap route
ignore [] List of entries to ignore
additions [] List of additions to add
default.changefreq daily How frequently the page is likely to change. This value provides general information to search engines and may not correlate exactly to how often they crawl the page. Valid values are: always, hourly, daily, weekly, monthly, yearly, never. More info in
default.priority 1 The priority of this URL relative to other URLs on your site. Valid values range from 0.0 to 1.0. This value does not affect how your pages are compared to pages on other sites—it only lets the search engines know which pages you deem most important for the crawlers. The default priority of a page is 1.
date_format Y-m-d Date format

Ignore entry(entries)

You can ignore your specific entries by providing a list of slug's to ignore.

ignore:
  - blog/blog-post-to-ignore
  - ignore-this-entry

You can also use a entry Frontmatter to signal that the sitemap should ignore it:

sitemap:
  ignore: true

Set default values for entry(entries)

sitemap:
  changefreq: weekly
  priority: 0.8

Manually add entry(entries) to the sitemap

additions:
  -
    loc: something-special
    lastmod: '2020-04-16'
    changefreq: hourly
    priority: 0.3

Dynamically adding entry(entries) to the sitemap

flextype('emitter')->addListener('onSitemapAfterInitialized', function() {
    Flextype\Plugin\Sitemap\Controllers\SitemapController::$sitemap[] = ['loc' => 'something-special-to-add',
                                               'lastmod' => '03-07-2020 09:46',
                                               'changefreq' => 'daily',
                                               'priority' => 1.0];
});

Version

3.1.0

Lincense

MIT

Dependencies

flextype: ^1.0.0-alpha.2
twig: ^3.1.0

Categories

seo