From: <tri...@us...> - 2007-10-03 06:15:19
|
Revision: 26 http://staticwiki.svn.sourceforge.net/staticwiki/?rev=26&view=rev Author: triathlon98 Date: 2007-10-02 23:14:47 -0700 (Tue, 02 Oct 2007) Log Message: ----------- improve checkstyle configuration, more documentation Modified Paths: -------------- trunk/config/checkstyle.xml trunk/src/site/wiki/usage.wiki Modified: trunk/config/checkstyle.xml =================================================================== --- trunk/config/checkstyle.xml 2007-10-02 23:10:09 UTC (rev 25) +++ trunk/config/checkstyle.xml 2007-10-03 06:14:47 UTC (rev 26) @@ -81,7 +81,7 @@ <!-- to have access to ANT properties. In this case it uses --> <!-- the ${basedir} property to allow Checkstyle to be run --> <!-- from any directory within a project. --> - <property name="headerFile" value="config/equanda-header.txt"/> + <property name="headerFile" value="config/staticwiki-header.txt"/> </module> <!-- imports, see http://checkstyle.sourceforge.net/config_imports.html --> Modified: trunk/src/site/wiki/usage.wiki =================================================================== --- trunk/src/site/wiki/usage.wiki 2007-10-02 23:10:09 UTC (rev 25) +++ trunk/src/site/wiki/usage.wiki 2007-10-03 06:14:47 UTC (rev 26) @@ -1 +1,58 @@ -h1. How to use staticwiki \ No newline at end of file +h1. How to use staticwiki + +h2. Using the maven plugin + +One of the uses of staticwiki is as maven plugin. When maven generates the site, the staticwiki engine can be used to generate the pages. +For this you need to create the following data structure +{code} +module-home + src + site + wiki + page1.wiki + page2.wiki + site.xml + pom.xml +{code} + +The wiki pages contain the staticwiki [markup|markup.html]. +The site.xml file has the [normal structure|http://maven.apache.org/plugins/maven-site-plugin/examples/sitedescriptor.html]. + +In the pom you need to include the staticwiki plugin to assure the site plugin known how to handle the wiki files. This can be done using the following excerpt. +{code} + <build> + ..... + <extensions> + <extension> + <groupId>org.staticwiki</groupId> + <artifactId>staticwiki-site-plugin</artifactId> + <version>1.0-SNAPSHOT</version> + </extension> + </extensions> + ..... + <plugins> + ..... + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-site-plugin</artifactId> + <dependencies> + <dependency> + <groupId>org.staticwiki</groupId> + <artifactId>staticwiki-site-plugin</artifactId> + <version>1.0-SNAPSHOT</version> + </dependency> + </dependencies> + </plugin> + ..... + </plugins> + ..... + </build> +{code} + +h2. Using the wiki renderer + +Of course the staticwiki renderer can also be used in code. The easiest way to to use the default markup. In that case, the following code can be used. +{code} + WikiRenderer wikiRenderer = WikiFactory.getWikiRenderer( new AllowAllResourceHandler() ); + wikiRenderer.render( wikiText ); +{code} \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |