Difference between revisions of "Help:Markup"

ADVERTISEMENT
From Diablo Wiki
Jump to: navigation, search
(Quote Boxes)
Line 69: Line 69:
  
 
Use this tool primarily to show code in explanatory pages, but it's also possible to use it for short notes, since items in this sort of box do not receive additional wiki formatting, and will stretch pages infinitely wide. Use a soft break to keep such lines from running endlessly off to the right, if they are longer than a few words.
 
Use this tool primarily to show code in explanatory pages, but it's also possible to use it for short notes, since items in this sort of box do not receive additional wiki formatting, and will stretch pages infinitely wide. Use a soft break to keep such lines from running endlessly off to the right, if they are longer than a few words.
 +
  
 
==Creating Links==
 
==Creating Links==
 +
Creating links is very simple and there are two methods to do so: an external site link for outside sources and an internal site link for content inside the {{WikiTitle}}.
  
Creating links is very simple and there are two methods to do so: an external site link for outside sources and an internal site link for content inside the DiabloWiki.
 
  
 
===Internal Links===
 
===Internal Links===
Internal site link use two brackets <nowiki>[[ ]]</nowiki> on either side of the title, with an optional title (if specified, separate with a | character). <nowiki>[[Topic|Link Title]]</nowiki>
+
An internal site link use two brackets <nowiki>[[ ]]</nowiki> on either side of the title, with an optional title (if specified, separate with a | character). <nowiki>[[Topic|Link Title]]</nowiki>. If you add link brackets to the same article currently shown, the link will turn '''bold''' instead of into a link. It's also possible to modify the link title without changing the link by adding characters after the right side brackets (<nowiki>]]</nowiki>) like this: <nowiki>[[Topic|Link Title]]ing</nowiki>.
 +
 
 +
The following code:
 +
<blockquote><pre>
 +
[[Help:Contents]]<br>
 +
[[Help:Contents|Help]]<br>
 +
[[Help:Contents|Help]]ing<br>
 +
[[Help:Contents|Help]]ers<br>
 +
</pre></blockquote>
 +
Will look like this:
 +
----
 +
[[Help:Contents]]<br>
 +
[[Help:Contents|Help]]<br>
 +
[[Help:Contents|Help]]ing<br>
 +
[[Help:Contents|Help]]ers<br>
 +
----
  
  

Revision as of 11:31, 28 August 2008

Wiki pages are designed to be easy to create and edit, and require a minimal amount of technical knowledge. If you can create a forum post, you can edit a wiki page. Read this page for some basic theory and common codes, and you'll be well on your way. Also keep in mind that you can always click the edit tab on an existing page to see how it was formatted.


Wiki Code

Wikis use their own syntax (markup) for creating text formatting. Below is a list of common syntax you can use to format your pages. A more extensive guide to wiki editing can be found on Wikimedia's site.


Text Formatting

Wiki pages should present information with words and occasional images, in a simple, low-tech format. Wiki pages are more analogous to forum posts or word documents than to modern webpages, and as such only a few commands are necessary. Some of the most useful are:

  • Italic Text ''Your Text'' (2 apostrophes)
  • Bold Text '''Your Text''' (3 apostrophes)
  • Bold Italic Text '''''Your Text''''' (5 apostrophes)
  • Underline <u>Your Text</u>


Section Headers

To keep pages readable and organized, separate the text into sections. Section headers do this nicely, and are automatically added to the table of contents. Headers should be hierarchical and descending, as needed. There are several levels of headers, and the text so offset by equals signs will display in descending point size and font colour.

  • Heading 1 ==Your heading==
  • Heading 2 ===Your heading===
  • Heading 3 ====Your heading====

The single equal sign is not used in articles. It's used for the formatting for the title of pages. Use the double equal signs for the first heading and replace any heading hierarchies on article pages that might use the single one.


Lists

Aside from links and tables, covered elsewhere on this page, the most common formatting tool is the list. There are two types: bulleted and numbered, and they are written in exactly the same manner. To create a bullet list, simply place asterisks (*) at the start of each line you want to bullet. If you want a numbered list, use the hash (#) sign. To add subheadings, simply use 2 or more such punctuation signs. The wiki script will automatically arrange them on the page.

* Item One
* Item Two
** Item Two and a half
*** Item two and three quarters
* Item Three.

Turns into:


  • Item One
  • Item Two
    • Item Two and a half
      • Item two and three quarters
  • Item Three.

Bullet points or numbered lists should be used to organize and format pages, and to present short facts in sequence.


Soft Returns

The wiki script ignores single returns. For instance, if you type something that looks like this in the edit box:

This<br>
line<br>
has<br>
a<br>
lot<br>
of<br>
returns.

It will show up on the page as a plain line of text, without any line breaks. You need to add a <br> tag to each line you want to format below the next. It's also possible to use pointed or numbered lists for breaks. Read above about lists.


Preformatted Boxes

To make a preformatted box, for showing text with fixed width, especially when showing different types of code, simply add one space before it begins, and the wiki script will automatically place it in a red-tinted box with a special outline. For example:

Aren't I dramatic!

Use this tool primarily to show code in explanatory pages, but it's also possible to use it for short notes, since items in this sort of box do not receive additional wiki formatting, and will stretch pages infinitely wide. Use a soft break to keep such lines from running endlessly off to the right, if they are longer than a few words.


Creating Links

Creating links is very simple and there are two methods to do so: an external site link for outside sources and an internal site link for content inside the DiabloWiki.


Internal Links

An internal site link use two brackets [[ ]] on either side of the title, with an optional title (if specified, separate with a | character). [[Topic|Link Title]]. If you add link brackets to the same article currently shown, the link will turn bold instead of into a link. It's also possible to modify the link title without changing the link by adding characters after the right side brackets (]]) like this: [[Topic|Link Title]]ing.

The following code:

[[Help:Contents]]<br>
[[Help:Contents|Help]]<br>
[[Help:Contents|Help]]ing<br>
[[Help:Contents|Help]]ers<br>

Will look like this:


Help:Contents
Help
Helping
Helpers



Linking to Categories

Linking to categories can be helpful, since the search option will not generally display a category page even if that's the most useful page for their desired information. It's also helpful for newer wiki users who may not know to scroll to the bottom of a page to find the automated category links.

The problem is of course that adding the "[[ ]]" around a category name will only add that page into the category, so to create a clickable link to a category and avoiding this, type: "[[:Category:xxxxx]]" where "xxxxx" is the name of the Category.

The only difference from actually adding the category is the ":" before the "Category". An optional title is often good to use here, so people don't get confused by the "strange" name. Remember If that page is meant to be in that category, add a tag for it at the end of the page as well.

External Links

External links are used like this: [http://yourlink.com Your Link Title].

External links can be made with one bracket on either side of the link without space and a description, like [http://yourlink.com], and will create a link in brackets, like this: [1].

To add title text to your link, use a space between the URL and the text. For example, linking to the IncGamers Diablo2 website (http://www.diabloii.net) is done with [http://http://www.diabloii.net Diabloii.Net website] which turns into Diabloii.Net website. When possible, provide text for the link, as not doing so produces the "[1]" style links which are better suited to citations.

The link can also just be typed without using brackets at all for a "bare link", such as http://www.diabloii.net. This is acceptable for simple links (like short domains) that are easily recognizable.

Table of Contents Boxes

Wiki format is pretty clever and can automatically create TOC boxes like you see at the top of the page. A content box is automatically created when you use 4 or more headlines, which are formatted as explained above. All headlines will show up in the TOC, which is very handy.

Additional equals signs will create additional layers of headings. It's that simple!

Try to avoid putting numbers into page headers, since numbers are automatically generated by the wiki table of contents, and will look redundant or even misleading.


Creating Tables

If you are familiar with html then wiki syntax will seem logical; however, if you are not familiar with html it is still pretty simple to follow.

Here's an example of one of the mediawiki table notations:

 {| 
 ! 1
 ! 2
 ! 3
 |- 
 | 4
 | 5
 | 6 
 |}

which should look like this:

1 2 3
4 5 6

The tables are automatically formatted with the site style so you aren't required to add any style elements to the tables. The only time you would really need to add an element to the table is if you specify a width.

As you can see the wiki code 'looks' like a table and you can expand on this and format more complex tables. Just check some of the pages with tables around the site if you need to see how things work.

Categories

Categories and subcategories are the backbone of a wiki's navigation. (Especially since the wiki search options aren't very intuitive.) Every page should be slotted into at least one category, to enable other users to find it easily.

  • Every page automatically displays the categories it is slotted into at the bottom of the page.
  • Category designations should be straight forward and self evident.
  • Category pages are generated automatically by the wiki script, with all pages in that category shown in alphabetical order. See the Monsters Category for one example.
  • It's helpful to add some introductory text to a category page, but this text should be kept short and to the point.
    • If a fuller explanation is required, create a separate page for that purpose. See the Amazon Category within which you can find an Amazon page, for instance.

To add a page to a category, (and create the category itself, if it does not already exist), place the following tag somewhere on the page in question (for ease of editing, it's recommended that categories are added at the very bottom of a page):

[[Category:xxxxx]]

Where xxxxx is the name of the Category.

Subcategories

Subcategories are automatically created by the wiki script, just like categories. They are displayed on categories pages, and are used to organize individual pages into smaller, more focused groups. These can overlap or intertwine to some degree. For instance, the Monsters Category has subcategories for Act Bosses and SuperUniques. Furthermore, the five Act Boss pages are all found within the SuperUniques category. Moving up the hierarchical tree, the monsters category is found within the Category:Basics.


Linking to Categories

Linking to categories can be helpful, since the search option will not generally display a category page even if that's the most useful page for their desired information. It's also helpful for newer wiki users who may not know to scroll to the bottom of a page to find automatically-generated links to every category a page is slotted into.

To create a clickable link to a category (without adding the page to that category), type:

[[:Category:xxxxx]]

Where xxxxx is the name of the Category. Notice this differs from the previous code by a ":" before the "Category". If that page is meant to be in that category, add a tag for it at the end of the page as well.

Images

To insert an image (which must have been previously uploaded to the wiki):

[[Image:filename.jpg|alternate text here]]

The example above shows a jpg, but it may use any valid file extension. Images inserted this way will be placed with left justification, and text will wrap around them.

To link to the GWO Wiki page for the image, type:

[[:Image:filename.jpg]]

Images automatically link to the full page for that image, where the image is displayed full size, along with any caption and copyright info included for it. Images may be set to link directly to other pages, though this is non-standard wiki practice, and its recommended that such links are provided in the image's caption, or are placed directly on the full image page. To link from an image:

{{clickpic|TARGET PAGE TITLE|FULL PATH OF IMAGE FILE}}

Where "FULL PATH OF IMAGE FILE" is the full path, for example http://www.imaginarywiki.com/wiki/index/image.jpg - so this works better with external images, but may be used with images you have uploaded with you use their full path instead of the usual shortcut.

Image Formatting

Images may be presented in various ways by adding commands within the brackets, after the image, separated by "pipes." For example, the image below this paragraph has the following code:

File:Mon-achmel1.jpg
Words about the image.
 [[Image:Mon-achmel1.jpg|center|thumb|125px|Words about the image.]]

The most common image formatting command is "frame" which simply adds a border around an image and (by default) right justifies it. Various other image formatting commands (such as thumb, or inserting a caption) will create a frame automatically, as seen in the above example.

  • Right/left/center are valid justifying commands.
  • Thumb will thumbnail an image, and should be used when the full image is so large it will affect a page's formatting. Default is 200 pixels wide. If a different display width is desired, simply type it in, immediately after the thumb command, separated by a pipe.
  • To caption an image, simply type whatever you wish the caption to be, after the other commands, immediately before the closing double brackets. Wiki formatting is to keep captions as short and to the point as possible. Long captions will stretch the image frame beyond the image, and look ugly.

Further Reading

Try it out!

There is a special Wiki Sandbox that you can try out your editing skills in, without making unnecessary changes to existing articles.


Wiki Help Index [e]
Help Contents

Community Portal
Markup - Create article - Sandbox
Help FAQ
Wiki Support
Category Structure
DiabloWiki Policies
Help Category
Link us

Wiki Tools

Article History
Boilerplates
Deleting pages
Disambiguations
Moving Articles
Redirects
Stubs
Templates

Glossary

Articles
Categories
Images
Linking
Tables
Talk Pages
Vandalism