Will TemplateData be used to document Lua? Can VisualEditor use TemplateData to give hints for module invocation?
Topic on Help talk:TemplateData
Good idea!!!!!!
Are you meant to be invoking a module directly?
Good point, thanks! There's already a /doc subpage (e.g. [1]) for the module itself, and that's all we need.
It's the functions within a module which can be invoked from wikitext, these take parameters, and this is where we would need the structured documentation. I'm not sure how we could provide these docs (or maybe editors feel this is not lacking?). LDoc and maybe other syntaxes would be appropriate for inlining docs in the source code, but wouldn't cover our use case. We pass an opaque frame
and it's the args
arguments within that define the module's MediaWiki interface. We also need a way to indicate which functions are meant to be public.
Needless to say, however we (if we) decide on a syntax, it should be machine-parsable so it can be leveraged by VisualEditor and other tools.