Difference between revisions of "Help:Contents"
(updated line break info) |
(updated help page) |
||
Line 1: | Line 1: | ||
=== synopsis === | === synopsis === | ||
− | Creating a wiki entry is somewhat different from creating regular HTML pages. | + | Creating a wiki entry is somewhat different from creating regular HTML pages. Here are some notes on how to create a wiki page without having it look messy. If you manage to handle some of them, you can [[Getting started|get started]] on this wiki. |
− | |||
− | Here are some notes on how to create a wiki page without having it look messy. | ||
__TOC__ | __TOC__ | ||
=== paragraphs === | === paragraphs === | ||
− | + | Newlines are for edit maintainability; when you enter text, separated by a newline, mediawiki will make it continuous (like a book), unless you create a new paragraph by typing two newlines. | |
+ | |||
+ | '''Don't use HTML line breaks''', it's not maintenance friendly. Small phrases on a separate line are either (bullet) [[#lists|lists]] or [[#tables|table items]]. | ||
− | + | === lists === | |
+ | You can make a list of it by prefixing an asterisk (*), colon (:) or hash/pound (#), so it will look like this: | ||
* these are | * these are | ||
* separate entries | * separate entries | ||
Line 15: | Line 16: | ||
: have no | : have no | ||
: list decoration | : list decoration | ||
− | |||
− | |||
− | |||
− | |||
# first numbered item, line prefixed with '#' | # first numbered item, line prefixed with '#' | ||
## first subitem, prefixed with '##' | ## first subitem, prefixed with '##' | ||
Line 39: | Line 36: | ||
You can also use | You can also use | ||
<pre>tags</pre> but you will lose <nowiki>'''text formatting'''</nowiki> | <pre>tags</pre> but you will lose <nowiki>'''text formatting'''</nowiki> | ||
+ | |||
+ | === no format === | ||
+ | To make sure some inline text doesn't get wikified, you can use <nowiki>tags</nowiki> | ||
=== templates === | === templates === | ||
There are several templates to help you (with markup, hinting and linking) | There are several templates to help you (with markup, hinting and linking) | ||
They are called by placing them in two curly-brackets. This is a list of some of the templates: | They are called by placing them in two curly-brackets. This is a list of some of the templates: | ||
− | * <nowiki>{{!}}</nowiki>: Draws a pipe symbol: '|'. It is a special wiki character which you sometimes cannot use directly. | + | * [[Template:!|<nowiki>{{!}}</nowiki>]]: Draws a pipe symbol: '|'. It is a special wiki character which you sometimes cannot use directly, for example, in tables or template calls where the pipe symbol is a field separator. |
− | * <nowiki>{{ | + | * [[Template:B|<nowiki>{{B|your text}}</nowiki>]]: Draws a button shape with your text in it. |
− | + | * [[Template:K|<nowiki>{{K|$}}</nowiki>]]: Draws a keyboard key shape with '$' in it. | |
− | * <nowiki>{{InfoBox}}</nowiki>: Creates an info box using some generic variables, converting it into html. See: [Template:InfoBox] | + | * [[Template:Hint to add yourself|<nowiki>{{Hint to add yourself}}</nowiki>]]: adds a hint box how to add yourself to a (bullet or numbered) list (typically used for events/workshops) |
− | * <nowiki>{{Refresh}}</nowiki>: adds a 'refresh table' button which forces a table generated by a query to be updated by purging the page. | + | * [[Template:InfoBox|<nowiki>{{InfoBox}}</nowiki>]]: Creates an info box using some generic variables, converting it into html. See: [Template:InfoBox] |
− | * <nowiki>{{~|variable name}}</nowiki>: creates a logic inverse on the {{~|variable name}} | + | * [[Template:Refresh|<nowiki>{{Refresh}}</nowiki>]]: adds a 'refresh table' button which forces a table generated by a query to be updated by purging the page. |
+ | * [[Template:~|<nowiki>{{~|variable name}}</nowiki>]]: creates a logic inverse on the {{~|variable name}} | ||
=== tables === | === tables === | ||
Line 93: | Line 94: | ||
| line n column n | | line n column n | ||
|} | |} | ||
+ | |||
+ | === inline queries === | ||
+ | There are some magic variables, for example: | ||
+ | * You can show ACKspace's telephone number variable <nowiki>[[Phone::+31-45-71 12345]]</nowiki>, which is defined on [[Hackerspace ACKspace:Communication]] using <pre>{{#show: Hackerspace_ACKspace:Communication | ?Phone }}</pre> Like this: {{#show: Hackerspace_ACKspace:Communication | ?Phone }} | ||
+ | * The same goes for variables on a protected page, like [[Become a participant]]'s IBAN: {{#show: Become_a_participant | ?IBAN }} | ||
+ | * You can also list pages that contain a certain variable, like: | ||
+ | <pre>{{#ask:[[BoardRole::Secretary]] | ||
+ | |?= | ||
+ | |format=list | ||
+ | |mainlabel=- | ||
+ | |outro= (secretaris) | ||
+ | |order=ascending | ||
+ | |offset=0 | ||
+ | }}</pre> Will give back: {{#ask:[[BoardRole::Secretary]] | ||
+ | |?= | ||
+ | |format=list | ||
+ | |mainlabel=- | ||
+ | |order=ascending | ||
+ | |offset=0 | ||
+ | }} | ||
+ | |||
=== see also === | === see also === | ||
[https://www.mediawiki.org/wiki/Help:Formatting mediawiki.org/wiki/Help:Formatting] | [https://www.mediawiki.org/wiki/Help:Formatting mediawiki.org/wiki/Help:Formatting] |
Revision as of 09:16, 30 September 2016
synopsis
Creating a wiki entry is somewhat different from creating regular HTML pages. Here are some notes on how to create a wiki page without having it look messy. If you manage to handle some of them, you can get started on this wiki.
Contents
paragraphs
Newlines are for edit maintainability; when you enter text, separated by a newline, mediawiki will make it continuous (like a book), unless you create a new paragraph by typing two newlines.
Don't use HTML line breaks, it's not maintenance friendly. Small phrases on a separate line are either (bullet) lists or table items.
lists
You can make a list of it by prefixing an asterisk (*), colon (:) or hash/pound (#), so it will look like this:
- these are
- separate entries
or this:
- these lines
- have no
- list decoration
- first numbered item, line prefixed with '#'
- first subitem, prefixed with '##'
- second subitem, prefixed with '##'
- second item, again prefixed with '#'
- first subitem, line prefixed with '#*'
style
You can accentuate text by using single quotes. One quote just works as 'expected', but using multiple single quotes around a text part, it will make it italic, bold or underlined.
- ''two quotes'' makes the text italic
- '''three quotes''' makes the text bold
- '''''five quotes''''' makes the text bold-italic
monospace or preformat
If you put a space before each line of text, it will preformat the text ideal for code or configuration settings note that text formatting does work You can also use <pre>tags</pre> but you will lose '''text formatting'''
no format
To make sure some inline text doesn't get wikified, you can use <nowiki>tags</nowiki>
templates
There are several templates to help you (with markup, hinting and linking) They are called by placing them in two curly-brackets. This is a list of some of the templates:
- {{!}}: Draws a pipe symbol: '|'. It is a special wiki character which you sometimes cannot use directly, for example, in tables or template calls where the pipe symbol is a field separator.
- {{B|your text}}: Draws a button shape with your text in it.
- {{K|$}}: Draws a keyboard key shape with '$' in it.
- {{Hint to add yourself}}: adds a hint box how to add yourself to a (bullet or numbered) list (typically used for events/workshops)
- {{InfoBox}}: Creates an info box using some generic variables, converting it into html. See: [Template:InfoBox]
- {{Refresh}}: adds a 'refresh table' button which forces a table generated by a query to be updated by purging the page.
- {{~|variable name}}: creates a logic inverse on the variable name
tables
Mediawiki tried to make tables simpler than the HTML tables, but the syntax still can be quite daunting. Here is a sample
{| class="wikitable" |+ Table title ! Header 1 ! Header 2 ! ... ! Header n |- | line 1 column 1 | line 1 column 2 | line 1 ... | line 1 column n |- | ... |- | line n column 1 | line n column 2 | line n ... | line n column n |}
Header 1 | Header 2 | ... | Header n |
---|---|---|---|
line 1 column 1 | line 1 column 2 | line 1 ... | line 1 column n |
... | |||
line n column 1 | line n column 2 | line n ... | line n column n |
inline queries
There are some magic variables, for example:
- You can show ACKspace's telephone number variable [[Phone::+31-45-71 12345]], which is defined on Hackerspace ACKspace:Communication using
{{#show: Hackerspace_ACKspace:Communication | ?Phone }}
Like this: +31-45-71-12345 - The same goes for variables on a protected page, like Become a participant's IBAN: NL16ABNA0563941006
- You can also list pages that contain a certain variable, like:
{{#ask:[[BoardRole::Secretary]] |?= |format=list |mainlabel=- |outro= (secretaris) |order=ascending |offset=0 }}
Will give back: Stuiterveer