注意:

The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.

Help:Funtoo Editing Guidelines/Basics

From Funtoo
Revision as of 03:06, February 24, 2019 by Drobbins (talk | contribs)
Jump to navigation Jump to search

Links

Internal links to other wiki pages are written in wikitext as [[pagename]]. To specify an alternate name for the link, use [[pagename|my link name]]. Note the vertical bar character which is used to specify an alternate title to display instead of the actual linked-to page title.

For external links, use [https://funtoo.org my link] to specify a URL. Note that a vertical bar is not needed to specify a link name -- the first space appearing in the external link is considered to be a delimiter between URL and the page name to display on the page. If you want the URL to appear in the wikitext, you can specify it without brackets, like so: https://forums.funtoo.org. This will render as: https://forums.funtoo.org.

Lists

MediaWiki supports a number of list formats.

Unordered Lists

  • Unordered List
  • Unordered Item 2
    • Unordered sub-item

In wikitext, this looks like this:

   example wikitext

* Unordered List
* Unordered Item 2
** Unordered sub-item

Ordered Lists

Here is an example ordered list:

  1. Ordered List
  2. Ordered Item 2
    1. Ordered sub-item

Here is the wikitext used to create this list:

   example wikitext

# Ordered List
# Ordered Item 2
## Ordered sub-item

Definition Lists

Term 1
This is called a "definition list". It is used when defining various terms.
Term 2
This is called a "definition list". It is used when defining various terms.
   Note

Please use Tables instead of definition lists when possible. They are easier to read.

Blockquote

If you need to quote a portion of text from another site, use <blockquote> as follows:

Wikipedia (ˌwɪkɨˈpiːdiə/ or wɪkiˈpiːdiə/ wik-i-pee-dee-ə) is a collaboratively edited, multilingual, free-access, free content Internet encyclopedia that is supported and hosted by the non-profit Wikimedia Foundation. Volunteers worldwide collaboratively write Wikipedia's 30 million articles in 287 languages, including over 4.5 million in the English Wikipedia. Anyone who can access the site can edit almost any of its articles, which on the Internet comprise[4] the largest and most popular general reference work.[5][6][7][8][9] In February 2014, The New York Times reported that Wikipedia is ranked fifth globally among all websites stating, "With 18 billion page views and nearly 500 million unique visitors a month..., Wikipedia trails just Yahoo, Facebook, Microsoft and Google, the largest with 1.2 billion unique visitors."[10]

Paragraphs

To create a new paragraph, insert a blank line between two lines of text. If a blank line doesn't exist between two lines of wikitext, they will be combined into a single flowing paragraph.

   Warning

If you leave leading whitespace at the beginning of a line, MediaWiki will render it as pre-formatted text. Beware of this. See below for more info.

Here's an example of how whitespace at the beginning of text (in this case, just a single space) will force mediawiki to render text as pre-formatted. This can be handy when you want it, and a pain when you don't want it -- so be aware of this feature!

   example wikitext
 This is supposed to be standard wikitext but is rendering as monospace instead!
^
\
 there is an extra space here!

This will render in monospaced text as follows:

This is supposed to be standard wikitext but is rendering as monospace instead!

Template Parameters

Templates are MediaWiki's versions of "macros" or functions, and typically look like this in wikitext:

   example wikitext for template call

{{c|foobar}}

Above, we are calling the Template:C template and specifying its first parameter to be the string foobar. Another way to specify the first parameter is using the 1| convention, as follows, which does the same thing as the previous template call:

   example wikitext for template call, now with 1|

{{c|1=foobar}}

It is a common error for new wiki contributors to leave extra whitespace after the | character when specifying a parameter to a template, particularly when they are using {{note}} or similar templates. This will cause the first parameter to render as monospace, which is not generally what you want! So, instead of getting a proper tip like this, specified in wikitext as:

   example wikitext of correctly-written tip

{{tip|This is an example tip!}}

...which renders correctly as:

   Tip

This is an example tip!

...you will instead get the following:

   Tip
This is a broken tip in monospace because I have a leading space after |!

Here is the wikitext that produced the rendering error. Can you see the problem?

   example wikitext of 'broken' tip

{{tip| This is a broken tip because I have a leading space after {{!}}!}}
      ^
      \
       hint