Page MenuHomePhabricator

Create some simpler default templates for use with citoid
Open, Stalled, Needs TriagePublic

Description

Currently the documentation does not contain instructions for what to do if a wiki does not have templates. It does suggest en wiki documentation pages to go along with en wiki templates. However these are complex templates with many dependencies, and they may be hard for small wikis to import, understand (they use Lua) and maintain as they may lack the correct permissions to import rights. Many small wikis will try to copy paste these templates instead of importing them, and this results in broken templates because of missing dependencies.

We should in the documentation include a minimally viable config and template (+ TemplateData) for small wikis that they can copy paste, and don't require import rights.

Draft minimal config which uses the en wiki Citation template: https://www.mediawiki.org/wiki/Citoid/Minimal_config

Event Timeline

T384709 would be good to do first as well to simplify it.

Having dived into this a bit, I am questioning the premise that having a non Lua template is "simpler", just because actually the templating language leaves a lot to be desired.

Both require an additional extention: the ParserFunctions extension if using the templating language, and if we were to do this in Lua, the Scribunto extension. But it's not really possible to write a functional template without either ParserFunctions or Lua. And IMO Lua is more human readable. (cc: @DLynch).

The main way it is more complex is then it does require two pages, the Template: and the Module: page, whereas it's more obvious where the code for the template lives when it's actually on the Template: page. So that is a clear example. But when it comes to users modifying the template for their own use, Lua might actually be more user friendly?

I guess the main argument for it being less-friendly is that it does require a hypothetical completely-non-technical user to learn a new thing. We can assume that to do wiki admin stuff you're going to have to learn wikitext, but you could quite reasonably do everything on a wiki without ever needing to learn anything about Lua.

Personally, I think Lua is super-easy to learn, and is certainly more user-friendly than writing conditionals in wikitext, but that might be me feldspar-and-quartzing the situation.

In discussion with other folks it was brought up that many non-english wikis will copy paste templates directly from en wiki, which means that a requirement of such a template might also include that it is compatible with en wiki, which I think is a really good point.

That is possible, but it does make it harder!

Mvolz changed the task status from Open to Stalled.Tue, Nov 25, 11:27 AM
Mvolz updated the task description. (Show Details)
Mvolz updated the task description. (Show Details)