Wikidata:How to create Wikidata Tours/Publish

Publish to wikidata.org edit

Once you've completed any required changes and thoroughly tested the tour, it's time to deploy it to main wikidata.org by copying over the tour files from test.wikidata.org. The tour files should be up to date with any required changes made after the testing stage. The filenames and locations used on test.wikidata.org should ideally match the intended location on Wikidata, so that you can simply change the base of the url from your test versions from https://test.wikidata.org to https://www.wikidata.org to create the new files.

Follow the steps below to arrange the tour files in the required locations (replace TOUR NAME with the name of the tour you are deploying).

1. Tour Wiki Page edit

The Tour Wiki page should already be published after completion of the Write step. It will be located at https://www.wikidata.org/wiki/Tours:TOUR NAME.

If any changes have been made to the Wiki Page during the Test step, copy over the test.wikidata.org changes to the existing Tour Wiki page on www.wikidata.org. If no changes have been made during testing, you do not need to copy anything over.

2. Tour JavaScript File edit

Copy your test.wikidata.org JavaScript file to https://www.wikidata.org/wiki/MediaWiki:Guidedtour-tour-wbTOUR NAME.

User namespace
(JavaScript step)
MediaWiki namespace test.wikidata.org
(Test step)
MediaWiki namespace www.wikidata.org
(Current step)

Before publishing the JavaScript file, you will need to:

  • Swap all properties and items with the original values saved as end of line comments in the Test step.
  • As above, but for the "tourEntityId" setting. Swap the test.wikidata.org Tour Item with the main wikidata.org Tour item from the end of line comment.

The test.wikidata.org equivalent properties, values and tour item should now be stored in the end of line comments (in case the tour ever needs to be moved back to test.wikidata.org for further development).

3. Tour Wikidata item edit

The Tour item should have already been created in the Tour item step, so all you need to do is make sure that its Q number is set as the "tourEntityId" in the JavaScript file, as explained just above. If this has been missed for any reason, go back to the Tour item step now and follow the instructions to create a new item.


Important: Once the tour has been deployed to main Wikidata, you must test it thoroughly again. There can be significant differences between test.wikidata.org and wikidata.org because of the different templates available, as well as occasional changes to the User Interface being trialled on test.wikidata.org.

Add your new tour to Wikidata:Tours edit

Once you've created your tour and are happy that it is free of errors and the instructions are clear please add it to the main page of Wikidata:Tours in the relevant section.

You should copy the syntax used for existing tours on the page by including:

  • Title: This should match the name of your tour.
  • Description: A short description to be displayed under the title.

The button for launching the tour is generated using a template. For example, this button to launch the "Items" tour is generated using this wiki text:

{{StartTour|itemid=Q16943273|tourname=wbitems|tourpage=Wikidata:Tours/Items}}

Link to the tour edit

Once the tour has been published and added to Wikidata:Tours you can also add it to other pages on Wikidata including any relevant Help pages.

You create a link to the tour using the tour Wikidata item and the name of the tour. For example, the "Items" tour can be launched using the URL https://www.wikidata.org/w/index.php?title=Q16943273&tour=wbitems. Alternatively, you can generate a button using the "StartTour" template as described just above.