Console commands
The extension provides the following console commands:
sitemap-locator:locate
A command to locate XML sitemaps of a given site and optional site language.
vendor/bin/typo3 sitemap-locator:locate <site> [<options>]
typo3/sysext/core/bin/typo3 sitemap-locator:locate <site> [<options>]
The following command options are available:
site
-
- Type
- integer (root page ID) or string (site identifier)
- Required
- true
- Default
- none
- Multiple allowed
- false
Use this mandatory command argument to pass a site identifier or root page ID of the site for which to locate XML sitemaps.
Example:
vendor/bin/typo3 sitemap-locator:locate 47 vendor/bin/typo3 sitemap-locator:locate main
Copied!typo3/sysext/core/bin/typo3 sitemap-locator:locate 47 typo3/sysext/core/bin/typo3 sitemap-locator:locate main
Copied!
-l|--language
-
- Type
- integer
- Required
- false
- Default
- none (= default language)
- Multiple allowed
- false
You can explicitly define a site language for which to locate an XML sitemap. If omitted, the XML sitemap of the default site language is located. This option is mutually exclusive with the
--
option.all Example:
vendor/bin/typo3 sitemap-locator:locate --language 1
Copied!typo3/sysext/core/bin/typo3 sitemap-locator:locate --language 1
Copied!
-a|--all
-
- Type
- boolean
- Required
- false
- Default
- false
- Multiple allowed
- false
Use this option to locate XML sitemaps of all available site languages of the given site. This option is mutually exclusive with the
--
option.language Example:
vendor/bin/typo3 sitemap-locator:locate --all
Copied!typo3/sysext/core/bin/typo3 sitemap-locator:locate --all
Copied!
--validate
-
- Type
- boolean
- Required
- false
- Default
- false
- Multiple allowed
- false
Validate if located XML sitemaps actually exist and are properly accessible By passing this option, the located sitemaps are additionally validated for existence. If at least one XML sitemap does not exist, the command fails with exit code
0
.Example:
vendor/bin/typo3 sitemap-locator:locate --validate
Copied!typo3/sysext/core/bin/typo3 sitemap-locator:locate --validate
Copied!
-j|--json
-
- Type
- boolean
- Required
- false
- Default
- false
- Multiple allowed
- false
Located XML sitemaps are displayed as list by default. By using this option, you can switch to JSON output instead. This may come in handy when using the command to automate processes which require easy parsable result data.
Example:
vendor/bin/typo3 sitemap-locator:locate --json
Copied!typo3/sysext/core/bin/typo3 sitemap-locator:locate --json
Copied!