Difference between revisions of "Wiki Tips"

From GnuCash
Jump to: navigation, search
(fix typos)
(Talk Pages: hipster-- civility++?)
Line 2: Line 2:
  
 
==Talk Pages==
 
==Talk Pages==
MediaWiki uses "Talk pages" as a mechanism for wiki editors to communicate. This is well documented over at [https://www.mediawiki.org/wiki/Help:Talk_pages MediaWiki]. Go there, read up, follow the recommended editing conventions, and you'll be communicating with fellow editors like a rock star in no time.
+
MediaWiki uses "Talk pages" as a mechanism for wiki editors to communicate. Follow the recommended editing conventions over at [https://www.mediawiki.org/wiki/Help:Talk_pages MediaWiki]. Please try to be welcoming, civil and polite when communicating with fellow editors.
  
 
==Syntax Highlighting==
 
==Syntax Highlighting==

Revision as of 14:34, 1 August 2017

The GnuCash wiki uses the very popular and capable MediaWiki. Here we list a few tips and recommendations for the GnuCash wiki.

Talk Pages

MediaWiki uses "Talk pages" as a mechanism for wiki editors to communicate. Follow the recommended editing conventions over at MediaWiki. Please try to be welcoming, civil and polite when communicating with fellow editors.

Syntax Highlighting

Syntax Highlighting makes code examples so much easier to read. It is therefore strongly preferred over <nowiki></nowiki>, <pre></pre> or indentation to mark code snippets or other formatted files.

Here are a couple of examples to illustrate this richness:

You Type You Get
<syntaxhighlight lang="sh">
# A hello world shell script
echo "Hello, World!"
</syntaxhighlight>
# A hello world shell script
echo "Hello, World!"
<syntaxhighlight lang="scheme">
; A hello world program in scheme
(begin
  (display "Hello, World!")
  (newline))
</syntaxhighlight>
; A hello world program in scheme
(begin
  (display "Hello, World!")
  (newline))

Examples with optional parameters can be found at https://www.mediawiki.org/wiki/Extension:SyntaxHighlight.

A list of supported languages is available at Supported languages, more details at Available lexers.

Tables

Tabular data loves a table. Here's a quick example to get you started using the mediawiki syntax. To encourage consistent formatting on this wiki, we strongly prefer the use of the mediawiki table syntax with the wikitable class.

You Type You Get
{| class="wikitable"
|-
! scope="col"| Col Heading One
! scope="col"| Col Heading Two
! scope="col"| Col Heading Three

|- style="vertical-align:top;"
| col 1, row 1
| col 2, row 1
| col 3, row 1

|- style="vertical-align:top;"
| col 1, row 2
| col 2, row 2
| col 3, row 2
|}
Col Heading One Col Heading Two Col Heading Three
col 1, row 1 col 2, row 1 col 3, row 1
col 1, row 2 col 2, row 2 col 3, row 2

Here's another example, this time with row headers:

You Type You Get
{| class="wikitable"
|-
! scope="col"|
! scope="col"| Col Heading One
! scope="col"| Col Heading Two
! scope="col"| Col Heading Three

|- style="vertical-align:top;"
! scope="row"|Row Heading 1
| col 1, row 1
| col 2, row 1
| col 3, row 1

|- style="vertical-align:top;"
! scope="row"|Row Heading 2
| col 1, row 2
| col 2, row 2
| col 3, row 2
|}
Col Heading One Col Heading Two Col Heading Three
Row Heading 1 col 1, row 1 col 2, row 1 col 3, row 1
Row Heading 2 col 1, row 2 col 2, row 2 col 3, row 2

Full documentation on tables can be found over at MediaWiki.

Using Images

There are several ways to incorporate images into your wiki pages.

Uploading

Admins and other users with the uploadaccess permission can upload images via Special:Upload.

These images are then referenced from a wiki page with the following syntax:

[[File:filename.extension|options|caption]]
You Type You Get
[[File:Gnucash-icon.png|100px|Click me!]]
Click me!

Images have a full version history and other metadata. To see them, just click on the image.

With the link={target} option you can refer files from other sites with a wikimedia upload directory like commons.wikimedia.org.

Linking to External Images

Sometimes you might wish to link existing images without overhead, e.g. drafts of the guide might reuse the images from the nightly docs.

The URL must not match MediaWiki:Spam-blacklist and must conform to our MediaWiki:Spam-whitelist.

embedding external image

Embedding an allowed image is as simple as typing its URL:

http://url.for/some/image.png

The URL must conform to our MediaWiki:External image whitelist.

Example:

You Type You Get
http://www.gnucash.org/images/gnucash-perspective.png
gnucash-perspective.png

linking to external image

You can also link to an external image like so.

You Type You Get
[http://www.gnucash.org/images/banner5.png Banner]
Banner

You will have to click on the link to open the image.

Source
https://www.mediawiki.org/wiki/Help:Images