Jump to content

Wikivoyage:Wiki markup

From Wikivoyage
(Redirected from Link title)

Wikivoyage uses a special code called Wiki markup for formatting the text and images in an article. The Wiki markup used while editing a page will determine how the text looks and what links and images are in the page.

When editing Wikivoyage articles, try to follow the conventions in the Manual of style. These are guidelines for making a "good" Wikivoyage article; if you don't quite get all of them, then just do what you can, and someone else will come through and clean up your work after you're done.

Text formatting

To get this output... ...use this markup.

Bold text is surrounded by three apostrophes.

'''Bold text''' is surrounded by three apostrophes.

Italic text is surrounded by two apostrophes.

''Italic text'' is surrounded by two apostrophes.

For a bullet-point list, put each list item on its own line, with a star in front of it:

  • Winken
  • Blinken
  • Nod

For a bullet-point list, put each list item on its own line, with a star in front of it:

*Winken
*Blinken
*Nod

A numbered list is similar to a bullet-point list, but each item starts with a hash symbol instead:

  1. Tinker
  2. Evers
  3. Chance

A numbered list is similar to a bullet-point list, but each item starts with a hash symbol sign instead:

#Tinker
#Evers
#Chance

See also: Wikivoyage:Internal links, Wikivoyage:External links
To get this output... ...use this markup.

You can link to an article like Main Page by adding the article title with two square brackets around it.

You can link to an article like [[Main Page]] by adding the article title with two square brackets around it.

You can give the link alternate text, like go to the main page, by adding a vertical bar after the title, and then the text you want to use.

You can give the link alternate text, like [[Main Page|go to the main page]], by adding a vertical bar after the title, and then the text you want to use.

Links in different namespaces, like Wikivoyage:FAQ or User:EvanProdromou, work the same way.

Links in different namespaces, like [[Wikivoyage:FAQ]] or [[User:EvanProdromou]], work the same way.

Using a vertical bar at the end of the link (but before the closing brackets) will hide the namespace, like FAQ or EvanProdromou.

Using a vertical bar at the end of the link (but before the closing brackets) will hide the namespace, like [[Project:FAQ|]] or [[User:EvanProdromou|]].

It's OK to put in links to a page that doesn't exist yet.

It's OK to put in links to [[a page that doesn't exist yet]].

Putting a URL like http://www.google.com/ into text makes it into a clickable external hyperlink automatically.

Putting a URL like http://www.google.com/ into text makes it into a clickable external hyperlink automatically.

You can give an external hyperlink more readable and helpful text like Google, by using a single square bracket, the URL, a space, your chosen text, and a closing square bracket.

You can give an external hyperlink more readable and helpful text like [http://www.google.com/ Google], by using a single square bracket, the URL, a space, your chosen text, and a closing square bracket.

Links to articles on the same topic in some special namespaces appeared, not in the article itself, but in the "Related sites" and "In other languages" sidebars. Most of these links are now deprecated as Wikidata now provides the same functionality.

These links were placed at the end of the article, in this order:

  • Links to other language versions of Wikivoyage had the format [[xx:Article]], where "xx" is the code for the language being linked to.
  • Links to Wikipedia had the format [[Wikipedia:Article]].

Any remaining links in this format have been replaced with {{RelatedWikipedia}} and {{RelatedCommonsCat}} templates as a transitional measure; where they duplicate Wikidata functionality, these are being removed from the articles.

Listings

See also: Wikivoyage:Listings

Content in the template tags {{see}}, {{do}}, {{buy}}, {{eat}}, {{drink}} and {{sleep}} is automatically formatted into a listing for an attraction, activity, store, restaurant, bar or accommodation. These listings can be automatically added and edited using the listing editor, and you should generally not need to touch their contents in the page editor; see Wikivoyage:Listings for details.

Templates

See also: Wikivoyage:Using Mediawiki templates

Text enclosed in curly brackets {{}} is used to insert the contents of templates into text. For example, {{warningbox|Don't go here}} produces the following:

Travel Warning WARNING: Don't go here

See Wikivoyage:Template index for a full list.

Tables

Think twice before you add a table to Wikivoyage: many things like complicated transport schedules go out of date pretty much instantly and are thus better not added. But if you insist, here's how they work:

{|
table start -- add class="wikitable" to make the lines between table cells visible
|+
table caption, optional; only between table start and first table row
|-
table row, optional on first row -- wiki engine assumes the first row
!
table header cell, optional. Consecutive table header cells may be added on same line separated by double marks (!!) or start on new lines, each with its own single mark (!).
|
table data cell, required! Consecutive table data cells may be added on same line separated by double marks (||) or start on new lines, each with its own single mark (|).
|}
table end

So, for example, this:

{| class="wikitable"
|+ Caption
! Header 1 !! Header 2
|-
| Cell 1 || Cell 2
|}

Looks like this:

Caption
Header 1Header 2
Cell 1Cell 2

Comments

Text enclosed between the special comment characters <!-- and --> is not displayed. This can be used to leave instructions or warnings visible only when editing the page, but should be used sparingly.

See also