Differences

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

Link to this comparison view

Both sides previous revision Previous revision
policies:ndc_wiki_syntax [2010-09-14 20:02:41]
garrett.plasky Approved
policies:ndc_wiki_syntax [2011-06-30 22:59:50]
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>
-  * 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   * %%<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
  
Line 15: Line 13:
 exit(); exit();
 </sxh> </sxh>
 +  * Shell command (and output) should be quoted using %%<code shell></sxh>%% or %%<code bash></sxh>%%, which will render the text appropriately.
   * %%<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 22: Line 21:
   * 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 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>   * 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 
-Hello world!</code>