Wiki Formatting: Difference between revisions

From Flashpoint Datahub
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
 
(14 intermediate revisions by 2 users not shown)
Line 6: Line 6:


For subsections, use <code>=== Subsection Name ===</code>.
For subsections, use <code>=== Subsection Name ===</code>.
== Links ==
* Link to an external webpage: <code><nowiki>[http://example.com/example.html Example Page]</nowiki></code>.
* Link to a page on this wiki: <code><nowiki>[[Main Page]]</nowiki></code>.
* Use custom text for a wiki link: <code><nowiki>[[Main Page|My Custom Text]]</nowiki></code>
* Link to a specific section of a page on this wiki: <code><nowiki>[[Curation Format#Logo|My Custom Text]]</nowiki></code>
* Link to a specific section of the current wiki page by omitting the page name: <code><nowiki>[[#Links|My Custom Text]]</nowiki></code>
* Link to a subpage of the current page: <code><nowiki>[[/My Subpage]]</nowiki></code>
* Link to the parent page of a subpage: <code><nowiki>[[../]]</nowiki></code>


== Lists ==
== Lists ==
Line 17: Line 27:
  # Item two
  # Item two


If you need to create a numbered list with more than one line per item on the list, you may use an alternate format.
Create a sub-list:
# Item one
#* Item one of bulleted sub-list
# Item two
 
To add a line break within a list item, use the <code><nowiki><br></nowiki></code> tag:
<nowiki>
* Item one <br> New line, still item one
* Item two</nowiki>
 
To make your multi-line lists more readable in the wiki editor, you may use an alternate format.


Surround each list item with the <code><nowiki><li></nowiki></code> tag, like this:
Surround each list item with the <code><nowiki><li></nowiki></code> tag, like this:
Line 23: Line 43:
<li>
<li>
First line
First line
 
<br>
Another line
Another line
</li></nowiki>
</li></nowiki>


Then, surround all of your list items with an <code><nowiki><ol></nowiki></code> tag, like this:
Then, surround all of your list items with an <code><nowiki><ol></nowiki></code> or <code><nowiki><ul></nowiki></code> tag, like this:
  <nowiki>
  <nowiki>
<ol>
<ol>
<li>
<li>
First line
First line
 
<br>
Another line
Another line
</li>
</li>
Line 41: Line 61:
</ol></nowiki>
</ol></nowiki>


== Links ==
The <code><nowiki><ol></nowiki></code> tag will give you a numbered ("ordered") list. The <code><nowiki><ul></nowiki></code> will give you a bulleted ("unordered") list.
 
== Definition Lists ==
 
A definition list is a list of items along with information about each item. They are used heavily on the [[Helpful Tools]] page. To create a definition list, use the format below:


* Link to an external webpage: <code><nowiki>[http://example.com/example.html Example Page]</nowiki></code>.
; Item one
* Link to a page on this wiki: <code><nowiki>[[Main Page]]</nowiki></code>.
: Definition line 1
* Use custom text for a wiki link: <code><nowiki>[[Main Page|My Custom Text]]</nowiki></code>
: definition line 2
* Link to a specific section of a page on this wiki: <code><nowiki>[[Curation Format#Logo|My Custom Text]]</nowiki></code>
; Item two
* To link to a specific section of the current wiki page, omit the page name: <code><nowiki>[[#Links|My Custom Text]]</nowiki></code>
: definition line 1


== Custom Anchors ==
== Custom Anchors ==


Using our [[Template:Anchor|template]], you can add anchors to a page, so you can link directly to specific sections. This is used heavily on the [[Extended FAQ]]. To add an anchor, follow these steps:
Using our [[Template:Anchor|template]], you can add anchors to a page, so you can link directly to specific sections. To add an anchor, follow these steps:
# Choose the name for your anchor, which can be added to the wiki page's URL to link to the anchor's position on the page. For example, if this wiki page had an anchor called <code>MyAnchor</code>, the anchor link would be <code><nowiki>https://bluemaxima.org/flashpoint/datahub/Wiki_Formatting#MyAnchor</nowiki></code>.
# Choose the name for your anchor, which can be added to the wiki page's URL to link to the anchor's position on the page. For example, if this wiki page had an anchor called <code>MyAnchor</code>, the anchor link would be <code><nowiki>https://bluemaxima.org/flashpoint/datahub/Wiki_Formatting#MyAnchor</nowiki></code>.
# Choose the text to show at the anchor point. For example, on the extended FAQ, you would write the text of the question in the FAQ.
# Choose the text to show at the anchor point. For example, on the extended FAQ, you would write the text of the question in the FAQ.
# Use the anchor template to write an anchor. Here is an example of a completed anchor: <code><nowiki>{{anchor|MyAnchor|How do I use an anchor?}}</nowiki></code>
# Use the anchor template to write an anchor. Here is an example of a completed anchor: <code><nowiki>{{anchor|MyAnchor|How do I use an anchor?}}</nowiki></code>
# Add a link to your anchor using the format explained in the [[#Links|Links section]]. For example: <code><nowiki>[[#MyAnchor|How do I use an anchor?]]</nowiki></code>.
Alternatively, you can omit the final portion of the anchor code to create an invisible anchor: <code><nowiki>{{anchor|MyInvisibleAnchor|}}</nowiki></code>
# Combine the link with the anchor. To do this, replace the link text with the anchor you wrote in Step 3. For example, here is how you would combine the anchor from Step 3 with the link from Step 4: <code><nowiki>[[#MyAnchor|{{anchor|MyAnchor|How do I use an anchor?}}]]</nowiki></code>
 
Anchors are used heavily on the [[Extended FAQ]]. The [[Template:Q&A|Q&A template]] makes it easier to format Q&As for the FAQ. Simply follow the format below:
<nowiki>{{Q&A|MyAnchor|How do I use an anchor?}}
This is how you use an anchor.</nowiki>
 
If you want to place text between the question and answer, use this alternate format:
<nowiki>{{Q&A|MyAnchor|How do I use an anchor?|
Seriously, how do I use these?
}}
This is how you use an anchor.</nowiki>


== Images ==
== Images ==


To add an image to a wiki page, you first need to upload an image. Log in, then click go to the [[Special:Upload|Upload]] page.
To add an image to a wiki page, you first need to upload an image. Log in, then go to the [[Special:Upload|Upload]] page.


Once you've uploaded your image, use one of the forms explained in [[Special:Upload|Upload]] to embed the image in a wiki page. For example, you might add this to the page you are editing:
Once you've uploaded your image, use one of the forms explained in [[Special:Upload|Upload]] to embed the image in a wiki page. For example, you might add this to the page you are editing:
  <nowiki>[[File:Example_File.png|640px]]</nowiki>
  <nowiki>[[File:Example_File.png|640px]]</nowiki>
Or, you may add multiple images to a gallery view, like this:
 
To link an image without embedding it on the page, use a standard wikilink, but add a colon <code>:</code> to the beginning:
<nowiki>[[:File:Example_File.png|Example File]]</nowiki>
 
Or you may add multiple images to a gallery view, like this:
  <nowiki>
  <nowiki>
<gallery mode="traditional">
<gallery mode="traditional">
Line 89: Line 126:
  <nowiki>Normal text, <code>inline code</code>, normal text again!</nowiki>
  <nowiki>Normal text, <code>inline code</code>, normal text again!</nowiki>


Although code blocks are a nice way to highlight code, they will not prevent wiki formatting from being parsed. In order to stop the wiki parser from operating on a code block, you must add the <code><nowiki><nowiki></nowiki></code> tag inside the code block. Or, you may surround multiple lines with the <code><nowiki><nowiki></nowiki></code> tag, then add a space before the opening <code><nowiki><nowiki></nowiki></code> statement to surround the entire passage in a code block.  
Although code blocks are a nice way to highlight code, they will not prevent wiki formatting from being parsed. In order to stop the wiki parser from operating on a code block, you must add the <code><nowiki><nowiki></nowiki></code> tag inside the code block. Or you may surround multiple lines with the <code><nowiki><nowiki></nowiki></code> tag, then add a space before the opening <code><nowiki><nowiki></nowiki></code> statement to surround the entire passage in a code block.  


For some examples of how to use the <code><nowiki><nowiki></nowiki></code> tag, click "Edit" to see the wiki source of this page.
For some examples of how to use the <code><nowiki><nowiki></nowiki></code> tag, click "Edit" to see the wiki source of this page.
<noinclude>
[[Category:Meta]]
</noinclude>

Latest revision as of 07:51, 8 October 2023

This page describes the most commonly used formatting options on the Flashpoint Wiki. For a comprehensive guide, see the MediaWiki Manual.

Sections

For top-level sections, use == Section Name ==.

For subsections, use === Subsection Name ===.

Links

  • Link to an external webpage: [http://example.com/example.html Example Page].
  • Link to a page on this wiki: [[Main Page]].
  • Use custom text for a wiki link: [[Main Page|My Custom Text]]
  • Link to a specific section of a page on this wiki: [[Curation Format#Logo|My Custom Text]]
  • Link to a specific section of the current wiki page by omitting the page name: [[#Links|My Custom Text]]
  • Link to a subpage of the current page: [[/My Subpage]]
  • Link to the parent page of a subpage: [[../]]

Lists

Create a bulleted list:

* Item one
* Item two

Create a numbered list:

# Item one
# Item two

Create a sub-list:

# Item one
#* Item one of bulleted sub-list
# Item two

To add a line break within a list item, use the <br> tag:

* Item one <br> New line, still item one
* Item two

To make your multi-line lists more readable in the wiki editor, you may use an alternate format.

Surround each list item with the <li> tag, like this:

<li>
First line
<br>
Another line
</li>

Then, surround all of your list items with an <ol> or <ul> tag, like this:

<ol>
<li>
First line
<br>
Another line
</li>

<li>
Another list item, for illustrative purposes
</li>
</ol>

The <ol> tag will give you a numbered ("ordered") list. The <ul> will give you a bulleted ("unordered") list.

Definition Lists

A definition list is a list of items along with information about each item. They are used heavily on the Helpful Tools page. To create a definition list, use the format below:

; Item one
: Definition line 1
: definition line 2
; Item two
: definition line 1

Custom Anchors

Using our template, you can add anchors to a page, so you can link directly to specific sections. To add an anchor, follow these steps:

  1. Choose the name for your anchor, which can be added to the wiki page's URL to link to the anchor's position on the page. For example, if this wiki page had an anchor called MyAnchor, the anchor link would be https://bluemaxima.org/flashpoint/datahub/Wiki_Formatting#MyAnchor.
  2. Choose the text to show at the anchor point. For example, on the extended FAQ, you would write the text of the question in the FAQ.
  3. Use the anchor template to write an anchor. Here is an example of a completed anchor: {{anchor|MyAnchor|How do I use an anchor?}}

Alternatively, you can omit the final portion of the anchor code to create an invisible anchor: {{anchor|MyInvisibleAnchor|}}

Anchors are used heavily on the Extended FAQ. The Q&A template makes it easier to format Q&As for the FAQ. Simply follow the format below:

{{Q&A|MyAnchor|How do I use an anchor?}}
This is how you use an anchor.

If you want to place text between the question and answer, use this alternate format:

{{Q&A|MyAnchor|How do I use an anchor?|
Seriously, how do I use these?
}}
This is how you use an anchor.

Images

To add an image to a wiki page, you first need to upload an image. Log in, then go to the Upload page.

Once you've uploaded your image, use one of the forms explained in Upload to embed the image in a wiki page. For example, you might add this to the page you are editing:

[[File:Example_File.png|640px]]

To link an image without embedding it on the page, use a standard wikilink, but add a colon : to the beginning:

[[:File:Example_File.png|Example File]]

Or you may add multiple images to a gallery view, like this:

<gallery mode="traditional">
Image:ExampleImage1.jpg | Description one.
Image:Image2.PNG | Another description.
</gallery>

Code Blocks

To format a line with a fancy code block, simply add a space before the start of the line, like this:

 Line of code goes here

Adding a space before consecutive lines will make them part of the same code block.

If adding a space before every line gets tedious, or you want to preserve exact indentation, you can use the <pre> tag instead:

<pre>
Line of code goes here
    Another line, indented a bit.
Back to normal.
</pre>

For inline code blocks, you can use the <code> tag:

Normal text, <code>inline code</code>, normal text again!

Although code blocks are a nice way to highlight code, they will not prevent wiki formatting from being parsed. In order to stop the wiki parser from operating on a code block, you must add the <nowiki> tag inside the code block. Or you may surround multiple lines with the <nowiki> tag, then add a space before the opening <nowiki> statement to surround the entire passage in a code block.

For some examples of how to use the <nowiki> tag, click "Edit" to see the wiki source of this page.