Commit 926baf96 authored by Ate Douma's avatar Ate Douma

HIPPLUG-970: cleanup and new maven configuration of standard Hippo Plugin Sitemap

parent a5b988e3
......@@ -11,13 +11,3 @@ content/src/main/resources/sitemap-entry.xml svneol=native#text/plain
content/src/main/resources/sitemap-index-component.xml svneol=native#text/plain
content/src/main/resources/template.xml svneol=native#text/plain
/pom.xml svneol=native#text/plain
src/site/resources/sitemapxml.jpg -text svneol=unset#image/jpeg
src/site/site.xml svneol=native#text/plain
src/site/xdoc/basicsitemap.xml svneol=native#text/plain
src/site/xdoc/build-demo.xml svneol=native#text/plain
src/site/xdoc/hstsitemapcrawler.xml svneol=native#text/plain
src/site/xdoc/index.xml svneol=native#text/plain
src/site/xdoc/newssitemap.xml svneol=native#text/plain
src/site/xdoc/release-notes.xml svneol=native#text/plain
src/site/xdoc/sitemapindex.xml svneol=native#text/plain
src/site/xdoc/usage.xml svneol=native#text/plain
Hippo Forge Sitemap Component
Hippo Plugin Sitemap
Copyright 2009-2014 Hippo B.V. (http://www.onehippo.com)
This product includes software developed by:
......
......@@ -17,14 +17,14 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.onehippo.forge.sitemap</groupId>
<artifactId>sitemap</artifactId>
<groupId>org.onehippo.cms7</groupId>
<artifactId>hippo-plugin-sitemap</artifactId>
<version>1.07.00-SNAPSHOT</version>
</parent>
<name>Hippo Forge Sitemap HST Component</name>
<description>Hippo Forge Sitemap HST Component</description>
<artifactId>sitemap-component</artifactId>
<packaging>jar</packaging>
<name>Hippo Plugin Sitemap Component</name>
<description>Hippo Plugin Sitemap Component</description>
<artifactId>hippo-plugin-sitemap-component</artifactId>
<dependencies>
<dependency>
<groupId>org.onehippo.cms7.hst.dependencies</groupId>
......@@ -72,15 +72,6 @@
<version>${hippo.hst.version}</version>
<scope>provided</scope>
</dependency>
<!-- Warning: Sun/Oracle specific (provided) dependency: assumes com.sun.xml.bind.marshaller.CharacterEscapeHandler
is available on the classpath (from the rt.jar), which is Sun/Oracle Java specific -->
<!-- Include a newer version of the JAXB implementation, so that namespace prefixes are propertly rendered -->
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>${com-sun-jaxb-impl.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
......
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.1-b02-fcs
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2009.05.05 at 01:46:58 PM CEST
//
@XmlSchema(
namespace = "http://www.sitemaps.org/schemas/sitemap/0.9",
elementFormDefault = XmlNsForm.QUALIFIED,
......
//
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.1-b02-fcs
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2009.05.05 at 01:46:58 PM CEST
//
@XmlSchema(
namespace = "http://www.sitemaps.org/schemas/sitemap/0.9",
elementFormDefault = XmlNsForm.QUALIFIED
......
......@@ -19,7 +19,7 @@ import org.hippoecm.hst.configuration.hosting.Mount;
import org.hippoecm.hst.content.beans.standard.HippoBean;
import org.hippoecm.hst.core.linking.HstLinkCreator;
import org.hippoecm.hst.core.request.HstRequestContext;
import org.hippoecm.repository.reviewedactions.HippoStdPubWfNodeType;
import org.hippoecm.repository.HippoStdPubWfNodeType;
import org.onehippo.forge.sitemap.components.UrlInformationProvider;
import org.onehippo.forge.sitemap.components.model.ChangeFrequency;
......
......@@ -73,7 +73,7 @@ public class SitemapIndexGenerator {
HippoBean scope = assetContentRoot.getBean(siteMapFolder);
List<HippoBean> sitemapAssets = scope.getChildBeans("hippogallery:exampleAssetSet");
for (HippoBean assetBean : sitemapAssets) {
HstLink sitemapLink = linkCreator.create(assetBean.getCanonicalBean(), requestContext);
HstLink sitemapLink = linkCreator.create((HippoBean)assetBean.getCanonicalBean(), requestContext);
rewriteAssetLink(sitemapLink, assetUrlPrefix);
String sitemapLinkUrl = sitemapLink.toUrlForm(requestContext, true);
TSitemap tSitemap = createSitemapIndexItem(sitemapLinkUrl);
......
......@@ -17,34 +17,11 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.onehippo.forge.sitemap</groupId>
<artifactId>sitemap</artifactId>
<groupId>org.onehippo.cms7</groupId>
<artifactId>hippo-plugin-sitemap</artifactId>
<version>1.07.00-SNAPSHOT</version>
</parent>
<name>Hippo Forge Sitemap Content Module</name>
<description>Hippo Forge Sitemap Content Module</description>
<artifactId>sitemap-content</artifactId>
<packaging>jar</packaging>
<build>
<defaultGoal>package</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
<manifestEntries>
<!-- build number reflects version -->
<Implementation-Build>10401</Implementation-Build>
</manifestEntries>
</archive>
</configuration>
</plugin>
</plugins>
</build>
</project>
\ No newline at end of file
<name>Hippo Plugin Sitemap Content</name>
<description>Hippo Plugin Sitemap Content</description>
<artifactId>hippo-plugin-sitemap-content</artifactId>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2010 Hippo B.V.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<sv:node xmlns:sv="http://www.jcp.org/jcr/sv/1.0" sv:name="forge-sitemap-feed">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hst:component</sv:value>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2010 Hippo B.V.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<sv:node xmlns:sv="http://www.jcp.org/jcr/sv/1.0" sv:name="hippo:initialize">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hippo:initializefolder</sv:value>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2010 Hippo B.V.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<sv:node xmlns:sv="http://www.jcp.org/jcr/sv/1.0" sv:name="sitemap.xml">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hst:sitemapitem</sv:value>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (C) 2010 Hippo B.V.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<sv:node xmlns:sv="http://www.jcp.org/jcr/sv/1.0" sv:name="forge-sitemap-feed.ftl">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hst:template</sv:value>
......
......@@ -20,116 +20,53 @@
<parent>
<groupId>org.onehippo.cms7</groupId>
<artifactId>hippo-cms7-project</artifactId>
<version>25</version>
<version>27-SNAPSHOT</version>
</parent>
<name>Hippo Forge Sitemap Component</name>
<description>Hippo Forge Sitemap Component</description>
<groupId>org.onehippo.forge.sitemap</groupId>
<artifactId>sitemap</artifactId>
<name>Hippo Plugin Sitemap</name>
<description>Hippo Plugin Sitemap</description>
<groupId>org.onehippo.cms7</groupId>
<artifactId>hippo-plugin-sitemap</artifactId>
<packaging>pom</packaging>
<version>1.07.00-SNAPSHOT</version>
<inceptionYear>2009</inceptionYear>
<url>https://forge.onehippo.org/gf/project/sitemap</url>
<scm>
<connection>scm:svn:https://svn.onehippo.org/repos/hippo/hippo-cms7/plugins/sitempa/trunk/</connection>
<developerConnection>scm:svn:https://svn.onehippo.org/repos/hippo/hippo-cms7/plugins/sitemap/trunk/</developerConnection>
<url>https://svn.onehippo.org/repos/hippo/hippo-cms7/plugins/sitemap/trunk/</url>
</scm>
<properties>
<!-- use root project name for all project modules NOTICE files, should be the same as in the root NOTICE file -->
<notice.project.name>Hippo Forge Sitemap Component</notice.project.name>
<notice.project.name>Hippo Plugin Sitemap</notice.project.name>
<hippo.hst.version>2.28.02</hippo.hst.version>
<hippo.repository.version>2.26.01</hippo.repository.version>
<maven.plugin.site.version>3.0-beta-3</maven.plugin.site.version>
<maven.plugin.jxr.version>2.2</maven.plugin.jxr.version>
<hippo.hst.version>2.29.00-SNAPSHOT</hippo.hst.version>
<hippo.repository.version>2.27.00-SNAPSHOT</hippo.repository.version>
<commons-compress.version>1.4.1</commons-compress.version>
<jaxb-api.version>2.1</jaxb-api.version>
<!-- Warning! hard Sun/Oracle specific implementation dependency -->
<com-sun-jaxb-impl.version>2.1.13</com-sun-jaxb-impl.version>
</properties>
<scm>
<connection>scm:svn:https://forge.onehippo.org/svn/sitemap/trunk</connection>
<developerConnection>scm:svn:https://forge.onehippo.org/svn/sitemap/trunk</developerConnection>
<url>http://sitemap.forge.onehippo.org/</url>
</scm>
<issueManagement>
<system>Jira</system>
<url>https://issues.onehippo.com/browse/HIPPLUG/component/10856</url>
</issueManagement>
<developers>
<developer>
<id>ard</id>
<name>Ard Schrijvers</name>
<email>a.schrijvers@onehippo.com</email>
<organization>Hippo</organization>
<roles>
<role>Project Lead</role>
<role>Java Developer</role>
</roles>
<organizationUrl>http://www.onehippo.com</organizationUrl>
<timezone>+1</timezone>
</developer>
<developer>
<id>dennis</id>
<name>Dennis Dam</name>
<timezone>+1</timezone>
</developer>
</developers>
<modules>
<module>component</module>
<module>content</module>
</modules>
<dependencies />
<repositories>
<repository>
<id>hippo-maven2</id>
<name>Hippo Maven 2 Repository</name>
<url>http://maven.onehippo.com/maven2</url>
<snapshots />
<id>hippo</id>
<name>Hippo Maven 2</name>
<url>https://maven.onehippo.com/maven2/</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<updatePolicy>never</updatePolicy>
</releases>
<layout>default</layout>
</repository>
<repository>
<id>hippo-maven2-forge</id>
<name>Hippo Maven 2 Forge repository</name>
<url>http://maven.onehippo.com/maven2-forge/</url>
<snapshots />
</repository>
</repositories>
<build>
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ftp</artifactId>
<version>1.0-alpha-6</version>
</extension>
<extension>
<groupId>org.jvnet.wagon-svn</groupId>
<artifactId>wagon-svn</artifactId>
<version>1.9</version>
</extension>
</extensions>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<tagBase>https://forge.onehippo.org/svn/sitemap/tags</tagBase>
</configuration>
</plugin>
</plugins>
</build>
<issueManagement>
<system>Jira</system>
<url>https://issues.onehippo.com/browse/HIPPLUG/component/10856</url>
</issueManagement>
<profiles>
<profile>
......@@ -158,64 +95,10 @@
</build>
</profile>
</profiles>
<reporting>
<outputDirectory>target/site</outputDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<aggregate>true</aggregate>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>${maven.plugin.jxr.version}</version>
<reportSets>
<reportSet>
<id>src-xref</id>
<reports>
<report>jxr</report>
</reports>
</reportSet>
<reportSet>
<id>test-xref</id>
<reports>
<report>test-jxr</report>
</reports>
</reportSet>
</reportSets>
<configuration>
<aggregate>true</aggregate>
</configuration>
</plugin>
<plugin>
<groupId>net.sourceforge.maven-taglib</groupId>
<artifactId>maven-taglib-plugin</artifactId>
<configuration>
<taglib.src.dir>client/src/main/resources/META-INF</taglib.src.dir>
<title>HST ${project.version} JSP tag</title>
</configuration>
</plugin>
</plugins>
</reporting>
<!-- overwrite mailinglist, removing the repository mailing list from inherited -->
<mailingLists>
<mailingList>
<name>Hippo CMS 7 User Forums</name>
<subscribe>hippo-cms7-user-join@lists.onehippo.org</subscribe>
<unsubscribe>hippo-cms7-user-leave@lists.onehippo.org</unsubscribe>
<archive>http://lists.onehippo.org/pipermail/hippo-cms7-user/</archive>
</mailingList>
</mailingLists>
<!-- clear unused elements inherited from hippo-cms7-project pom -->
<contributors>
<contributor />
</contributors>
<ciManagement />
<modules>
<module>component</module>
<module>content</module>
</modules>
</project>
<%--
Copyright 2009-2013 Hippo B.V. (http://www.onehippo.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
--%>
${sitemap}
\ No newline at end of file
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
Copyright 2009-2014 Hippo B.V. (http://www.onehippo.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS"
BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project name="Hippo Forge Sitemap Protocol Component">
<skin>
<groupId>org.onehippo.forge.mavenskin</groupId>
<artifactId>forge-maven-skin</artifactId>
<version>1.02.00</version>
</skin>
<body>
<menu name="Essentials">
<item name="Welcome" href="/index.html"/>
<item name="Release Notes" href="/release-notes.html"/>
<item name="Hippo Forge Project Page" href="http://forge.onehippo.org/projects/sitemap"/>
</menu>
<menu name="Use the plugin">
<item name="Install" href="/usage.html"/>
<item name="Build Demo" href="/build-demo.html"/>
<item name="Basic Sitemap" href="/basicsitemap.html"/>
<item name="News Sitemap" href="/newssitemap.html"/>
<item name="HST Sitemap Crawler" href="/hstsitemapcrawler.html">
<item name="Sitemap Index" href="/sitemapindex.html"/>
</item>
</menu>
<menu name="Autogenerated Docs" ref="reports"/>
</body>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE document PUBLIC
"-//Apache Software Foundation//DTD XDOC 1.0//EN"
"http://maven.apache.org/dtd/xdoc_1_0.dtd">
<!--
Copyright 2009-2013 Hippo B.V. (http://www.onehippo.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS"
BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<document>
<properties>
<title>Basic Sitemap</title>
</properties>
<body>
<section name="Basic Sitemap">
<subsection name="Resolving Sitemap Items">
<p>
This module resolves all the items from the site based on the site.
</p>
</subsection>
<subsection name="Admire the result">
<p>
Start your CMS and site.
</p>
<p>
Open your site in your browser, and check out your sitemap! <br/>
(http://[YOURDOMAIN]/site/sitemap.xml)
</p>
<p>
Your browser may not display the sitemap as XML. View the page source to see
the sitemap XML.
</p>
</subsection>
</section>
</body>
</document>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE document PUBLIC
"-//Apache Software Foundation//DTD XDOC 1.0//EN"
"http://maven.apache.org/dtd/xdoc_1_0.dtd">
<!--
Copyright 2008-2014 Hippo B.V. (http://www.onehippo.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS"
BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<document>
<properties>
<title>Building from source</title>
</properties>
<body>
<section name="Building the demo">
<subsection name="Requirements">
<ul>
<li>Java 7 JDK</li>
<li>Maven 3</li>
<li>Subversion client</li>
</ul>
</subsection>
<subsection name="Optionally, checkout the source code and build the plugin">
<p>
The demo project depends on the latest snapshot (trunk) of the plugin. So you can either set the version in
your demo to the latest release or build the plugin locally. For the latter, check out the trunk source code
from the SVN repository:
</p>
<source>$ https://forge.onehippo.org/svn/sitemap/trunk sitemap-trunk</source>
<p>Build the project using Maven:</p>
<source>$ cd sitemap-trunk
$ mvn clean install</source>
</subsection>
<subsection name="Check out, build and run the demo project">
<p>Check out the trunk source code from the SVN repository:</p>
<source>$ https://forge.onehippo.org/svn/sitemap/sitemap-demo/trunk/ sitemap-demo-trunk</source>
<p>If you didn't build the plugin locally, set the correct release version in the root pom.</p>
<p>Build and run the demo project:</p>
<source>$ cd sitemap-demo-trunk
$ mvn clean package
$ mvn -P cargo.run</source>
<p>Access CMS at <a href="http://localhost:8080/cms">http://localhost:8080/cms</a><br/>
Access site at <a href="http://localhost:8080/site">http://localhost:8080/site</a><br/>
Access the sitemap at <a href="http://localhost:8080/site/sitemap.xml">http://localhost:8080/site/sitemap.xml</a> </p>
</subsection>
</section>
</body>
</document>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE document PUBLIC
"-//Apache Software Foundation//DTD XDOC 1.0//EN"
"http://maven.apache.org/dtd/xdoc_1_0.dtd">
<!--
Copyright 2009-2013 Hippo B.V. (http://www.onehippo.com)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS"
BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<document>
<properties>
<title>HST Sitemap Crawler</title>
</properties>
<body>
<section name="HST Sitemap Crawler">
<subsection name="Resolving Sitemap Items">
<p>
This module resolves all the items of the site based on the HST sitemap.
Sitemap items can be excluded based on a reference ID (hst:refid), component configuration ID
(hst:componentconfigurationid) or based on the content path
(e.g. <i>news/_default_/subject/_any_.html</i>). These exclusions can be specified in the HST configuration. The
sitemap acts according the
<a href="http://support.google.com/webmasters/bin/answer.py?hl=en&amp;cbrank=1&amp;cbid=1ox23pat60mkn&amp;ctx=cb&amp;answer=183668&amp;src=cb">
specifications</a> provided by Google, which means that Google accepts and
recognizes the sitemap. This will lead to better (i.e. higher percentage) findability of the site pages
in Google.
</p>
<p>
All the items in the sitemap are canonicals, i.e. the location of each item is printed with the
shortest path to this item location. For instance, when defined in the sitemap <i>news/_any_.html</i>
and <i>archive/news/_any_.html</i> and a document 'hello-world' can be reached via <i>news/hello-world.html</i>
and <i>archive/news/hello-world.html</i> (so 2 locations linking to the same document), then the
location <i>news/hello-world.html</i> is referred to 'hello-world' in the sitemap, because this is
the shortest path and so leaving out the redundant locations saving time and storage. See also
<a href="sitemapindex.html">Sitemap Index</a>.
</p>
<p>
The sitemap determines based on its mount type which documents it will return. The sitemap excludes
unpublished documents when being called from the live site and will include them when being called
from the preview site.
</p>
<p>
The HST Sitemap Crawler is multi-threaded. It can use multiple Threads to generate the sitemap. The
number of Threads (so called workers) can be manually set in the HST configuration to assign a value
to the <i>amountOfWorkers</i> parameter. Its default value, so the default number of Threads, is 4.
</p>
</subsection>
<subsection name="Configuration">
<p>
In the console under <i>hst:hst/hst:configurations/hst:default/hst:components</i> exists a component
called <i>forge-sitemap-based-on-hst-configuration-feed</i>. This component renders the sitemap based
on parameters, which are used in the component's class <i>SitemapFeedBasedOnHstSitemap</i>. These
parameters can be set in the sitemapitem <i>sitemap.xml</i>, which can be found under
<i>hst:hst/hst:configurations/[YOURDOMAIN]/hst:sitemap</i>.
Here can the configurations and/or parameters be set. Non of the parameters are required, they are
all optional, i.e. when these parameters are not filled, then they will be considered as not existing.
</p>
<h4>Parameters</h4>
<p>
<table>
<tr>
<th>Parameter</th>
<th>Description</th>
</tr>
<tr>
<td>sitemapRefIdExclusions</td>
<td>The reference ID's (hst:refid) to exclude</td>
</tr>
<tr>
<td>splitter-enabled</td>
<td>true: if sitemap needs to be split in multiple sitemaps<br/>
false: otherwise</td>
</tr>
<tr>
<td>splitter-destination-foldername</td>
<td>Folder name of the sitemap index file</td>
</tr>
<tr>
<td>informationProvider</td>
<td>Location of the site specific class (which extends the DefaultUrlInformationProvider
class from the forge sitemap project)</td>
</tr>
<tr>
<td>sitemapComponentConfigurationIdExclusions</td>
<td>The component configuration ID's (hst:componentconfigurationid) to exclude</td>
</tr>
<tr>
<td>sitemapPathExclusions</td>
<td>The sitemap paths to exclude</td>
</tr>
<tr>
<td>write-to-repository</td>
<td>true: if the sitemap index file may write to the repository<br/>
false: otherwise</td>
</tr>
<tr>
<td>amountOfWorkers</td>
<td>The number of Threads used to generate the sitemap</td>
</tr>
</table>
</p>
<p>
Site specific configuration can be done in a new Java class in your own project (e.g. UrlSitemapRenderer).
This class must extend <i>DefaultUrlInformationProvider</i> class from the forge sitemap project.
Simply by overriding the methods from the <i>DefaultUrlInformationProvider</i> and change the body
of the method you can adjust it to your own preferences. See the example below.
</p>
<p>
<source><![CDATA[public class UrlSitemapRenderer extends DefaultUrlInformationProvider {
@Override
public String getLoc(final HippoBean hippoBean,
final HstRequestContext requestContext) {
return "Something else";
}
@Override
public BigDecimal getPriority(final HippoBean hippoBean) {
return 1.0;
}}]]></source>
</p>
<p>
An example of how the HST configuration could look like if you, for example, would like to:
<ul>
<li>
exclude documents which contain the refId's <i>admin</i> or <i>private</i></li>
<li>
use the sitmap splitter to split the sitemap into multiple sitemaps
</li>
<li>
set the destination folder for the splitter to <i>sitemap-splitter-directory</i>