in src/main/java/org/apache/maven/plugins/site/render/ReportDocumentRenderer.java [123:146]
public Sink createSink(File outputDirectory, String outputName) {
// Create a new document rendering context, similar to the main one, but with a different output name
String document = PathTool.getRelativeFilePath(
report.getReportOutputDirectory().getPath(), new File(outputDirectory, outputName).getPath());
// Remove .html suffix since we know that we are in Site Renderer context
document = document.substring(0, document.lastIndexOf('.'));
DocumentRenderingContext subSinkContext = new DocumentRenderingContext(
docRenderingContext.getBasedir(),
docRenderingContext.getBasedirRelativePath(),
document,
docRenderingContext.getParserId(),
docRenderingContext.getExtension(),
docRenderingContext.isEditable(),
docRenderingContext.getGenerator());
// Create a sink for this subpage, based on this new document rendering context
MultiPageSubSink sink = new MultiPageSubSink(outputDirectory, outputName, subSinkContext);
// Add it to the list of sinks associated to this report
sinks.add(sink);
return sink;
}