Sitemap
Under construction
<%
if(request.xpage && request.xpage == "plain") {
response.setContentType("text/xml")
def sitePages =
// here you define the page you want in your sitemap
// the order is: document name, priority, change frequency?
,
News","0.8","weekly"?,
Documentation","0.5", "weekly"?,
Demos","0.8","weekly"?,
Downloads","0.5", "weekly"?
// add more here…
]
];
println('')
println('
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">')
for(page in sitePages) {
println("")
println(" " + xwiki.getDocument(page0?).getExternalURL() + "")
println(" " + xwiki.formatDate(xwiki.getDocument(page0?).contentUpdateDate, 'yyyy-MM-dd') + "")
println(" " + page2?+ "")
println(" " + page1? + "")
println("")
} println("")
}
else {
println("
Generate Sitemap")
}
%>
<%
if(request.gen && request.gen == "1") {
content = ""
def sitePages =
// here you define the page you want in your sitemap
// the order is: document name, priority, change frequency?
,
News","0.8","weekly"?,
Documentation","0.5", "weekly"?,
Demos","0.8","weekly"?,
Downloads","0.5", "weekly"?
// add more here…
];
content += ''
content += '
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' for(page in sitePages) {
content += ""
content += " " + xwiki.getDocument(page0?).getExternalURL() + ""
content += " " + xwiki.formatDate(xwiki.getDocument(page0?).contentUpdateDate, 'yyyy-MM-dd') + ""
content += " " + page2?+ ""
content += " " + page1? + ""
content += ""
} content += ""
new File("../webapps/xwiki/sitemap.xml").withPrintWriter { w |
w.println content
}
println("Done:
sitemap.xml")
}
else {
println("
Generate Sitemap")
}
%>