(Add note on form URLs) |
m (removing extraneous 'and') |
||
Line 218: | Line 218: | ||
Enter the <code>root</code> password when prompted. | Enter the <code>root</code> password when prompted. | ||
{{admon/note|Command examples and root|Many commands require <code>root</code> privileges. The reader should not be logged into their system as <code>root</code>, | {{admon/note|Command examples and root|Many commands require <code>root</code> privileges. The reader should not be logged into their system as <code>root</code>, so you must specify either <code>su -c</code> or <code>su -</code> when explaining such commands.}} | ||
If the command requires elements to be quoted, nesting should be <code><nowiki>" ' ' "</nowiki></code>, with the single quote marks surrounded by one containing set of double quote marks. For example: | If the command requires elements to be quoted, nesting should be <code><nowiki>" ' ' "</nowiki></code>, with the single quote marks surrounded by one containing set of double quote marks. For example: |
Revision as of 04:33, 13 December 2011
Basic Syntax
What you type | What it looks like |
---|---|
'''bold text''' |
bold text |
''italics'' |
italics |
'''''bold italics''''' |
bold italics |
<code>Monospace text</code> |
Monospace text
|
Lists
What you type | What it looks like |
---|---|
* A list item * Another list item ** Oh joy, more list items! |
|
# A numbered item # Another numbered item ## Sub items ## More sub items # Third numbered item |
|
* An unordered item... *# With a sub-list that is ordered *# More steps * Back to the first list *# Another ordered list *#* With its own sub point |
|
Links
What you type | What it looks like |
---|---|
Visit [[DocsProject]] to learn more about Fedora's documentation. |
Visit DocsProject to learn more about Fedora's documentation. |
Our [[Websites|websites team]] offers many individuals who can help Fedora. |
Our websites team offers many individuals who can help Fedora. |
See [[Artwork#Join]] on how to join the Art Team. |
See Artwork#Join on how to join the Art Team. |
[[The weather in London]] is a page that doesn't exist yet. |
The weather in London is a page that doesn't exist yet. |
http://fedoraproject.org/ |
http://fedoraproject.org/ |
Here are some sites: [http://www.deviantart.com] [http://www.flickr.com] |
Here are some sites: [1] [2] |
[http://fedoraproject.org Our home page] is full of interesting information. |
Our home page is full of interesting information. |
Use a ':' in the link to link to an [[:Image:Growth_wide.jpg|image]]. |
Use a ':' in the link to link to an image. |
The [[:Category:Documentation]] lists all end-user documentation. |
The Category:Documentation lists all end-user documentation. |
The [[Category:Documentation]] link puts this page in the listed category; the link appears automatically on the bottom of the page and not inline. |
The [[Category:Documentation]] link puts this page in the listed category; the link appears automatically on the bottom of the page and not inline. |
Tables
Tables should be used sparingly and only when necessary.
For more advanced table usage, read up on Mediawiki.org's page on tables.
What you want | How to get it |
---|---|
Start a table | {| |
Table header | ! Column 1 !! Column 2 !! Column 3 |
Table row | |- |
Table data | | Cell 1 || Cell 2 || Cell 3 |
End a table | |} |
IRC Logs
IRC logs can either be surrounded in <pre>
tags, or converted into MediaWiki pipe-tables with irclog2html and Ian's MediaWiki patch for irclog2html.
Notes, Tips, and Other Admonitions
These are collectively known as admonitions, and are used in DocBook. To make a paragraph into an admonition, use the special admonition template. A short title and a longer descriptive paragraph are recommended.
What you type | What you see |
---|---|
{{admon/note|A title|Here is more information about this tip, with information that provides more insight into the informative title of the initial paragraph.}} |
Indent the initial and second paragraph by one space, to ensure that the box aligns correctly.
These are the standard types of admonition:
What you type | What you see |
---|---|
{{admon/note|This is a note|Informational paragraph that tells more about what is going on.}} |
|
{{admon/tip|This is a tip|Informational paragraph that tells more about what is going on.}} |
|
{{admon/important|This is important|Informational paragraph that tells more about what is going on.}} |
|
{{admon/caution|This is a caution|Informational paragraph that tells more about what is going on.}} |
|
{{admon/warning|This is a warning|Informational paragraph that tells more about what is going on.}} |
Admonition examples
Examples showing context for using these admonitions:
Refer to the Fedora Documentation Guide for descriptions of the types of admonition: http://docs.fedoraproject.org/documentation-guide/en_US/sn-xml-admon.html
L10N review admonitions
These are admonitions to request translation updates:
What you type | What you see |
---|---|
{{Update}} |
|
{{RoughTranslation}} |
|
{{CleanupRemainder}} |
URLs and links inside an admonition
If you need to put a URL with form data inside an admonition, you must use the wiki parameters to set it properly:
What you type | What you see |
---|---|
{{admon/note | 1=Form URLs | 2=This is a [http://example.com?foo=bar form URL].}} |
Writing Example Commands
Example commands are one or more commands set apart from the body of the explanation. Do not use prompt symbols or any other content that shows machine name, user, directory, etc. (which are details set in the $PS1 environment variable.)
Enclose any example command in <pre></pre>
tags:
<pre> su -c "yum install awesome-application" </pre> Enter the <code>root</code> password when prompted.
Which produces:
su -c "yum install awesome-application"
Enter the root
password when prompted.
If the command requires elements to be quoted, nesting should be " ' ' "
, with the single quote marks surrounded by one containing set of double quote marks. For example:
su -c "command -o 'Some Text' -file 'More text' foo/bar"
If you need to have a series of commands or su -c
is not responding as expected, have the user switch to root
and warn the user to return to a normal user shell afterward.
su - Password: service food stop cp /etc/foo.d/foo.conf /etc/foo.d/foo.conf.backup vi /etc/foo.d/foo.conf food --test-config ... service food start exit
Example command output
When the example shows a command as part of showing the output to the screen, you may use a command prompt to clarify commands and output.
$ su -c "ls -l /root" Password: total 148 -rw------- 1 root root 1961 2007-09-21 02:46 anaconda-ks.cfg -rw-r--r-- 1 root root 46725 2007-09-21 02:46 install.log -rw-r--r-- 1 root root 6079 2007-09-21 02:42 install.log.syslog -rw-r--r-- 1 root root 3699 2008-07-28 17:24 scsrun.log -rw-r--r-- 1 root root 45038 2008-01-10 10:21 upgrade.log -rw-r--r-- 1 root root 1317 2008-01-10 10:20 upgrade.log.syslog
Quick Tips
Structure of a Wiki Page
This section describes the common structure of a wiki page. Follow these guidelines for every wiki page. There are additional rules used for formal Fedora documentation, covered in Writing for DocBook using the wiki ; those rules are only required for content written to follow the procedures of the Fedora Documentation Project. Pages that are templates of standard content that are drawn into other pages may have a different structure.
- The title of the page is a first-level header. It is created automatically from the page title.
- Sections are created using the equals symbols in pairs:
== Header 2 == === Header 3 === ==== Header 4 ==== ===== Don't do this, 5 levels of nesting means you need a new page or three =====
- The table of contents is automatically created and populated when the page grows big enough.
- Anchors to sections are automatically created, with specific symbols used in place of punctuation and spaces:
This page ==> This_page This, that, and the other page ==> This%2C_that%2C_and_the_other_page
Learn by Example
Among the better ways to learn how to edit the wiki is reviewing the code of existing pages. This is very easy to do:
- Find a page whose source you would like to view.
- Click on either the edit or view source tab at the top of the page.
The wiki will display the plaintext form of that page. This is particularly valuable for learning some of the clever tricks used by wiki editors ahead of you. Those 'clever tricks' are valuable, as they allow you to do unique, interesting, and powerful things you might not have thought were possible. You might try this on pages like Main Page (but please don't make drastic or unwanted edits to this page!).
Marking Technical Terms
Use the code markup (<code></code>) to mark the names of applications, files, directories, software packages, user accounts, and other words that have a specific technical meaning. This displays the marked words as monospace
.
Use two single-quotes (''[name of menu]'')
to mark the names of menu items and other elements of the graphical interface. This displays the marked words in italic.
Term | Mark Up | Formatted example |
---|---|---|
Names of GUI applications | '''boldface''' |
Firefox |
Files, directories | <code>inline code tags</code> |
/usr/bin/firefox
|
Software packages | <code>package name</code> |
firefox-1.2.3
|
User accounts | <code>username</code> |
username
|
Other words that have a specific technical meaning | <code>technical term</code> |
... the class org.fedora.someJava.classname ...
|
Graphical menus and menu items | ''Menu name'' |
Applications > Internet > Firefox Web Browser |
Other GUI or WebUI interface element | ''two single-ticks'' |
... click the Submit button ... |
Inline command and daemons | <code>command -option</code> <code>daemon</code> |
grep httpd to find the PIDs of the running httpd processes.
|
Blocks of code, configuration files, etc. | <pre>whitespace preserved< /pre> |
whitespace is preservered here |
Inline pieces of code, configuration files, etc. | <code>inline whitespace not preserved</code> |
... Next, modify the variables for set() in /path/to/org/dev108/classname ...
|
First term, glossary term | ''term'' |
... Firefox is an example of a graphical user interface or GUI. |
Keystrokes | '''[Key]''' |
Press the [Enter] key ... |
For example:
The <code>thunderbird</code> package installs the '''Mozilla Thunderbird''' e-mail application. To start '''Thunderbird''', select: ''Applications > Internet > Thunderbird Email''.
Which produces:
The thunderbird
package installs the Mozilla Thunderbird e-mail application. To start Thunderbird, select: Applications > Internet > Thunderbird Email.