Beginners Guide to Wiki Editing: Difference between revisions

From Project Homelab
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 3: Line 3:
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.


'''Note: In the latest version of MediaWiki, the wiki software that runs this site, there is now a visual WYSIWYG editor. This editor will allow you to format wiki pages without any code. If you still prefer to edit via source, click on the "Edit source" link.'''
== Basic Editing ==
== Basic Editing ==
The basic rules of editing in WikiMedia are:
The basic rules of editing in WikiMedia are:
Line 60: Line 61:
</pre>
</pre>
|}
|}
For example:
For example:
{|
{|
Line 70: Line 70:
</pre>
</pre>
|}
|}
This produces something which looks like the item on the right!
This produces something which looks like the item on the right!
== Creating Lists ==
== 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:
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:
Line 111: Line 109:
# Second List Item
# Second List Item
|}
|}
* An mixed nested list (ordered, with unordered sub items) simply starts each line with one or more hash <code>#</code> symbols, combined with asterisks <code>*</code> for sub items:
* An mixed nested list (ordered, with unordered sub items) simply starts each line with one or more hash <code>#</code> symbols, combined with asterisks <code>*</code> for sub items:
{| class="wikitable"
{| class="wikitable"
Line 131: Line 128:
# Second List Item
# Second List Item
|}
|}
NOTE: make sure you leave no blank lines in any ''ordered list'' otherwise your list numbering starts at 1 again!
NOTE: make sure you leave no blank lines in any ''ordered list'' otherwise your list numbering starts at 1 again!


Line 163: Line 159:
|Butter||Ice cream||Milk||Yogurt
|Butter||Ice cream||Milk||Yogurt
|}
|}
The code for this, looks something like the following:
The code for this, looks something like the following:
<pre>
<pre>
Line 181: Line 176:
|}
|}
</pre>
</pre>
== Redirecting Pages ==
== 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:
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:
<pre>#REDIRECT [[Storage]]</pre>
<pre>#REDIRECT [[Storage]]</pre>
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.
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.


Line 196: Line 189:
== Starting a New Page ==
== Starting a New Page ==
There are a number of ways to make a new page.
There are a number of ways to make a new page.
=== New WIki Link ===
=== New WIki Link ===
By far the simplest is to use the standard [[Beginners_Guide_to_Wiki_Editing#Wiki_Hyperlinks|Wiki hyperlinks]] (maybe even from the [[Brainstorming]] page, for example:
By far the simplest is to use the standard [[Beginners_Guide_to_Wiki_Editing#Wiki_Hyperlinks|Wiki hyperlinks]] (maybe even from the [[Brainstorming]] page, for example:
<pre>My new link goes in square brackets: [[New Page Title]]</pre>
<pre>My new link goes in square brackets: [[New Page Title]]</pre>
Then simply click on the link, and start writing!
Then simply click on the link, and start writing!
=== Type in a URL ===
=== Type in a URL ===
Alternatively you can just type in the new URL of your article, making sure you replace any spaces with underscores:
Alternatively you can just type in the new URL of your article, making sure you replace any spaces with underscores:
<pre>My new page has a URL: http://openhomelab.org/index.php?title=New_Page_Title</pre>
<pre>My new page has a URL: http://openhomelab.org/index.php?title=New_Page_Title</pre>
== Categories ==
== 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
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
Line 216: Line 206:


Categories can also be applied to uploaded files by adding the appropriate <tt>Category</tt> tag to the description. The top-level category for image files in this wiki is the appropriately titled "[[:Category:Image Files]]".
Categories can also be applied to uploaded files by adding the appropriate <tt>Category</tt> tag to the description. The top-level category for image files in this wiki is the appropriately titled "[[:Category:Image Files]]".
== Further Reading ==
== Further Reading ==
The main WikiMedia help site can be found here:
The main WikiMedia help site can be found here:
* [https://www.mediawiki.org/wiki/Help:Contents WikiMedia Help Site]
* [https://www.mediawiki.org/wiki/Help:Contents WikiMedia Help Site]
A list of the most important articles is as follows:
A list of the most important articles is as follows:
* [https://www.mediawiki.org/wiki/Help:Formatting Formatting]
* [https://www.mediawiki.org/wiki/Help:Formatting Formatting]

Latest revision as of 02:32, 15 July 2021

Introduction[edit | edit source]

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.

Note: In the latest version of MediaWiki, the wiki software that runs this site, there is now a visual WYSIWYG editor. This editor will allow you to format wiki pages without any code. If you still prefer to edit via source, click on the "Edit source" link.

Basic Editing[edit | edit source]

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[edit | edit source]

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[edit | edit source]

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[edit | edit source]

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[edit | edit source]

  • 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[edit | edit source]

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[edit | edit source]

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[edit | edit source]

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[edit | edit source]

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[edit | edit source]

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[edit | edit source]

  • 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[edit | edit source]

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

New WIki Link[edit | edit source]

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[edit | edit source]

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[edit | edit source]

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[edit | edit source]

The main WikiMedia help site can be found here:

A list of the most important articles is as follows: