Difference between revisions of "EDT:How to Create/Edit Wiki pages"

From Eclipsepedia

Jump to: navigation, search
(To include code snippets:)
 
Line 10: Line 10:
 
You can set code examples to monospace by clicking '''WikiText''' and then using the following tags:  
 
You can set code examples to monospace by clicking '''WikiText''' and then using the following tags:  
  
*For inline examples such as <syntaxhighlight lang="java">x = y</syntaxhighlight> use this tagging:<br>&nbsp;&nbsp;&nbsp;'''&lt;source&gt;'''x = y'''&lt;/source&gt;''' <br>  
+
*For inline examples such as <source lang="java">x = y</source> use this tagging:<br>&nbsp;&nbsp;&nbsp;'''&lt;source&gt;'''x = y'''&lt;/source&gt;''' <br>  
  
 
The &lt;source&gt; tag is used instead of &lt;code&gt; or &lt;pre&gt; since it provides syntax highlighting similar to an advanced source code editor. We use the Java language highlighting, since one doesn't exist (yet) for EGL. If you are interested in writing a syntax highlighter for EGL, the GeSHi (Generic Syntax Highlighter) extension is used.  
 
The &lt;source&gt; tag is used instead of &lt;code&gt; or &lt;pre&gt; since it provides syntax highlighting similar to an advanced source code editor. We use the Java language highlighting, since one doesn't exist (yet) for EGL. If you are interested in writing a syntax highlighter for EGL, the GeSHi (Generic Syntax Highlighter) extension is used.  

Latest revision as of 15:03, 6 March 2012

[edit] To create a new page:

  1. Enter a new URL in your browser and include the "EDT:" prefix. For example, wiki.eclipse.org/EDT:MyNewPage.
    You'll be told that there's no text in the page. Click on the Edit this page link or the Edit tab.
  2. Using the Wikitext editor (click on Wikitext in the toolbar), place this line at the bottom of your page (with double brackets)
         [[Category:EDT]]
    The category may not display correctly until you save your work. 

Marking the page causes includes your contribution on the Category:EDT page. This way we can make sure pages are appropriately included in the sidebar navigation of the wiki. 

[edit]
To include code snippets:

You can set code examples to monospace by clicking WikiText and then using the following tags:

  • For inline examples such as
    x = y
    use this tagging:
       <source>x = y</source>

The <source> tag is used instead of <code> or <pre> since it provides syntax highlighting similar to an advanced source code editor. We use the Java language highlighting, since one doesn't exist (yet) for EGL. If you are interested in writing a syntax highlighter for EGL, the GeSHi (Generic Syntax Highlighter) extension is used.

You can spend a lot of trying to create complex formatting, but the wiki is imperfect. For example, you cannot create multiple lines of code under a bullet or number (or at least not easily), and it seems impossible to create multiple lines of code under a second-level bullet.

[edit]


To learn more about editing Wiki pages: