Creating your wiki page from scratch

From Materials Simulation Group
Jump to: navigation, search

Creating a Page

Search Bar Method

  1. Type the name of the page you want to create into the search bar at the top-right of the screen.
  2. On the next screen you should see an option asking if you want to create a new page with the title that you entered. Click it to create your new page.
  3. Congratulations! You have created a new page. The screen that pops up is where you can edit the new page. For that, see below for different options to edit your new page.

Editing a Page

Editing a page is rather simple start by clicking on the edit tab at the top right of the page. You can also edit a section of your article by clicking the edit button next to the heading.

There are a few things that you should know when it comes to editing a page. We'll cover a few of the things that are specific to our site and that the guide doesn't cover, but for a more extensive guide you should check out the general help page: Wiki Text Examples. Our Wiki has a few extensions that can be really useful as you edit you page.

Creating a spoiler

Spoilers are used to hide text that you would only like to be seen some of the time.

Show Hidden Content

They can be used to hide files, text or pretty much whatever you could imagine putting inside them. To add one all you need to do is encase what you want to hide between the spoiler tags.

<spoiler> your content here </spoiler>

Using a Formatted Code Box

This is another cool trick that the wiki can do. It will highlight your code like you would see it in your code editor.

for i in Range(10):
    print "Hello World"

Similar to the spoiler tags, to use the code box all you have to do is encase your code between the syntaxhighlight tags. For a list of languages that will work in the syntax highlighter see: Supported languages

<syntaxhighlight lang="yourCodeLanguage"> your code here </syntaxhighlight>

This is great for adding code that you want users to be able to see to your page. As you might have noticed the default size is a bit small, this is fixed by encasing the syntax highlight tags in font tags to increase the font size. This is accomplished as follows:

<font size ="2.5">
<syntaxhighlight lang="yourCodeLanguage"> your code here </syntaxhighlight>
<font>

Another cool thing you can do with the code box is add line numbers to your code.

  1.  for i in Range(10):
  2.      print "Hello World"

What you type:

<font size ="2.5">
<syntaxhighlight lang="python" line start="1"> 
Your Code
</syntaxhighlight>
<font>

You can also have it highlight a particular line:

  1.  for i in Range(10):
  2.      print "Hello World"

To do this you type:

<font size ="2.5">
<syntaxhighlight lang="python" line start="1" highlight="aNumber"> 
Your Code
</syntaxhighlight>
<font>

where aNumber is replaced by the nth line from the top that you would like to highlight.

Adding files and images to your page

Adding files is pretty easy. Its like creating any other link. There are 3 basic options:

First, to use the full version of the file type: [[File:File.jpg]] This will send you to another page in which you can view the file.

Second, to use a 200 pixel wide rendition in a box in the left margin with "alt text" as the description type: [[File:File.png|200px|thumb|left|alt text]] You can change the position and size as desired. This option is great for adding pictures to your page.

Third, for directly linking to the file without displaying the file type: [[Media:File.ogg]] I find that this one is especially useful for links to code that you would like the user to be able to download. I also like this option because it allows you to pipe the text. Meaning that the link can say something other than what the file is called. To do this type: [[Media:File.ogg|Alt Text]] .

There is a really good page on how to format your images inside your page that can be found here.