Wiki

From PeerFreedom Wiki
Jump to navigation Jump to search

This page is about hints, administration, etc for using Wiki systems - mostly MediaWiki.

MediaWiki

See also https://www.mediawiki.org/wiki/Help:Contents

Use

Page template warning on top

How to create "banners" on top of page like "This article needs more citation" or "This article needs cleanup" as seen on Wikipedia?

How to apply them to given page?

Example page

Paste any code/text preformated

<pre><nowiki>
One...
Two...
OK
</nowiki></pre>

Results in:

One...
Two...
OK


List of subpages from given page

Use code:

{{Special:PrefixIndex/{{FULLPAGENAME}}/}}

for example see Cpp

Paste C++ code

in an article, how to paste big portion of C++ code and have it shown with syntax highlight, preserved newlines (and identation?) etc

TL;DR Put code in following tags:

<syntaxhighlight lang="C++">
..
</syntaxhighlight>

To enable showing line number use:

<syntaxhighlight lang="C++" line="1">
..
</syntaxhighlight>

To paste code without highlighting as above use <pre> tag.

More info about syntax: https://www.mediawiki.org/wiki/Extension:SyntaxHighlight#Supported_languages

Example:

#include <iostream>
using namespace std;

int main() 
{
    cout << "Hello, World!";
    return 0;
}
1 #include <iostream>
2 using namespace std;
3 
4 int main() 
5 {
6     cout << "Hello, World!";
7     return 0;
8 }
#include <iostream>
using namespace std;

int main() 
{
    cout << "Hello, World!";
    return 0;
}

Special Pages

https://wiki.peerfreedom.org/w/Special:CreateAccount