[英]maven-site-plugin: Configure which page should be the index.html
I have configured the maven-site-plugin the following way: 我已经通过以下方式配置了maven-site-plugin:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.3</version>
<configuration>
<skip>${maven.site.plugin.skip}</skip>
</configuration>
<dependencies>
<dependency>
<groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-module-markdown</artifactId>
<version>1.3</version>
</dependency>
</dependencies>
</plugin>
The site.xml looks like this: site.xml如下所示:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/DECORATION/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/DECORATION/1.0.0 http://maven.apache.org/xsd/decoration-1.0.0.xsd">
<publishDate format="yyyy-MM-dd" position="right" />
<version position="right" />
<skin>
<groupId>org.apache.maven.skins</groupId>
<artifactId>maven-fluido-skin</artifactId>
<version>1.4</version>
</skin>
<custom>
<fluidoSkin>
<gitHub>
<projectId>siom79/japicmp</projectId>
<ribbonOrientation>right</ribbonOrientation>
<ribbonColor>gray</ribbonColor>
</gitHub>
</fluidoSkin>
</custom>
<body>
<links>
<item name="Maven" href="http://maven.apache.org/"/>
</links>
<breadcrumbs>
<item name="japicmp" href="https://siom79.github.io/japicmp"/>
</breadcrumbs>
<menu name="Overview">
<item href="Introduction.html" name="Introduction" />
<item href="CliTool.html" name="CliTool" />
<item href="MavenPlugin.html" name="MavenPlugin" />
<item href="Examples.html" name="Examples" />
</menu>
<menu ref="reports" inherit="bottom" />
</body>
</project>
But when I run mvn site:site
and mvn site:stage
the index.html is the About page. 但是,当我运行
mvn site:site
和mvn site:stage
,index.html是“关于”页面。 How can I configure that the index.html gets the Introduction.html page? 如何配置index.html获取Introduction.html页面?
The page is generated by the org.apache.maven.plugins:maven-project-info-reports-plugin:index , but based on the available parameters you can't change the filename. 该页面由org.apache.maven.plugins:maven-project-info-reports-plugin:index生成 ,但是基于可用参数,您不能更改文件名。 What you can do is create your own
src/site/xdox/index.xml
, containing a reload/redirect to Introduction.html Or just rename Introduction.html to index.html, just like everybody expects. 您可以做的是创建自己的
src/site/xdox/index.xml
,其中包含重新加载/重定向到Introduction.html,或者像大家期望的那样,将Introduction.html重命名为index.html。
Meanwhile I have found the answer. 同时我找到了答案。 Just let the link
Introduction
point to the file index.html
and rename the file Introduction.md
to index.md
inside the folder src/site/markdown
. 只需将链接
Introduction
指向文件index.html
并将文件Introduction.md
重命名为src/site/markdown
文件夹内的index.md
。
<menu name="Overview">
<item href="index.html" name="Introduction"/>
<item href="CliTool.html" name="CliTool" />
<item href="MavenPlugin.html" name="MavenPlugin" />
<item href="Examples.html" name="Examples" />
</menu>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.