Markup

From VyOS Wiki
Jump to: navigation, search

Wiki markup is simple.

Headers

= Headers =
== Header 2 ==
=== Header 3 ===
==== Header 4 ====

Header 2

Header 3

Header 4

Text styles

'''Bold'''
''Italic''

Bold Italic

Preformatted text

  <pre>
    set system host-name vyos
    set system options reboot-on-panic true
  </pre>
    set system host-name vyos
    set system options reboot-on-panic true

Hyperlinks

Internal link: [[Perl API]]

Internal link with alternate name: [[GRE/IPsec|GRE over IPsec]]

External link: [http://wiki.vyos.net VyOS wiki]

User guide

GRE over IPsec

VyOS wiki

If a link is a red link, it means it points to a page that does not exist. A red link is basically an invitation to create a page, so do not hesitate to leave them. First occurence of a term in a page should be a hyperlink, e.g.:

For DMVPN, you can use various routing protocols, such as OSPF...

Lists

Unnumbered list:
* Item 1
* Item 2
* Item 3

Numbered list:
# First item
# Second item
# Third item

Unnumbered list:

  • Item 1
  • Item 2
  • Item 3

Numbered list:

  1. First item
  2. Second item
  3. Third item

Categories

To organize pages, MediaWiki uses the concept of categories. Unlike in some other wikis, any page can appear in any number of categories. It's ok to use category names that do not exist yet, you can then edit the category page to add some description, or just leave it a redlink. Visiting a category page (such as) will give you a list of all pages in that category whether it's a red link or not.

You can find the list of all existing categories here: Special:Categories

To add page to a category, add category links at the end of the page:

[[Category: Foo]]
[[Category: Bar]]

If you see a page that is not in any categories, add it to appropriate categories.

Redirects

If you want create an aliases for some page, use this:

#REDIRECT [[Page name]]

See, for instance, http://wiki.vyos.net/wiki/Shell_API?redirect=no.

Images and other files

To upload a file, visit Special:Upload. When you upload it, you can reference it in pages, e.g.

[[File:Vyos logo full.png|300px|center]]
Vyos logo full.png

NOTE: Careful with copyrights! The safest option is to only upload files you made yourself, and files knowingly distributed under a free license, such as those from Open Clip Art and Wikimedia Commons. Do not upload files from other blogs/websites unless are explicitly freely licensed without a thought whether this would count as fair use everywhere in the world.

Tables

{| class="wikitable"
 |+ Routing protocols
 ! Distance-vector
 ! Link state
 ! Path vector
 |-
 | RIP, IGRP
 | OSPF, IS-IS
 | BGP
 |}

Routing protocols
Distance vector Link state Path vector
RIP, IGRP OSPF, IS-IS BGP

Templates

MediaWiki has a concept of templates that can be expanded.

For example, here we have a stub template:

{{Stub}}

It does two things: first, it expands to a "This article is a stub. You can help VyOS by expanding it." message on the page. Second, it adds the page to a category called Stubs so that anyone can quickly get a list of all pages that were marked as stubs and find a page to work on.

MediaWiki templates are very versatile and can perform a variety of functions. This wiki only uses pretty simplistic templates so far though. You can see all templates it has in Category:Message templates and Category:Markup templates.


More

For a more comprehensive formatting guide, check out https://www.mediawiki.org/wiki/Help:Formatting.