Help:Editing

From NetBSD Wiki

Jump to: navigation, search

This wiki uses pretty standardized wiki format for text entry. The editing buttons above the edit control you use to enter the text are of help only for the most basic commands. The idea for this page is eventually to have descriptions sorted on frequency of use. Please read at least the Conventions section to help keep this wiki a little consistent.

For more information see the first two Reference pages, at the bottom of these page.


Contents

Conventions

There are some basic conventions most posters adhere to. To get some consistency in the wiki, please try to do this too.

Editing existing articles

If you want to edit a large Article like the NetBSD Handbook, try to edit only a section. On the beginning of every section is a little "edit" link to edit only that section of the Article.

Discussions

If you disagree with an Article, you should try to discuss it on the Article Page using the "discussion" button on the top. When replying to another message, use : (colons) to indent one more level. Currently, talk pages can be a little difficult to follow. In particular, it is difficult to see who wrote what, in reply to what and when. Therefore please sign your comment with four (4) tilde signs like this: ~~~~

Basic markup commands

  • To make text bold, enclose it in pairs of three single quotes, '''like this'''.
  • To make text italic, enclode it in pairs of two single quotes, ''like this''. Note: this is not a single doublequote character, which looks "like this".

To quote shell output or a file's contents, like this

$ uname -ps
NetBSD x86_64

just leave one space at the beginning of every line. Every space past the first is used for actual indentation.

Lists

Unordered lists

  • To make an unordered list of things, prepend each item with an asterisk (*), like so:
* One item
* Another item

The above will look like this in the wiki:

  • One item
  • Another item

Ordered lists

  • To make an ordered (aka numbered) list, prepend each item with a hash mark (#), like so:
# First item
# Second item

The above looks like this in the wiki:

  1. First item
  2. Second item

Definition lists

To make a definition list, prepend each item with a semicolon (;), with the definition after a colon (:), like so:

; foo : First metasyntactic variable.
; bar : Second metasyntactic variable.

This looks as follows:

foo 
First metasyntactic variable.
bar 
Second metasyntactic variable.

Nesting of lists

  • To make nested lists, prepend each item with the number of asterisks or hash marks of the level at which the item must occur:
* First level
** Second level
*** Third level
*** Another third level thing
** Back to second level
** Still in second level
* And we're back again at first level

The above will have the following effect:

  • First level
    • Second level
      • Third level
      • Another third level thing
    • Back to second level
    • Still in second level
  • And we're back again at first level

This also works for numbered/ordered lists, of course. Just replace the * with a #.

Sectioning

Just like this entry, wiki entries can have a hierarchy of information, chopped up in sections. Every conceptually different block of information should be separated by sections, especially in longer runs of text.

A section (toplevel subdivision of contents) is created like so:

== Section's name ==

A subsection (subdivision of contents within a section) is useful if your information is so large that it requires even further chopping up. That can be done as well:

=== Subsection's name ===

You can continue adding = signs until you hit a pair of six = signs on each side of the section name. For the curious, every = corresponds to an HTML heading level. The = heading = corresponds to the <h1> tag, until ====== heading ====== gets to the <h6> tag. There are no tags for headings <h7> or below in HTML, and the wiki syntax doesn't support this either.

Note: Don't use level 1 headings (= heading =).

Why not? --Rillig 01:00, 17 April 2007 (CEST)

Table of Contents

This Wiki will automatically generate Tables of Contents for every article, based on the sectioning commands described in the previous section. However, if your article does not have a TOC but would look better with one, please use the __TOC__ tag in your article to create the TOC.

Links

External links

To create an external link, use single angular brackets [http://www.netbsd.org]. This looks like [1]. This is mostly useful for quick footnote-like links.

You can also supply a description after the link by putting a space and the description after the link, inside the brackets like this: [http://wiki.onetbsd.org A very cool wiki]. This looks like A very cool wiki.

Internal links

Internal links are links to articles within this wiki. They use a similar notation as the external links, only there is no way to provide description. The link text always reads the same as the article's name. [[Main Page]] is a link to the main page, which looks like this in the wiki text: Main Page.

Warning: capitalization is important. Main page links to another article than Main Page does.

Redirects

Another type of "internal link" is the redirect. To set up a redirect, just put this in its text:

#redirect [[articlename]]

When someone tries to visit the page, he will be redirected to end up on the page of articlename, with a notice that the redirect took place. It is suggested you add redirects whenever you think people might reasonably look for your article under a different name. Note: You can always edit a redirecting page by taking an existing "edit" page and substituting the name of that article with the one you want to edit. editing pages do not cause the redirect to be invoked.

Special internal links

Some links have a more or less special status. These are help links and template links, for example. These can be linked to just like regular pages, there's no special syntax for them. The names of these pages are simply special. They start with the type of page ("Help:" or "Template:") followed by their name. The page you are currently viewing is a good example of this kind of page. It can be linked to like this: [[Help:Editing]], which would look like Help:Editing. See also the next section, on categorizing.

Categorizing your entry

Entries belong to categories, which makes them indexable. The category's page is a "special" page, where its entries are automatically generated. To make an entry part of a category, just link to the category special page, like so: [[Category:Shell Commands]]

You can link to a category without adding the article to the category by prepending the link with a colon, like this: [[:Category:Shell Commands]]

Templates

Templates are a very useful feature. They allow you to generate often-used page fragments, optionally based on parameters. For example, to create a link to a manpage of a command, use {{Manual page|ls|1|}}. This calls the template called Template:Manual page with the parameters one and two set to ls and 1, respectively. Inside the template, these parameters can be referred to with {{{1}}} and {{{2}}}, respectively. This template looks like this in wiki text: ls(1).

Note: Don't forget the trailing pipe symbol!

Another often-used template is the {{stub}} template, which inserts the following slab of text:

See also the of all current templates.

References

Personal tools