Jump to content
šŸ—³ļøšŸ–„ļø The Wikimedia Foundation December 2024 Developer Satisfaction Survey closes on the 2025-01-03. This survey helps us measure developer satisfaction, and prioritize work on tools and platforms for our technical contributors.

Module:Uses TemplateStyles/config

From wikiNonStop
Revision as of 06:53, 27 December 2024 by Majestix (talk | contribs) (1 revision imported: Initial )
(diff) ā† Older revision | Latest revision (diff) | Newer revision ā†’ (diff)
Module documentation
local cfg = {} -- Donā€™t touch this line.

-- Subpage blacklist: these subpages will not be categorized (except for the
-- error category, which is always added if there is an error).
-- For example ā€œTemplate:Foo/docā€ matches the `doc = true` rule, so it will have
-- no categories. ā€œTemplate:Fooā€ and ā€œTemplate:Foo/documentationā€ match no rules,
-- so they *will* have categories. All rules should be in the
--   ['<subpage name>'] = true,
-- format.
cfg['subpage_blacklist'] = {
	['doc'] = true,
	['sandbox'] = true,
	['sandbox2'] = true,
	['testcases'] = true,
}

-- Sandbox title: if the stylesheetā€™s title is <template>/<stylesheet>.css, the
-- stylesheetā€™s sandbox is expected to be at <template>/<sandbox_title>/<stylesheet>.css
-- Set to nil to disable sandbox links.
cfg['sandbox_title'] = 'sandbox'

-- Error category: this category is added if the module call contains errors
-- (e.g. no stylesheet listed). A category name without namespace, or nil
-- to disable categorization (not recommended).
cfg['error_category'] = nil

-- Default category: this category is added if no custom category is specified
-- in module/template call. A category name without namespace, or nil
-- to disable categorization.
cfg['default_category'] = 'Templates using TemplateStyles'
	.. mw.getCurrentFrame():callParserFunction("#translation:")

-- Protection conflict category: this category is added if the protection level
-- of any stylesheet differs from the one of the template. A category name
-- without namespace, or nil to disable categorization (not recommended).
cfg['protection_conflict_category'] = nil

-- Padlock pattern: Lua pattern to search on protected stylesheets for, or nil
-- to disable padlock check.
cfg['padlock_pattern'] = nil

-- Missing padlock category: this category is added if a protected stylesheet
-- doesnā€™t contain any padlock template (specified by the above Lua pattern).
-- A category name without namespace (no nil allowed) if the pattern is not nil,
-- unused (and thus may be nil) otherwise.
cfg['missing_padlock_category'] = nil

return cfg -- Donā€™t touch this line.