[opencms-dev] HowTo StaticExport for noobs
Sandrine Prousteau
s.prousteau at eurelis.com
Fri Jan 16 14:19:53 CET 2009
I found it, it was very easy and I wonder why there is nowhere a short tutorial...
To static export a site, open 'opencms-importexport.xml' config file, and change or add what is in bold:
<staticexport enabled="true">
<staticexporthandler>org.opencms.staticexport.CmsAfterPublishStaticExportHandler</staticexporthandler>
<linksubstitutionhandler>org.opencms.staticexport.CmsDefaultLinkSubstitutionHandler</linksubstitutionhandler>
<exportpath>export</exportpath>
<exportworkpath>temp</exportworkpath>
<exportbackups>2</exportbackups>
<defaultpropertyvalue>false</defaultpropertyvalue>
<defaultsuffixes>
<suffix key=".jpg"/>
<suffix key=".gif"/>
<suffix key=".png"/>
<suffix key=".doc"/>
<suffix key=".xls"/>
<suffix key=".ppt"/>
<suffix key=".pdf"/>
<suffix key=".txt"/>
<suffix key=".css"/>
<suffix key=".zip"/>
<suffix key=".swf"/>
</defaultsuffixes>
<rendersettings>
<rfs-prefix>${CONTEXT_NAME}/export</rfs-prefix>
<vfs-prefix>${CONTEXT_NAME}${SERVLET_NAME}</vfs-prefix>
<userelativelinks>false</userelativelinks>
<exporturl>http://www.test2.spr${CONTEXT_NAME}/handle404</exporturl>
<plainoptimization>true</plainoptimization>
<testresource uri="/system/shared/page.dtd"/>
<resourcestorender>
<regex>/sites/.*</regex>
<regex>/system/workplace/commons/style/.*</regex>
<regex>/system/galleries/.*</regex>
<regex>/system/modules/.*/resources/.*</regex>
</resourcestorender>
<rfs-rules>
<rfs-rule>
<name>MyTest</name>
<description>This is the rfs-rule for my test</description>
<source>/sites/default/.*</source> <-- the site to export
<rfs-prefix></rfs-prefix>
<exportpath>myexport</exportpath> <-- the folder where to export the site, under /opencms
<userelativelinks>true</userelativelinks>
<related-system-res>
<regex>/system/modules/my.module/.*</regex> <-- the other resources used by the site
</related-system-res>
</rfs-rule>
</rfs-rules>
</rendersettings>
</staticexport>
Restart OpenCms, and go to Administration > Database management > Start Static Export.
Then go in the RFS to /opencms/myexport, and the static site is here.
BUT now my OpenCms workplace has it's menu (line with buttons projet, publish, site, view....) without stylesheet.... ???? why?
________________________________
De : opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] De la part de Sandrine Prousteau
Envoyé : vendredi 16 janvier 2009 11:28
À : The OpenCms mailing list
Objet : [opencms-dev] HowTo StaticExport for noobs
Hi
I'm new with the notions of export. I'de like to export my site, where I've a lot of custom xmlcontent (not using xmlpage) usinge templates in /system... For example to write all my site on a CD... I've tried to understand the documentation on static export, I've made some changes on my config' files, but now, OpenCms is opening without css and images (...), and when I click on Administration > Database management > Start Static Export, all my site files appears in Exporting Template Resources ... with the message in green 404!!! And I can't find my site anywhere under /opencms.
Is there someone who can write a very trivial tutorial to export a site?
I'm using OpenCms 7.0.5, Apache Tomcat/5.0.30, and Apache Version 1.3
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20090116/2da6be73/attachment.htm>
More information about the opencms-dev
mailing list