The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.
Difference between revisions of "Help:Funtoo Editing Guidelines/Basics"
(17 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
== Getting Started == | |||
Here is a list of basic wiki information that you will need to know to get started: | |||
* First, to perform edits on the wiki, you must {{CreateAccount}} and log in. | |||
* You can create a new page by navigating to http://www.funtoo.org/New_Page_Name. Underscores are the equivalent of spaces. Then select "Create" under the "Actions" menu. | |||
* Whether creating a new page or editing an existing page by clicking "Edit", you will be presented with Web-based text editor that allows you to modify the ''wikitext'' of the page. The wikitext is rendered to produce the document you see when you view the page normally. | |||
* Another fun thing you can do is click on your username in the upper left once you have logged in. This will bring you to your "User" page. Then click "Create with Form" unde the "Actions" menu and enter your geographic and other information. This will allow you to be displayed on our [[Usermap]] and will also allow your full name to be displayed on [[:Category:Ebuilds|Ebuild pages]] for which you are an author. It's generally a good idea to do this. | |||
== Basic WikiText == | |||
This chapter provides an introduction to the proper use of MediaWiki wikitext on the Funtoo Linux wiki. | |||
=== Links === | |||
Internal links to other wiki pages are written in wikitext as {{c|<nowiki>[[pagename]]</nowiki>}}. To specify an alternate name for the link, use {{c|<nowiki>[[pagename|my link name]]</nowiki>}}. 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 {{c|<nowiki>[https://funtoo.org my link]</nowiki>}} 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: {{c|<nowiki>https://forums.funtoo.org</nowiki>}}. This will render as: https://forums.funtoo.org. | |||
=== Lists === | |||
MediaWiki supports a number of list formats. | |||
==== Unordered Lists ==== | |||
Here is an example of an unordered list: | |||
* Unordered List | |||
* Unordered Item 2 | |||
** Unordered sub-item | |||
In wikitext, this looks like this: | |||
{{file|name=example wikitext|body=<nowiki> | |||
* Unordered List | |||
* Unordered Item 2 | |||
** Unordered sub-item</nowiki>}} | |||
==== Ordered Lists ==== | |||
Here is an example ordered list: | |||
# Ordered List | |||
# Ordered Item 2 | |||
## Ordered sub-item | |||
Here is the wikitext used to create this list: | |||
{{file|name=example wikitext|body=<nowiki> | |||
# Ordered List | |||
# Ordered Item 2 | |||
## Ordered sub-item</nowiki>}} | |||
=== 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|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 {{c|<nowiki><blockquote></nowiki>}} as follows: | |||
<blockquote> | |||
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] | |||
</blockquote> | |||
=== Paragraphs === | === Paragraphs === | ||
Line 9: | Line 78: | ||
{{file|name=example wikitext|body= | {{file|name=example wikitext|body= | ||
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 will render in monospaced text as follows: | ||
This is supposed to be standard wikitext but is rendering as monospace instead! | |||
=== Template Parameters === | === Template Parameters === | ||
Line 31: | Line 103: | ||
</nowiki>}} | </nowiki>}} | ||
It is a common error for new wiki contributors to leave extra whitespace after the {{c|{{!}}}} character when specifying a parameter to a template, particularly when they are using {{c|<nowiki>{{note}}</nowiki>}} 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: | It is a common error for new wiki contributors to leave extra whitespace after the {{c|{{!}}}} character when specifying a parameter to a template, particularly when they are using {{c|<nowiki>{{note}}</nowiki>}} 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: | ||
{{file|name=example wikitext of correctly-written tip|body=<nowiki> | {{file|name=example wikitext of correctly-written tip|body=<nowiki> | ||
{{tip|This is an example tip!}} | {{tip|This is an example tip!}} | ||
</nowiki>}} | </nowiki>}} | ||
...which renders correctly as: | |||
{{tip|This is an example tip!}} | {{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? | |||
{{file|name=example wikitext of 'broken' tip|body=<nowiki> | {{file|name=example wikitext of 'broken' tip|body=<nowiki> | ||
{{tip| This is a broken tip because I have a leading space after {{!}}!}} | {{tip| This is a broken tip because I have a leading space after {{!}}!}} | ||
^ | |||
\ | |||
hint | |||
</nowiki>}} | </nowiki>}} | ||
=== Wikitext Gotchas === | |||
{{Important|Here are a few more important wikitext 'gotchas' that often catch those new to MediaWiki off-guard. These can be very helpful to know!}} | |||
There are times where you might like to type a literal {{c|{{!}}}} (vertical bar, or pipe) character within a template parameter, but MediaWiki will interpret this as a delimiter for a parameter instead. To get around this, use the {{c|<nowiki>{{!}}</nowiki>}} template instead of {{c|{{!}}}} -- MediaWiki will insert a {{c|{{!}}}} in its place. | |||
Also, there may be times where you want to disable interpretation of {{c|<nowiki>{{</nowiki>}} as the start of a template. In these cases, you can use the special tags {{c|<nowiki>}} and {{c|</nowiki>}} to surround your text, and expansion of templates will be disabled between these tags. |
Latest revision as of 05:02, February 24, 2019
Getting Started
Here is a list of basic wiki information that you will need to know to get started:
- First, to perform edits on the wiki, you must Create a Funtoo account and log in.
- You can create a new page by navigating to http://www.funtoo.org/New_Page_Name. Underscores are the equivalent of spaces. Then select "Create" under the "Actions" menu.
- Whether creating a new page or editing an existing page by clicking "Edit", you will be presented with Web-based text editor that allows you to modify the wikitext of the page. The wikitext is rendered to produce the document you see when you view the page normally.
- Another fun thing you can do is click on your username in the upper left once you have logged in. This will bring you to your "User" page. Then click "Create with Form" unde the "Actions" menu and enter your geographic and other information. This will allow you to be displayed on our Usermap and will also allow your full name to be displayed on Ebuild pages for which you are an author. It's generally a good idea to do this.
Basic WikiText
This chapter provides an introduction to the proper use of MediaWiki wikitext on the Funtoo Linux wiki.
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
Here is an example of an unordered list:
- 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:
- Ordered List
- Ordered Item 2
- 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.
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.
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:
This is an example tip!
...you will instead get the following:
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
Wikitext Gotchas
Here are a few more important wikitext 'gotchas' that often catch those new to MediaWiki off-guard. These can be very helpful to know!
There are times where you might like to type a literal |
(vertical bar, or pipe) character within a template parameter, but MediaWiki will interpret this as a delimiter for a parameter instead. To get around this, use the {{!}}
template instead of |
-- MediaWiki will insert a |
in its place.
Also, there may be times where you want to disable interpretation of {{
as the start of a template. In these cases, you can use the special tags <nowiki>
and </nowiki>
to surround your text, and expansion of templates will be disabled between these tags.