Skip to content

Plugin: UpdateCategoryTree

Dario Giovannetti edited this page Dec 19, 2017 · 5 revisions

This plugin recurses the category tree under a given root category, then writes a Table of Contents in a specific page defined in the plugin's configuration, between two HTML comment marks:

<!--START AUTO TOC - DO NOT REMOVE OR MODIFY THIS MARK--> and <!--END AUTO TOC - DO NOT REMOVE OR MODIFY THIS MARK-->.

You cannot update a Table of Contents whose most recent revision is less than 24 hours for normal users and 60 seconds for authorized bots.

Interface

You can choose the Table of Contents you want to update from the select menu.

Configuration options and default values

  • enabled: false
  • special_menu: ["Update category trees"]
  • edit_summary: "automatic update" The edit summary that will be submitted when saving the page.
  • show_root_also_in: false A boolean value that defines whether the "also in" links are shown for the root category.
  • pages: [] An array of plain objects whose keys are language tags and whose values are plain objects with these keys:
    • page: the title of the language's category-tree page.
    • root: the title of the associated root category.
    • alsoIn: the translation of "also in" for the language.
    • indentType: the character to be used for indenting the entries; usually one of "*", "#" or ":".
    • replace: an array for replacing the alternative text of category links; its values are the pattern of the regular expression, the flags of the regular expression and the new string.
    • keepAltName: boolean, if there is already a link to a particular category, preserve its alternative name.
    • showIndices: boolean, use hardcoded indices and sub-indices.
    • rightToLeft: boolean, adapt for right-to-left scripts.

On ArchWiki:

  • pages: ["ar", "cs", "cs", "da", "el", "en", "es", "he", "hr", "hu", "id", "it", "ko", "lt", "nl", "pl", "pt", "ru", "sk", "sr", "th", "tr", "uk", "zh-hans", "zh-hant"] Using a language-tag string as an item, the plugin will use ArchWiki's default configuration for the corresponding language's category tree page.