Beginners Guide to Wiki Editing: Difference between revisions

From Project Homelab
Jump to navigation Jump to search
m (1 revision imported)
No edit summary
Line 1: Line 1:
[[Category:Open Homelab Project]][[Category:HOWTO]]
[[Category:Project Homelab]][[Category:HOWTO]]
== Introduction ==
== Introduction ==
The wiki markdown language is actually very simple to pick up and use, and you can be editing articles in a matter of minutes, then build in your wiki skills over time! Here are some of the absolute basics.
The wiki markdown language is actually very simple to pick up and use, and you can be editing articles in a matter of minutes, then build in your wiki skills over time! Here are some of the absolute basics.

Revision as of 19:18, 31 July 2020

Introduction

The wiki markdown language is actually very simple to pick up and use, and you can be editing articles in a matter of minutes, then build in your wiki skills over time! Here are some of the absolute basics.

Basic Editing

The basic rules of editing in WikiMedia are:

  • Try to split your content into easily consumable sections using headers
  • Look at other peoples pages for examples and feel free to copy them! :)
  • It's generally best to preview your content prior to saving it, to reduce cumulative edits.
  • You need a full blank line between lines of text to actually create an end of paragraph / new line.
  • You can use a subset of html, for example <br> for a new line


Simple Highlighting

Some simple highlighting includes:

  • To make My Italic Text, just add two apostrophes '' on either side of your text:
''My Italic Text''
  • To make My Bold Text, just add three apostrophes ''' on either side of your text:
'''My Bold Text'''


Section Headers

Headers are not only directly linkable, but they separate your content into easy to consume chunks. You can go several layers deep, and all you have to do is add more = symbols on either side of your text.

  • A tier 1 header is:
== Tier 1 Header ==
  • A tier 2 header is:
=== Tier 2 Header ===
  • A tier 3 header is:
==== Tier 3 Header ====


Wiki Hyperlinks

Links to other pages on the same site are created one of two ways.

  • For a link to an article using its exact title, simply put square brackets around the title, for example to link to an article called Storage you just use:
[[Storage]]
[[Storage|this is a custom link to the storage article]]
  • You can take this a step further and link to a specific header within an article. For example to link to the Local Storage section of the main Storage article you follow the same custom method:
[[Storage#Local Storage|Local Storage]]
  • This is even easier if you want to link to something in the same article. For example to link to the external hyperlinks section of this article you just use the header name with a hash # symbold in front:
[[#External Hyperlinks|external hyperlinks]]


External Hyperlinks

  • External links are VERY simple, and follow the same pattern as custom internal links, replacing the pipe with a space, in the format [External URLCustom Description] For example a link to the Media Wiki Links Help Page looks like this:
 [https://meta.wikimedia.org/wiki/Help:Link link to the Media Wiki Links Help Page]


Using Images

A VSAN Rack
A VSAN Rack

The first thing you need to do when adding images is upload them. You do this by either uploading a file using the Special:Upload link, or by dragging and dropping files onto the grey bar at the top of the edit window.

Once the file has uploaded, you can then insert a link to the image using the following format:

[[FileName.jpg|border (optional)|alignment(left or right)|# of pixels for longest side|ALT text (optional)]]

For example:

[[File:VSANLegoRack.png|border|right|200px|A VSAN Rack]]

This produces something which looks like the item on the right!

Creating Lists

Lists are a very simple and effective way of breaking down and formatting information. They can either be unordered, ordered or a combination of both (nested). Here are a couple of examples:

  • An unordered list simply starts each line with one or more asterisk * symbols:
Code Snippet Example Output
* First list Item
** Sub Item
*** Third tier item
* Second List Item
  • First list Item
    • Sub Item
      • Third tier item
  • Second List Item
  • An ordered list simply starts each line with one or more hash # symbols:
Code Snippet Example Output
# First list Item
## Sub Item
# Second List Item
  1. First list Item
    1. Sub Item
  2. Second List Item
  • An mixed nested list (ordered, with unordered sub items) simply starts each line with one or more hash # symbols, combined with asterisks * for sub items:
Code Snippet Example Output
# First list Item
#* Sub Item 1
#* Sub Item 2
# Second List Item
  1. First list Item
    • Sub Item 1
    • Sub Item 2
  2. Second List Item

NOTE: make sure you leave no blank lines in any ordered list otherwise your list numbering starts at 1 again!


Code Snippets

Code snippets are pretty easy to do and depend if you want something inline or in a block.

  • An inline code snippet uses <code> to open the code, and </code> to close it, however if you use some actual WikiMedia markup in there, it will be processed, so will not appear properly.
  • If you want to do a block of code and ensure it appears properly, for example source code or indeed many lines in this article itself, use <pre> to open the the block, and </pre> to close it. For example:
<pre>
Here is my block of code
Multiple lines will work in this instance without leaving double spaces
</pre>


Creating Tables

The easiest way to create a table is simply to copy the code from the Article Template or any other page, then edit it. Here is an example:

Put your table title here
Header 1 Header 2 Header 3 Header 4
Orange Apple Pear Grapes
Bread Pie Pita Cake
Butter Ice cream Milk Yogurt

The code for this, looks something like the following:

{| class="wikitable"
|+Put your table title here
|-
! scope="col"| Header 1
! scope="col"| Header 2
! scope="col"| Header 3
! scope="col"| Header 4
|- style="vertical-align:top;"
|Orange||Apple||Pear||Grapes
|- style="vertical-align:top;"
|Bread||Pie||Pita||Cake
|- style="vertical-align:top;"
|Butter||Ice cream||Milk||Yogurt
|}

Redirecting Pages

You may want to redirect a page for many reasons, either you moved the original article or you want to point multiple article titles to one article. An example of redirection from Homelab Storage to Storage would be to add the following code to the Homelab Storage page:

#REDIRECT [[Storage]]

NOTE: Although it is possible to nest redirects, the auto-redirection will stop on the second redirect, so it is better not to do this. All redirects should go to a single source page.


Stubs

  • If you haven't actually finished writing an article, or would like someone to write an article, you can create a stub using the standard tub template:
{{Wikimedia-stub}}


Starting a New Page

There are a number of ways to make a new page.

New WIki Link

By far the simplest is to use the standard Wiki hyperlinks (maybe even from the Brainstorming page, for example:

My new link goes in square brackets: [[New Page Title]]

Then simply click on the link, and start writing!

Type in a URL

Alternatively you can just type in the new URL of your article, making sure you replace any spaces with underscores:

My new page has a URL: http://openhomelab.org/index.php?title=New_Page_Title

Categories

Each page can be added to one or more categories to aid navigation. Adding a page to a category is easy, just add the markup

[[Category:my category name]]

to a point on the page (preferably the top or the bottom). The page will then be automatically added to the Category index, and a link inserted at the bottom of the page itself.

If a Category doesn't yet exist, then the index page will be automatically generated. You can add content to a category page itself, and categories can be nested. See Category:Hypervisors as an example.

The top level of the category hierarchy is Category:Contents so all categories should be accessible by drilling down from there.

Categories can also be applied to uploaded files by adding the appropriate Category tag to the description. The top-level category for image files in this wiki is the appropriately titled "Category:Image Files".

Further Reading

The main WikiMedia help site can be found here:

A list of the most important articles is as follows: