I am pretty inexperienced with WikiText at the moment, but I still have more to learn. This document will go over my current knowledge of the WikiText markup language.
This document uses version 1.3.11 of the Wikimedia Wikitext markup specification for the WikiText markup language.
Comments in WikiText are the same as most other markup languages (such as XML, HTML, etc.) they are written like this:
<!-- This is a comment !-->
<!-- The same syntax for single-line
comments is also used in block comments.
!-->
WikiText does not support the break statement/keyword, it has no need for it.
To this day, I am still not entirely sure what the break
keyword does, but most languages support it.
Headings in WikiText work like so:
It is advised to skip heading 1, as it is the same level of the page name.
== Heading level 2 ==
=== Heading level 3 ===
==== Heading level 4 ====
===== Heading level 5 =====
====== Heading level 6 ======
Just like HTML and other document standards, a 7th heading level does not exist. Attempting to do so will result in plain unformatted text, rather than a heading
####### Heading 7 (non-existant)
======= Heading 7 (non-existant) =======
A document with 4 or more headings will automatically render with a table of contents unless it is defined by the magic word __NOTOC__
__NOTOC__
=== Etymology ===
Lorem Ipsum
=== History ===
Warfare, invasions, Caesar, expansion, conquest.
=== Fall ===
Fall of the Western Roman Empire.
=== Middle ages ===
Holy Roman Empire
=== Fall 2 ===
Fall of the Holy Roman Empire
Without it, a table of contents is automatically generated:
=== Etymology ===
Lorem Ipsum
=== History ===
Warfare, invasions, Caesar, expansion, conquest.
=== Fall ===
Fall of the Western Roman Empire.
=== Middle ages ===
Holy Roman Empire
=== Fall 2 ===
Fall of the Holy Roman Empire
Lists can be formed in WikiText in multiple ways. The following examples showcase bullet lists.
* Start
* Each
* Bullet
* List
* Entry
* With
* An
* Asterisk
Text can be bolded in WikiText by doing the following:
This text is not bold
'''This text is bold'''
Text can be italicized in WikiText by doing the following:
This text is not italicized
''This text is italicized''
A code block can be formed in WikiText by doing the following:
<syntaxhighlight lang="python">
print("Hello, WIkiText")
</syntaxhighlight>
Referencing an image in WikiText is very easy, and is done like so:
[[File:filename.extension|options|caption]]
[[File:Example.svg|options|A good example image]]
Horizontal Lines/divider lines are supported in WikiText. They can be defined like so:
***
== Section 1 ==
---
== Section 2 ==
***
Hyperlinks are supported in WikiText. They can be defined like so:
https://wikipedia.org/
You must fill every entry in the table, or it won't render.
I am still trying to figure out how to make a functional infobox for Wikipedia. This is as close as I can currently get:
<code><nowiki>{{</nowiki>[[User:UBX/Programmer]]<nowiki>}}</nowiki></code>
/!\ This example has not been tested yet, and may not work
I don't know how to embed videos in WikiText yet, as I never tried.
I don't know how to embed audio files/clips in WikiText yet, as I never tried.
The majority of my WikiText knowledge comes from experimenting, viewing Wikipedia page source code, and reading Wikimedia documentation on the MediaWiki specification page and Wikipedia.
Notable resources:
SeansLifeArchive/Extras/Wikipedia
-
WikiText is not a curly bracket language, and also does not use semicolons at the end of each line
-
WikiText is a lighweight markup language
-
WikiText is most widely used for documentation, notably Wikipedia articles, and articles on WikiMedia sister projects,.
-
WikiText uses the
*.wiki
file extension -
WikiText is a language recognized by GitHub, but you have to use a
.gitattributes
file to recognize it in the GitHub Linguist -
WikiText is a markup language
-
WikiText is owned by MediaWiki, which is not to be confused with WikiMedia.
-
I am using the old sunflower MediaWiki logo, as I prefer it over the 2020 April 1st logo
-
No other knowledge of WikiText at the moment.
File version: 1 (2022, Monday, April 18th at 1:17 pm PST)