Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
policies:ndc_wiki_syntax [2010-05-20 23:02:46]
garrett.plasky
policies:ndc_wiki_syntax [2010-09-14 20:02:41]
garrett.plasky Approved
Line 5: Line 5:
  
   * %%<q></q>%% blocks are used to highlight text that needs emphasis, similar to a blockquote. Dokuwiki natively supports this by putting two spaces on a blank line before the text, however this does not work when dealing with lists, so we have implemented a workaround.\\ <q>This is what a sample block looks like. **We can even use wiki syntax inside of it.**</q>   * %%<q></q>%% blocks are used to highlight text that needs emphasis, similar to a blockquote. Dokuwiki natively supports this by putting two spaces on a blank line before the text, however this does not work when dealing with lists, so we have implemented a workaround.\\ <q>This is what a sample block looks like. **We can even use wiki syntax inside of it.**</q>
-  * %%<code lang></code>%% blocks are used to provide syntax highlighting for code blocks. Most common languages are recognized by replacing **lang** with the language of the quoted text. There is also a special language definition for console commands, aptly named **console**. Example of Perl syntax highlighting:\\ <code perl>#!/usr/bin/perl+  * Shell command (and output) should be quoted using %%<code console></code>%%, which will render the text monospace in black/white like a console:\\ <code console># test_command 
 +test output</code> 
 +  * %%<sxh lang></sxh>%% blocks are used to provide syntax highlighting for code blocks. Most common languages are recognized by replacing **lang** with the language of the quoted text. Example of Perl syntax highlighting:\\ <sxh perl>#!/usr/bin/perl
  
 use strict; use strict;
Line 12: Line 14:
 print $message; print $message;
 exit(); exit();
-</code>+</sxh>
   * %%<c></c>%% blocks are used to do inline command highlighting. %%<code lang></code>%% are block-level elements and will be forced onto their own line whereas this block can be used inline with other text; particularly useful when referencing a particular shell command mid-sentence. (Nitty gritty: code uses divs, c uses spans.)\\  <q>The text <c>in the middle of this sentence</c> makes use of %%<c></c>%%.</q>   * %%<c></c>%% blocks are used to do inline command highlighting. %%<code lang></code>%% are block-level elements and will be forced onto their own line whereas this block can be used inline with other text; particularly useful when referencing a particular shell command mid-sentence. (Nitty gritty: code uses divs, c uses spans.)\\  <q>The text <c>in the middle of this sentence</c> makes use of %%<c></c>%%.</q>
  
Line 19: Line 21:
   * //Tags// are descriptive words used to categorize articles into a could and to make them more easily searchable. These should be limited to 3-4 and should not be overly specific. Tags already in use are displayed at the bottom of the page creation form. These can be used in conjunction with new tags using the **%%{{tag>tag1 tag2 tag3}}%%** syntax, preferably at the bottom of the article.   * //Tags// are descriptive words used to categorize articles into a could and to make them more easily searchable. These should be limited to 3-4 and should not be overly specific. Tags already in use are displayed at the bottom of the page creation form. These can be used in conjunction with new tags using the **%%{{tag>tag1 tag2 tag3}}%%** syntax, preferably at the bottom of the article.
   * Pages always begin with a level 1 heading used to describe the contents of the article. This heading is important as it is also used as the page name when displayed in reference tables.   * Pages always begin with a level 1 heading used to describe the contents of the article. This heading is important as it is also used as the page name when displayed in reference tables.
-  * Important sections within an article are given **bold** text, whereas buttons or selections for the user are given //italics//, and finally inputt/selected values are "double quoted".\\  <q>Ex.: In the WHM, go to **Main >> Tweak Settings**, change //Number (or all) of accounts to display per page in list accounts.// to "500".</q>+  * Important sections within an article are given **bold** text, whereas buttons or selections for the user are given //italics//, and finally input/selected values are "double quoted".\\  <q>Ex.: In the WHM, go to **Main >> Tweak Settings**, change //Number (or all) of accounts to display per page in list accounts.// to "500".</q>
   * Generally we use # (hash plus a space) at the beginning of shell commands to differentiate them from regular console output. Example:\\ <code console># perl hello_world.pl   * Generally we use # (hash plus a space) at the beginning of shell commands to differentiate them from regular console output. Example:\\ <code console># perl hello_world.pl
 Hello world!</code> Hello world!</code>