Page MenuHomePhabricator

Supported wikitext should be documented
Open, Needs TriagePublic

Description

Meta:Programs & Events Dashboard/Using the Dashboard#Slides says:

You can use basic wikitext formatting. For images and quizzes, special templates are required.

However, this diff lets think internal links (or interwiki prefixes in wikilinks) are not supported.

I think the full wikitext syntax should be supported because MetaWiki is not a database, it is actually a possible endpoint for readers and editors. Dashboard could get HTML directly from REST API, or parse wikitext with a better parser (several ones probably already exist).

If the current limited wikitext parser is needed and can’t be improved, supported wikitext should be documented and a way to warn MetaWiki’s editors should be found (through an edit notice, probably).

Event Timeline

Thanks for these explanations! I am wondering about Translate extension wikitext (<translate> and <tvar|name> tags), are they well supported (ignored)?

Without wikilinks and templates, wikitext is pretty limited. What about directly get HTML (eventually converting HTML to Markdown with Pandoc, if you prefer to store Markdown)?

As a smaller fix for internal links, a Pandoc filter is possible:

function Link(el)
    if el.title == 'wikilink' then
      el.target = "https://meta.wikimedia.org/wiki/" .. el.target
      el.title = ''
    end
    return el
end

My goal with the current approach was to make it possible to recreate all the kinds of slide content the Wiki Education Dashboard uses, but have it be editable and translateable on Meta. On the Dashboard, a slide record has separate fields for title, content, and quiz, and the quiz field is has a specific structure of question, answers, and explanations. Using the HTML from a Meta page might work for basic slides, but it would be more difficult to also include quizzes.

The translate and tvar tags are ignored. If you want to poke into how the Dashboard parses the wikitext of one of these pages, here's the code: https://github.com/WikiEducationFoundation/WikiEduDashboard/blob/master/lib/training/wiki_slide_parser.rb