From: <tri...@us...> - 2007-10-22 15:01:52
|
Revision: 35 http://staticwiki.svn.sourceforge.net/staticwiki/?rev=35&view=rev Author: triathlon98 Date: 2007-10-22 08:01:46 -0700 (Mon, 22 Oct 2007) Log Message: ----------- more documentation Modified Paths: -------------- trunk/staticwiki-renderer/src/main/macro/org/staticwiki/wiki/macro/panel.properties trunk/staticwiki-renderer/src/site/wiki/architecture.wiki Added Paths: ----------- trunk/staticwiki-renderer/src/site/site.xml Modified: trunk/staticwiki-renderer/src/main/macro/org/staticwiki/wiki/macro/panel.properties =================================================================== --- trunk/staticwiki-renderer/src/main/macro/org/staticwiki/wiki/macro/panel.properties 2007-10-19 14:13:28 UTC (rev 34) +++ trunk/staticwiki-renderer/src/main/macro/org/staticwiki/wiki/macro/panel.properties 2007-10-22 15:01:46 UTC (rev 35) @@ -1,2 +1,2 @@ hasBody=true -template=quote +template=panel Added: trunk/staticwiki-renderer/src/site/site.xml =================================================================== --- trunk/staticwiki-renderer/src/site/site.xml (rev 0) +++ trunk/staticwiki-renderer/src/site/site.xml 2007-10-22 15:01:46 UTC (rev 35) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project name="staticwiki"> + <skin> + <groupId>be.progs</groupId> + <artifactId>maven-site-skin</artifactId> + <version>1.0</version> + </skin> + + <publishDate format="yyyy-MM-dd"/> + + <bannerLeft> + <name>staticwiki</name> + <src>http://www.staticwiki.org/images/logo.png</src> + <href>http://www.staticwiki.org/</href> + </bannerLeft> + + <body> + <links> + <item name="staticwiki" href="http://www.staticwiki.org/"/> + <item name="equanda" href="http://www.equanda.org/"/> + </links> + + <menu name="staticwiki"> + <item name="Introduction" href="index.html"/> + <item name="Architecture" href="architecture.html"/> + </menu> + + <menu ref="modules"/> + <menu ref="reports"/> + + </body> + + <poweredBy> + <logo name="maven" href="http://maven.apache.org/" + img="http://maven.apache.org/images/logos/maven-feather.png"/> + <logo name="sourceforge" href="http://sf.net/projects/staticwiki/" + img="http://sourceforge.net/sflogo.php?group_id=staticwiki&type=1"/> + </poweredBy> + +</project> \ No newline at end of file Modified: trunk/staticwiki-renderer/src/site/wiki/architecture.wiki =================================================================== --- trunk/staticwiki-renderer/src/site/wiki/architecture.wiki 2007-10-19 14:13:28 UTC (rev 34) +++ trunk/staticwiki-renderer/src/site/wiki/architecture.wiki 2007-10-22 15:01:46 UTC (rev 35) @@ -1,14 +1,19 @@ h1. Wiki Rendering -The wiki rendering Is basically done in two distinct steps +The wiki rendering is basically done in two distinct steps * macro handling, splitting the wiki up in macros and handling those -This is mainly done because macros can choose whether or not they want their content to have wiki rendering applied to them or not (for example, code macros typically do not want this). * normal wiki markup processing +This is mainly done because macros can choose whether or not they want their content to have wiki rendering applied to them or not (for example, code macros typically do not want this). + + h2. Macro rendering +The context is split in stuff between the macros and the macros themselves. The entire wiki is considered as being inside a "WIKI" macro. It is preceded by the rendered result of the "WIKI-PREFIX" macro, and at the end the "WIKI-SUFFIX" macro is rendered. This allows flexible handling of headers and/or footers in the rendered wiki. + The MacroLoader is used try to load the macro definition. The DefaultMacroLoader loads the definitions from the classpath (org.staticwiki.wiki.macro._macroname_.properties). At this moment all macros are actually implemented as velocity templates. The template name is part of the macro definition, and the TemplateLoader actually loads the template. The DefaultTemplateLoader loads the templates from the classpath (org.staticwiki.wiki.macro._templatename_.vm). +Macro names are case dependen, but note that the default wiki handling uses the convention that builtin macros (like "ERROR") have a capitalized name. The macro has the following structure {code} @@ -19,4 +24,38 @@ * _hasBody_ : indicates whether the macro has a body or not (that is, whether a closing tag is required or not). * _template_ : name of the template, as passed the the TemplateLoader. -h2. Wiki markup processing \ No newline at end of file +The macro itself is a velocity template, and the user can choose whether to use wiki rendering for the content or not. +For example the _quote_ macro uses wiki rendering +{code} +<blockquote>$context.render($macro)</blockquote> +{code} +While the _code_ macro does not. +{code} +<pre>$macro</pre> +{code} + +h2. Wiki markup processing + +The standard wiki processing is configured using the org.staticwiki.wiki.WikiRenderPipeline.txt, which has content like the following. +{code} +org.staticwiki.wiki.renderer.line.LineRenderer +org.staticwiki.wiki.renderer.line.HeaderLineHandler +org.staticwiki.wiki.renderer.line.QuoteLineHandler +org.staticwiki.wiki.renderer.line.RuleLineHandler +org.staticwiki.wiki.renderer.line.ListLineHandler +org.staticwiki.wiki.renderer.line.ParagraphLineHandler +org.staticwiki.wiki.renderer.simple.SurroundMarkupRenderer|*|<b>|</b> +org.staticwiki.wiki.renderer.simple.SurroundMarkupRenderer|_|<em>|</em> +org.staticwiki.wiki.renderer.simple.SurroundMarkupRenderer|??|<cite>|</cite> +org.staticwiki.wiki.renderer.simple.SurroundMarkupRenderer|-|<strikethrough>|</strikethrough> +org.staticwiki.wiki.renderer.simple.SurroundMarkupRenderer|+|<u>|</u> +org.staticwiki.wiki.renderer.simple.SurroundMarkupRenderer|^|<sup>|</sup> +org.staticwiki.wiki.renderer.simple.SurroundMarkupRenderer|~|<sub>|</sub> +org.staticwiki.wiki.renderer.simple.SurroundMarkupRenderer|%|<tt class="monospaced">|</tt> +org.staticwiki.wiki.renderer.simple.ImageRenderer +org.staticwiki.wiki.renderer.simple.LinkRenderer +org.staticwiki.wiki.renderer.simple.EscapeUnescapeRenderer +{code} +The renderers are put in the wiki rendering pipeline. +The list can contain both WikiSubRenderer or WikiLineHandler implementations. In the latter case, they are added in the previous WikiLineHandlerContainer in the pipeline. +Note that the order is (very) important. For example the EscapeUnescapeRenderer has to be at the end as this assures no html code can be directly inserted in the wiki content. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |