Elephant is able to create a sitemap.xml
file. The file is compliant with Google webmaster tools.
The file is auto-generated when the BaaS administrator uses the option Tools -> Contexts
. The file location is /sitemap.xml
.
The sitemaps generator crawls Elephant contexts and adds those visible, that is, with no role restrictions. Also lists publications from BrightSide Publication module, and add those publications in visible groups and categories. It also adds publication images that follow the standard convention described here.
In order to generate the correct URL for specific BrightSide modules, is necessary to register a context as a web-context
for the specific entity.
Elephant reads web-contexts from entity-web-context.properties
file, located at WEB-INF/elephant/conf
. The format of this file is entity=path
. Examples:
publication=/publications dossier=/projects
When the BrightSide Publication plugin for sitemap, expands the entity URL, uses the path defined for publication entities.
Sitemaps highly depends on URL-as-parameter Elephant feature. Used mainly on BrightSide modules, the functionality is provided by the Elephant's core.
In order to work correctly, you need to provide information to the file entity-web-context.properties
, under /WEB-INF/elephant/conf
. Elephant uses this information to ensure which entity is at stake. In short, entities not defined in this file wont get an URL.
As for now, the URLs are generated once, and would never change. This is in itself an issue, since users wont be able changing wrong generated URLs. On the other hand, URLs encountering problems at generation time (violating the primary key, for instance) could be easily corrected.
URL-as-parameter uses the Elephant's context recede behavior. When extra path is provided, but there is no context supporting it, the context implementation moves up. Formerly, this step changed the servlet path as well. Now, simply uses this mechanism to pass the extra path to EntityWebUrls.exists()
.
Since entity-web-context.properties
is involved, checking the full path to ensure the result is quite easy.