Page MenuHomePhabricator

Support content delivery from static sources (files) into MediaWiki content for extensions
Open, Needs TriagePublic

Description

Some extensions are dependent on in-wiki content (e.g. templates, semantic forms, etc.). Such extensions now rely on users importing or creating this content manually in the wiki.

An idea, discussed at SMWCon Fall 2017, is to have a mechanism to directly serve the content of static sources (i.e. files) bundled with an extension.

Some benefits of this approach would be:

  • installing an extension automatically makes available the required wiki pages
  • when the extension is under revision control (e.g. in git), the wikicontents are under the same revision control
  • this approach would also allow extension developers to produce extension documentation that could be directly viewed from within the wiki (and is always up to date with the actually installed extension version)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 5 2017, 2:11 PM

This sounds similar to what I am doing with my projects, except I'm doing it manually. I put the required pages into files and import them to the wiki. Examples:

It would be nice indeed if I didn't need to run that script every time.

MarkAHershberger mentioned this in Unknown Object (Event).Oct 12 2017, 2:06 PM

We'll be talking about possible approaches to this in a MediaWiki-Stakeholders-Group meeting this Friday: E582. We'd love to get your input.

An idea, discussed at SMWCon Fall 2017, is to have a mechanism to directly serve the content of static sources (i.e. files) bundled with an extension.

Just so this doesn't get unnoticed, SMW does import static content [0] (since 2.5) during the install.

[0] https://github.com/SemanticMediaWiki/SemanticMediaWiki/tree/master/src/Importer

Waanders added a comment.EditedOct 13 2017, 12:13 PM

We have a slightly different but related issue. We are looking for a mechanism to synchronize templates and forms between wiki's in a wikifarm. So newer version of template A from wiki 1 to wiki 2, newer version of template B from wiki 2 to wiki 1 and so on. Using Git as a central repository. The solution Lex showed at SMWConv Fall in Rotterdam comes close to the need we have (development of forms and templates takes place in different wikis of the farm).

Lex added a comment.Oct 18 2017, 8:25 AM

@Waanders: at https://smw-cindykate.com/main/Component_759410#What_can_be_used_how_in_a_facets-management-script.rb.3F you can see my current implementation of the envisaged https://www.mediawiki.org/wiki/StructuredDataManagementSuite which I will use tomorrow for the first time in a customer context.

Tgr added a subscriber: Tgr.Dec 3 2017, 6:04 AM

Somewhat different usecase, but MediaWiki-Vagrant imports documentation from puppet templates. See mediawiki::import::text.

I'm planning to write something more integrated for git-hosted gadgets (T71445: Implement a sane code-review process for MediaWiki JS/CSS pages on Wikimedia sites) which would probably have some interface for admins to links wiki pages to git files, and then it would update the page automatically when the file changes in git.