Difference between revisions 23963 and 23981 on zhwikivoyageWikivoyage uses a special code called '''Wiki markup''' for formatting the text and images in an article. The Wiki markup used while [[ProjectWikivoyage:如何编辑页面|如何编辑页面]] 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 [[ProjectWikivoyage:格式手册|格式手册]]. 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== {| width="100%" class="wikitable" ! To get this output... ! ...use this markup. |- | (contracted; show full) | <nowiki>You can link to an article like [[首页]] by adding the article title with two square brackets around it.</nowiki> |- | You can give the link alternate text, like [[首页|去首页]], by adding a vertical bar after the title, and then the text you want to use. | <nowiki>You can give the link alternate text, like [[首页|去首页]], by adding a vertical bar after the title, and then the text you want to use.</nowiki> |- | Links in different namespaces, like [[ ProjectWikivoyage:FAQ]] or [[User:EvanProdromou]], work the same way. | <nowiki>Links in different namespaces, like [[ProjectWikivoyage:FAQ]] or [[User:EvanProdromou]], work the same way.</nowiki> |- | Using a vertical bar at the end of the link (but before the closing brackets) will hide the namespace, like [[ProjectWikivoyage:FAQ|FAQ]] or [[User:EvanProdromou|EvanProdromou]]. | <nowiki>Using a vertical bar at the end of the link (but before the closing brackets) will hide the namespace, like [[ProjectWikivoyage:FAQ|]] or [[User:EvanProdromou|]]. </nowiki> |- | It's OK to put in links to [[不存在的页面]]. | <nowiki> It's OK to put in links to [[不存在的页面]]. </nowiki> |- | Putting a URL like http://www.google.com/ into text makes it into a clickable external hyperlink automatically. | <nowiki>Putting a URL like http://www.google.com/ into text makes it into a clickable external hyperlink automatically.</nowiki> |- | 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. | <nowiki>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.</nowiki> |} ===Special links=== Links to articles on the same topic in some special namespaces appear, not in the article itself, but in the "Related sites" and "In other languages" sidebars. These links go at the end of the article, in this order: * Links to [[ProjectWikivoyage:Inter-language links|other language versions]] of Wikivoyage have the format <nowiki>[[xx:Article]]</nowiki>, where "xx" is the code for the language being linked to. * Links to [[ProjectWikivoyage:Links to Wikipedia|Wikipedia]] have the format <nowiki>[[Wikipedia:Article]]</nowiki>. * Links to [[ProjectWikivoyage:Links to Open Directory|Open Directory]] have the format <nowiki>[[Dmoz:Article]]</nowiki>. ==Listings== Content in the special tags '''<nowiki><see>...</see>, <do>...</do>, <eat>...</eat>, <drink>...</drink>, <sleep>...</sleep>, <listing>...</listing></nowiki>''' is automatically formatted into a [[ProjectWikivoyage:Listings|listing]] for an attraction, activity, restaurant, bar or accommodation. These listings can be automatically added and edited by pointing and clicking, and you should generally not need to touch their contents in the page editor; see [[ProjectWikivoyage:Listings]] for details. ==Templates== Text enclosed in curly brackets '''<nowiki>{{}}</nowiki>''' is used to insert the contents of [[ProjectWikivoyage:Using Mediawiki templates|templates]] into text. For example, '''<nowiki>{{warningbox|Don't go here}}</nowiki>''' produces the following: {{warningbox|Don't go here}} See [[ProjectWikivoyage: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: {| width="60%" class="wikitable" | <nowiki>{|</nowiki> (contracted; show full)|} ==Comments== {{shortcut|[[wv:comment]]}} Text enclosed between the special comment characters <code><nowiki><!--</nowiki></code> and <code><nowiki>--></nowiki></code> 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== *[[ ProjectWikivoyage:帮助]] *[http://www.mediawiki.org/wiki/Help:Contents Mediawiki Help] *[http://meta.wikipedia.org/wiki/MediaWiki_User%27s_Guide:_Editing_overview#The_wiki_markup The MediaWiki User's Guide section on Wiki markup] *[[ProjectWikivoyage:External links|Wikivoyage's external links policy]] - when and how to add links to other sites {{WikivoyageDoc|help}} [[Wikipedia:Help:Wiki markup]] All content in the above text box is licensed under the Creative Commons Attribution-ShareAlike license Version 4 and was originally sourced from https://zh.wikivoyage.org/w/index.php?diff=prev&oldid=23981.
![]() ![]() This site is not affiliated with or endorsed in any way by the Wikimedia Foundation or any of its affiliates. In fact, we fucking despise them.
|