Skip to content

StarCitizenTools/wiki-tools

Repository files navigation

wiki-tools

Wiki pages, modules, and automation for Star Citizen Wiki.

Repository layout

Path Contents
pages/ 1:1 mirror of the wiki, organized by namespace. See AGENTS.md for the path-to-title rules.
types/mw/ LuaCATS stubs for the Scribunto mw API, mirrored from upstream REL1_43.
.agents/skills/ Agent skills that automate wiki workflows — deploy, sync, doc conversion.
AGENTS.md Architecture patterns, code conventions, and Scribunto gotchas. Start here if you're contributing modules.

Pages

Each module's subpages and styles live alongside the entry point listed below.

Entity system

Renders item and vehicle pages. Type modules link via p.parent (e.g., Food → Item → Base); Module:Entity walks the chain to render the infobox and emit page metadata.

Page Description
Module:Entity Chain root — infobox plus structured data (SMW, SHORTDESC, categories).
Module:Entity/Availability Where-to-buy availability block.
Module:Entity/Description Long-form description block.
Module:Entity/Related Related items and set-piece cards.
Module:Entity/Ports Item ports and hardpoints.
Module:Entity/Item Item type — Drink, Food, WeaponPersonal variants.
Module:Entity/Blueprints Blueprint aspects and dismantle returns.
Template:Entity Wikitext wrappers, one per renderer.

Layout & rendering

Reusable building blocks for modules and wikitext.

Page Description
Module:InfoboxLua Data-driven infobox: collapsible sections, tabs, multi-column layouts.
Module:CollapsibleCard Card with a summary line and an expandable body. Falls back to static when no body is given.
Module:TableLua Codex-style sortable table — pass props, get rendered HTML.
Module:Details Wrapper for <details>/<summary> that survives the sanitizer.
Module:BadgeLua Inline pill-shaped label with semantic variants (error/success/warning) and an icon slot.
Template:Badge Wikitext wrapper around Module:BadgeLua. Accepts {{Badge|text|bg=…|color=…|variant=…}}.

Data & utilities

Page Description
Module:Manufacturers Manufacturer registry — resolves a code or name to a canonical record.

Testing

Page Description
Module:ScribuntoUnit Unit testing framework. Tests run on the wiki and surface results on the module's doc page.

Development

Install mise, then:

mise install        # Install stylua, gale-lint, lefthook
lefthook install    # Register pre-commit hooks
mise run lint       # Check formatting
mise run fix        # Auto-fix formatting

Pre-commit hooks (see lefthook.yml) run the same checks as mise run lint, so git commit blocks on style violations.

For everything else — code conventions, the mw.html allowlist, browser testing on a sandbox wiki — see AGENTS.md.

Agent skills

Project skills under .agents/skills/. Describe the task in plain English; your agent picks the matching skill.

Skill Use it for
deploy-to-wiki Push a local module or template to the wiki, including its /doc page.
sync-from-wiki Pull recent upstream wiki edits into the local mirror — the inverse of deploy.
doc-page-from-readme Convert a README.md to the wikitext used for /doc subpages. Called by deploy-to-wiki.
templatedata-from-readme Convert a Markdown Parameters table to a <templatedata> block. Called by deploy-to-wiki for templates.
sync-codex-icons Reconcile Category:Codex icons on the wiki against the upstream wikimedia/design-codex repo.

About

Wiki pages, modules, and automation for Star Citizen Wiki (https://starcitizen.tools)

Resources

License

Stars

Watchers

Forks

Contributors