canasta sitemap generate

From Canasta Wiki

canasta > sitemap > generate

canasta sitemap generate

Generate sitemaps for one or all wikis

Synopsis

Generate XML sitemaps for wikis in a Canasta instance. If --wiki is specified, generates a sitemap for that wiki only. Otherwise, generates sitemaps for all wikis in the instance. Once generated, the background generator will automatically refresh them.

The sitemaps are published at MW_SITEMAP_URL_PATH (default /public_assets/sitemap), relative to each wiki's URL. A wiki's sitemap path cannot contain another wiki's URL on the same host, or lie inside one other than a URL its own wiki's URL lies within. A path under the article path, such as /wiki/sitemap, is served from the sitemap files, so a page whose title starts with sitemap/ is reachable only by its capitalized title (Sitemap/...), and not at all on a wiki with $wgCapitalLinks = false.

A wiki's sitemap files are named after its identifier, which defaults to the wiki ID: the index is sitemap-index-<identifier>.xml. --identifier stores a different one for the --wiki wiki in wikis.yaml (its sitemap_identifier), so that an existing index URL can be kept; the files of its previous identifier are removed. Passing the wiki ID as the identifier restores the default.

canasta sitemap generate [flags]

Examples

canasta sitemap generate
canasta sitemap generate -w mywiki
canasta sitemap generate -w mywiki --identifier mediawiki

Flags

Flag Shorthand Description Default Required Orchestrator
--id -i Canasta instance ID * Both
--identifier Name the --wiki wiki's sitemap files after this identifier (letters, digits, '_', '-' and '.', starting with a letter or digit) from now on Both
--wiki -w Wiki ID (omit to generate for all wikis) Both

* Defaults to the Canasta instance matching the current directory, if any.

Global flags

Flag Shorthand Description Default Required Orchestrator
--help -h Show help message and exit Both
--verbose -v Enable verbose output Both